Skip to content

Commit 06455a4

Browse files
committed
found bug
1 parent cd43eff commit 06455a4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/MLJMultivariateStatsInterface.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ Where
448448
449449
# Hyper-parameters
450450
451-
# XXX: Would it be more consistent to use nothing or something as default?
452451
- `maxoutdim=0`: The maximum number of output dimensions. If not set, defaults to
453452
0, where all components are kept (e.g., the number of components/output dimensions
454453
is equal to the size of the smallest dimension of the training matrix)
@@ -464,7 +463,7 @@ Where
464463
465464
# Operations
466465
467-
- `predict(mach, Xnew)`: Return predictions of the target given new
466+
- `transform(mach, Xnew)`: Return predictions of the target given new
468467
features `Xnew` having the same Scitype as `X` above.
469468
470469
# Fitted parameters
@@ -481,6 +480,10 @@ using MLJ
481480
482481
PCA = @load PCA pkg=MultivariateStats
483482
483+
X, y = @load_iris
484+
model = PCA(maxoutdim=2)
485+
mach = machine(pca, X) |> fit!
486+
484487
```
485488
486489
See also

src/models/decomposition_models.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function MMI.fit(model::PCA, verbosity::Int, X)
4343
)
4444
cache = nothing
4545
report = (
46-
indim=MS.size(fitresult,1),
47-
outdim=MS.size(fitresult,2),
46+
indim=MS.size(fitresult)[1],
47+
outdim=MS.size(fitresult)[2],
4848
tprincipalvar=MS.tprincipalvar(fitresult),
4949
tresidualvar=MS.tresidualvar(fitresult),
5050
tvar=MS.var(fitresult),

0 commit comments

Comments
 (0)