Skip to content

ERROR: MethodError: no method matching PCA() #132

Description

@casasgomezuribarri

I am following the MLJ tutorials, and ran into an issue with this one about PCA and Clustering.

I am trying to run this piece of code from the first section:

@load PCA pkg=MultivariateStats

pca_mdl = PCA(pratio=1)
pca = machine(pca_mdl, X)
fit!(pca)
PCA
W = transform(pca, X);

And, although the first line is evaluated normally, all the other lines give back an error, which has its origin on the second line not being evaluated. This is the corresponding error:

ERROR: MethodError: no method matching PCA()
Closest candidates are:
PCA(::Array{T,1}, ::Array{T,2}, ::Array{T,1}, ::T) where T<:Real at C:\Users\ivica.julia\packages\MultivariateStats\BYMwD\src\pca.jl:16
PCA(::Array{T,1}, ::Array{T,2}, ::Array{T,1}, ::T, ::T) where T<:Real at C:\Users\ivica.julia\packages\MultivariateStats\BYMwD\src\pca.jl:6
Stacktrace:
[1] top-level scope at REPL[1]:1

From comparison with the implementation of other learning algorithms, the syntax is consistent with the rest of the package, for example:

dtr_model = DecisionTreeRegressor()

I am not sure if this is an issue of MultivariateStats.jl or MLJ.jl, but I am more inclined to think this is the right place to post because all the other learning algorithms work fine.

Appreciate any help, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions