From 174cfd9ca56695304750b8cd2e2381bcd8742974 Mon Sep 17 00:00:00 2001 From: jw2249a Date: Mon, 13 May 2024 11:09:46 +0000 Subject: [PATCH] fixing dims error in gammakpar addition --- src/fastlink/fastlink.jl | 3 +-- src/gammas/gammaCKfuzzy.jl | 1 - src/gammas/gammaKpar.jl | 2 +- src/term_frequency_adjustment.jl | 5 ----- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/fastlink/fastlink.jl b/src/fastlink/fastlink.jl index fbd8a8b..dc1824f 100755 --- a/src/fastlink/fastlink.jl +++ b/src/fastlink/fastlink.jl @@ -132,8 +132,7 @@ function fastLink(dfA::DataFrame, dfB::DataFrame, config::Dict{String,Any}) end results = process_comparisons(res, emlink_configuration, _dims, parameters, tf_tables) - - + if length(results) == 3 return Dict("ids" => indices_to_uids(dfA[!, config["idvar"][1]],dfB[!, config["idvar"][2]],results[1].indices), "resultsEM" => results[2], diff --git a/src/gammas/gammaCKfuzzy.jl b/src/gammas/gammaCKfuzzy.jl index 54357d8..b5d562d 100644 --- a/src/gammas/gammaCKfuzzy.jl +++ b/src/gammas/gammaCKfuzzy.jl @@ -179,7 +179,6 @@ function gammaCKfuzzy!(vecA::PooledVector,vecB::PooledVector,results::DiBitMatri if @isdefined(_dims) == false _dims = (length(vecA), length(vecB)) end - # functions that update the results view if partial score_value! = score_value2 diff --git a/src/gammas/gammaKpar.jl b/src/gammas/gammaKpar.jl index 78204d2..c1b1ffd 100755 --- a/src/gammas/gammaKpar.jl +++ b/src/gammas/gammaKpar.jl @@ -145,7 +145,7 @@ function gammaKpar!(vecA::Vector,vecB::Vector,results::DiBitMatrix) Threads.@threads for (ix, x) in collect(enumerate(vecA)) indices_x = findall(vecA .=== x) if ismissing(x) - for iy in collect(1:dims[2]) + for iy in collect(1:_dims[2]) results[ix,iy] = missingval end else diff --git a/src/term_frequency_adjustment.jl b/src/term_frequency_adjustment.jl index 43248c1..3fc3a65 100644 --- a/src/term_frequency_adjustment.jl +++ b/src/term_frequency_adjustment.jl @@ -99,9 +99,6 @@ function generate_tf_adjustment_dict(EMOutput::Dict{String,Any}, tfPatterns::Dic end - - - function find_tf_pattern_vars(unique_pattern::Vector{UInt8}, tf_indices::Vector{Int64})::Vector{Int64} return intersect(tf_indices, findall(unique_pattern .== match1 .|| unique_pattern .== match2)) end @@ -159,8 +156,6 @@ function get_tf_weight(parameters::Dict, varname::String)::Float64 end - - function update_tf_zetas_ismatch(final_bf::Vector{Float64}, threshold_match::Float64) bf_len = length(final_bf)