Skip to content

Commit dc24ba1

Browse files
committed
add activation function in learn paths
1 parent f72d6c4 commit dc24ba1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/find_path.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ function learn_paths(
220220
sparse_ratio = 0.05,
221221
if_pca = false,
222222
pca_eval_M = nothing,
223+
activation = nothing,
223224
verbose = false,
224225
)
225226

@@ -284,9 +285,11 @@ function learn_paths(
284285
if is_truly_sparse(Ythat_val, verbose = verbose)
285286
Ythat_val = sparse(Ythat_val)
286287
end
287-
# Ythat = sparse(Ythat)
288-
# verbose && println("Sparsity of Ythat: $(length(Ythat.nzval)/Ythat.m/Ythat.n)")
289288

289+
# apply activation to Yt hat
290+
if !isnothing(activation)
291+
Ythat_val = activation.(Ythat_val)
292+
end
290293
# collect supports for gold path each timestep
291294
if check_gold_path && !isnothing(gold_ind)
292295
for j = 1:size(data_val, 1)

0 commit comments

Comments
 (0)