Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v 0.4.3 #78

Merged
merged 2 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PosDefManifoldML"
uuid = "a07f4532-e2c9-11e9-2ea2-6d98fe4a1f21"
authors = ["Marco-Congedo <[email protected]>"]
version = "0.4.2"
version = "0.4.3"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 1 addition & 1 deletion src/PosDefManifoldML.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unit "simulations.jl" of the PosDefManifoldML Package for Julia language
# v 0.4.2 - last update July 8 2020
# v 0.4.3 - last update July 8 2020
#
# MIT License
# Copyright (c) 2019-2020,
Expand Down
9 changes: 3 additions & 6 deletions src/cv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,7 @@ function cvAcc(model :: MLmodel,
ℳ=Vector{MLmodel}(undef, nFolds) # ML models

# get indeces for all CVs (separated for each class)
if ⏩
@threads for i=1:z indTr[i], indTe[i] = cvSetup(length(𝐐[i]), nFolds; shuffle=shuffle) end
else
for i=1:z indTr[i], indTe[i] = cvSetup(length(𝐐[i]), nFolds; shuffle=shuffle) end
end
for i=1:z indTr[i], indTe[i] = cvSetup(length(𝐐[i]), nFolds; shuffle=shuffle) end

fitArgs✔=()
# make sure the user doesn't pass arguments that skrew up the cv
Expand Down Expand Up @@ -267,11 +263,12 @@ function cvAcc(model :: MLmodel,
ℳ[f]=fit(model, 𝐐Tr[f], zTr[f];
#meanInit=M0,
verbose=false,
⏩=false,
fitArgs✔...)


# predict labels for current fold
for i=1:z pl[f][i]=predict(ℳ[f], 𝐐Te[f][i], :l; verbose=false) end
for i=1:z pl[f][i]=predict(ℳ[f], 𝐐Te[f][i], :l; verbose=false, ⏩=false) end

# compute confusion matrix for current fold
for i=1:z, s=1:length(pl[f][i]) CM[f][i, pl[f][i][s]]+=1. end
Expand Down