Alternative to multivariatestats.jl

Hello, good evening.

There are alternatives to multivariatestats.jl?

there is GitHub - JuliaManifolds/MultivariateDataAnalysis.jl: Multivariate data analysis using geometric algorithms made easy! but it’s in pretty early stages so might not be user-friendly yet

1 Like

Hello, thank you. Im getting some multivariatestats.jl strange behaviors using lda model. Thats why Im looking for an alternative.

for instance, you can easily implement linear discriminant models, assuming this is what you referred to as LDA, (and many other multivariate ML models for high-dimensional data), with package Jchemo

using Jchemo
using CairoMakie

mod = lda()
fit!(mod, Xtrain, ytrain)
res = predict(mod, Xtest) 

errp(res.pred, ytest)
confusion(res.pred, ytest).cnt

And an example of FDA:

mod = fda(nlv = 2, scal = false)
fit!(mod, Xtrain, ytrain)

Ttrain = mod.fm.T   # training scores
## Same as:
Ttrain = transf(mod, Xtrain)
## Scores for new data
Ttest = transf(mod, Xtest)

## X-loadings matrix
## = coefficients of the linear discriminant function
## = "LD" of function lda of the R package MASS
mod.fm.P

## Explained variance computed by weighted PCA
## of the class centers in transformed scale
summary(mod).explvarx

## Projections of the class centers
## to the score space
ct = mod.fm.Tcenters
f, ax = plotxy(Ttrain[:, 1], Ttrain[:, 2], ytrain;
      xlabel = "Score-1", ylabel = "Score-2", title = "FDA")
scatter!(ax, ct[:, 1], ct[:, 2], markersize = 15, color = :red)
f
1 Like

Thats very nice. Thank you. In fact, linear discriminant model from multivariatestats.jl is the only model I’m having troubles. It seems abandoned in repository. Will be nice to check this alternatives. I will reimplement the examples using this package.

@matnbo did you know if this is the correct behavior from multivariatestats.jl?

no sorry, I never used this package

1 Like

BetaML also implements a linear Perceptron, among many other models, with a sintax similar to the one provided (Model()/fit!/predict)

1 Like