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

fixed issue "Error with cvAcc for ENLR" #67 #68

Merged
merged 1 commit into from
Mar 13, 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 <marco.congedo@gmail.com>"]
version = "0.3.6"
version = "0.3.7"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
authors = ["Marco Congedo, Saloni Jain, Anton Andreev"]
version = "0.3.6"
version = "0.3.7"

[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Expand Down
4 changes: 2 additions & 2 deletions src/enlr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function fit(model :: ENLRmodel,
dfmax :: Int = _getDim(𝐏Tr, vecRange),
pmax :: Int = min(dfmax*2+20, _getDim(𝐏Tr, vecRange)),
nlambda :: Int = 100,
lambda_min_ratio:: Real = (length(yTr) < _getDim(𝐏Tr, vecRange) ? 1e-2 : 1e-4),
lambda_min_ratio:: Real = (length(yTr)*2 < _getDim(𝐏Tr, vecRange) ? 1e-2 : 1e-4),
lambda :: Vector{Float64} = Float64[],
tol :: Real = 1e-5,
maxit :: Int = 1000000,
Expand Down Expand Up @@ -468,7 +468,7 @@ function fit(model :: ENLRmodel,
dfmax :: Int = _getDim(𝐏Tr, vecRange),
pmax :: Int = min(dfmax*2+20, _getDim(𝐏Tr, vecRange)),
nlambda :: Int = 100,
lambda_min_ratio :: Real = (length(yTr) < _getDim(𝐏Tr, vecRange) ? 1e-2 : 1e-4),
lambda_min_ratio :: Real = (length(yTr)*2 < _getDim(𝐏Tr, vecRange) ? 1e-2 : 1e-4),
lambda :: Vector{Float64} = Float64[],
tol :: Real = 1e-5,
maxit :: Int = 1000000,
Expand Down
8 changes: 4 additions & 4 deletions src/tools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ function tsMap(metric :: Metric,
meanInit :: Union{ℍ, Nothing} = nothing,
tol :: Real = 0.,
transpose :: Bool = true,
vecRange :: UnitRange = 1:size(𝐏[1], 1))
vecRange :: UnitRange = 1:size(𝐏[1], 2))

k, n, getMeanISR = dim(𝐏, 1), dim(𝐏, 2), meanISR==nothing
k, n, getMeanISR = dim(𝐏, 1), dim(𝐏, 2), meanISR===nothing
getMeanISR ? G⁻½ = pow(mean(metric, 𝐏;
w=w,
✓w=✓w,
Expand Down Expand Up @@ -632,13 +632,13 @@ end
# Get the feature matrix for fit functions of ML model in the tangent space:
# if `𝐏Tr` is a matrix just return the columns in `vecRange` (by default all).
# if `𝐏Tr` is vector of Hermitian matrices, they are projected onto the
# tangent space. If the the inversesquare root of a base point `meanISR`
# tangent space. If the inversesquare root of a base point `meanISR`
# is provided, the projection is obtained at this base point, otherwise the
# mean of all points is computed and used as base point.
# If the mean is to be computed by an iterative algorithm (e.g., if the metric
# of the model is the Fisher metric), an initialization `meanInit`, weights
# `w` and a tolerance `tol` are used.
# Once projected onto the tangent spave, the matrces in `𝐏Tr` are vectorized
# Once projected onto the tangent space, the matrices in `𝐏Tr` are vectorized
# using only the rows (or columns) specified by `vecRange`.
# if `verbose` is true, print "Projecting data onto the tangent space..."
# if `transpose` the feature vectors are in the rows of `X`, otherwise in the
Expand Down