Skip to content

Commit 74b05ab

Browse files
committed
fix identation spaces in markdown
1 parent d949649 commit 74b05ab

File tree

2 files changed

+154
-154
lines changed

2 files changed

+154
-154
lines changed

src/models/decomposition_models.jl

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ Train the machine using `fit!(mach, rows=...)`.
303303
# Hyper-parameters
304304
305305
- `maxoutdim=0`: Together with `variance_ratio`, controls the output dimension `outdim`
306-
chosen by the model. Specifically, suppose that `k` is the smallest integer such that
307-
retaining the `k` most significant principal components accounts for `variance_ratio` of
308-
the total variance in the training data. Then `outdim = min(outdim, maxoutdim)`. If
309-
`maxoutdim=0` (default) then the effective `maxoutdim` is `min(n, indim - 1)` where `n`
310-
is the number of observations and `indim` the number of features in the training data.
306+
chosen by the model. Specifically, suppose that `k` is the smallest integer such that
307+
retaining the `k` most significant principal components accounts for `variance_ratio` of
308+
the total variance in the training data. Then `outdim = min(outdim, maxoutdim)`. If
309+
`maxoutdim=0` (default) then the effective `maxoutdim` is `min(n, indim - 1)` where `n`
310+
is the number of observations and `indim` the number of features in the training data.
311311
312312
- `variance_ratio::Float64=0.99`: The ratio of variance preserved after the transformation
313313
@@ -321,38 +321,38 @@ Train the machine using `fit!(mach, rows=...)`.
321321
dimension and otherwise use `:svd`
322322
323323
- `mean=nothing`: if `nothing`, centering will be computed and applied, if set to `0` no
324-
centering (data is assumed pre-centered); if a vector is passed, the centering is done
325-
with that vector.
324+
centering (data is assumed pre-centered); if a vector is passed, the centering is done
325+
with that vector.
326326
327327
# Operations
328328
329329
- `transform(mach, Xnew)`: Return a lower dimensional projection of the input `Xnew`, which
330-
should have the same scitype as `X` above.
330+
should have the same scitype as `X` above.
331331
332332
- `inverse_transform(mach, Xsmall)`: For a dimension-reduced table `Xsmall`,
333-
such as returned by `transform`, reconstruct a table, having same the number
334-
of columns as the original training data `X`, that transforms to `Xsmall`.
335-
Mathematically, `inverse_transform` is a right-inverse for the PCA projection
336-
map, whose image is orthogonal to the kernel of that map. In particular, if
337-
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is
338-
only an approximation to `Xnew`.
333+
such as returned by `transform`, reconstruct a table, having same the number
334+
of columns as the original training data `X`, that transforms to `Xsmall`.
335+
Mathematically, `inverse_transform` is a right-inverse for the PCA projection
336+
map, whose image is orthogonal to the kernel of that map. In particular, if
337+
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is
338+
only an approximation to `Xnew`.
339339
340340
# Fitted parameters
341341
342342
The fields of `fitted_params(mach)` are:
343343
344344
- `projection`: Returns the projection matrix, which has size `(indim, outdim)`, where
345-
`indim` and `outdim` are the number of features of the input and output respectively.
345+
`indim` and `outdim` are the number of features of the input and output respectively.
346346
347347
# Report
348348
349349
The fields of `report(mach)` are:
350350
351351
- `indim`: Dimension (number of columns) of the training data and new data to be
352-
transformed.
352+
transformed.
353353
354354
- `outdim = min(n, indim, maxoutdim)` is the output dimension; here `n` is the number of
355-
observations.
355+
observations.
356356
357357
- `tprincipalvar`: Total variance of the principal components.
358358
@@ -408,19 +408,19 @@ Train the machine using `fit!(mach, rows=...)`.
408408
# Hyper-parameters
409409
410410
- `maxoutdim=0`: Controls the the dimension (number of columns) of the output,
411-
`outdim`. Specifically, `outdim = min(n, indim, maxoutdim)`, where `n` is the number of
412-
observations and `indim` the input dimension.
411+
`outdim`. Specifically, `outdim = min(n, indim, maxoutdim)`, where `n` is the number of
412+
observations and `indim` the input dimension.
413413
414414
- `kernel::Function=(x,y)->x'y`: The kernel function, takes in 2 vector arguments
415-
x and y, returns a scalar value. Defaults to the dot product of `x` and `y`.
415+
x and y, returns a scalar value. Defaults to the dot product of `x` and `y`.
416416
417417
- `solver::Symbol=:eig`: solver to use for the eigenvalues, one of `:eig`(default, uses
418-
`LinearAlgebra.eigen`), `:eigs`(uses `Arpack.eigs`).
418+
`LinearAlgebra.eigen`), `:eigs`(uses `Arpack.eigs`).
419419
420420
- `inverse::Bool=true`: perform calculations needed for inverse transform
421421
422422
- `beta::Real=1.0`: strength of the ridge regression that learns the inverse transform
423-
when inverse is true.
423+
when inverse is true.
424424
425425
- `tol::Real=0.0`: Convergence tolerance for eigenvalue solver.
426426
@@ -432,26 +432,26 @@ Train the machine using `fit!(mach, rows=...)`.
432432
should have the same scitype as `X` above.
433433
434434
- `inverse_transform(mach, Xsmall)`: For a dimension-reduced table `Xsmall`, such as
435-
returned by `transform`, reconstruct a table, having same the number of columns as the
436-
original training data `X`, that transforms to `Xsmall`. Mathematically,
437-
`inverse_transform` is a right-inverse for the PCA projection map, whose image is
438-
orthogonal to the kernel of that map. In particular, if
439-
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is only an
440-
approximation to `Xnew`.
435+
returned by `transform`, reconstruct a table, having same the number of columns as the
436+
original training data `X`, that transforms to `Xsmall`. Mathematically,
437+
`inverse_transform` is a right-inverse for the PCA projection map, whose image is
438+
orthogonal to the kernel of that map. In particular, if
439+
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is only an
440+
approximation to `Xnew`.
441441
442442
# Fitted parameters
443443
444444
The fields of `fitted_params(mach)` are:
445445
446446
- `projection`: Returns the projection matrix, which has size `(indim, outdim)`, where
447-
`indim` and `outdim` are the number of features of the input and ouput respectively.
447+
`indim` and `outdim` are the number of features of the input and ouput respectively.
448448
449449
# Report
450450
451451
The fields of `report(mach)` are:
452452
453453
- `indim`: Dimension (number of columns) of the training data and new data to be
454-
transformed.
454+
transformed.
455455
456456
- `outdim`: Dimension of transformed data.
457457
@@ -498,17 +498,17 @@ In MLJ or MLJBase, bind an instance `model` to data with
498498
Here:
499499
500500
- `X` is any table of input features (eg, a `DataFrame`) whose columns are of scitype
501-
`Continuous`; check column scitypes with `schema(X)`.
501+
`Continuous`; check column scitypes with `schema(X)`.
502502
503503
Train the machine using `fit!(mach, rows=...)`.
504504
505505
# Hyper-parameters
506506
507507
- `outdim::Int=0`: The number of independent components to recover, set automatically
508-
if `0`.
508+
if `0`.
509509
510510
- `alg::Symbol=:fastica`: The algorithm to use (only `:fastica` is supported at the
511-
moment).
511+
moment).
512512
513513
- `fun::Symbol=:tanh`: The approximate neg-entropy function, one of `:tanh`, `:gaus`.
514514
@@ -519,18 +519,18 @@ Train the machine using `fit!(mach, rows=...)`.
519519
- `tol::Real=1e-6`: The convergence tolerance for change in the unmixing matrix W.
520520
521521
- `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: mean to use, if nothing (default)
522-
centering is computed and applied, if zero, no centering; otherwise a vector of means
523-
can be passed.
522+
centering is computed and applied, if zero, no centering; otherwise a vector of means
523+
can be passed.
524524
525525
- `winit::Union{Nothing,Matrix{<:Real}}=nothing`: Initial guess for the unmixing matrix
526-
`W`: either an empty matrix (for random initialization of `W`), a matrix of size
527-
`m × k` (if `do_whiten` is true), or a matrix of size `m × k`. Here `m` is the number
528-
of components (columns) of the input.
526+
`W`: either an empty matrix (for random initialization of `W`), a matrix of size
527+
`m × k` (if `do_whiten` is true), or a matrix of size `m × k`. Here `m` is the number
528+
of components (columns) of the input.
529529
530530
# Operations
531531
532532
- `transform(mach, Xnew)`: Return the component-separated version of input `Xnew`, which
533-
should have the same scitype as `X` above.
533+
should have the same scitype as `X` above.
534534
535535
# Fitted parameters
536536
@@ -545,7 +545,7 @@ The fields of `fitted_params(mach)` are:
545545
The fields of `report(mach)` are:
546546
547547
- `indim`: Dimension (number of columns) of the training data and new data to be
548-
transformed.
548+
transformed.
549549
550550
- `outdim`: Dimension of transformed data.
551551
@@ -636,30 +636,30 @@ Train the machine using `fit!(mach, rows=...)`.
636636
# Operations
637637
638638
- `transform(mach, Xnew)`: Return a lower dimensional projection of the input `Xnew`, which
639-
should have the same scitype as `X` above.
639+
should have the same scitype as `X` above.
640640
641641
- `inverse_transform(mach, Xsmall)`: For a dimension-reduced table `Xsmall`,
642-
such as returned by `transform`, reconstruct a table, having same the number
643-
of columns as the original training data `X`, that transforms to `Xsmall`.
644-
Mathematically, `inverse_transform` is a right-inverse for the PCA projection
645-
map, whose image is orthogonal to the kernel of that map. In particular, if
646-
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is
647-
only an approximation to `Xnew`.
642+
such as returned by `transform`, reconstruct a table, having same the number
643+
of columns as the original training data `X`, that transforms to `Xsmall`.
644+
Mathematically, `inverse_transform` is a right-inverse for the PCA projection
645+
map, whose image is orthogonal to the kernel of that map. In particular, if
646+
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is
647+
only an approximation to `Xnew`.
648648
649649
# Fitted parameters
650650
651651
The fields of `fitted_params(mach)` are:
652652
653653
- `projection`: Returns the projection matrix, which has size `(indim, outdim)`, where
654-
`indim` and `outdim` are the number of features of the input and ouput respectively.
655-
Each column of the projection matrix corresponds to a factor.
654+
`indim` and `outdim` are the number of features of the input and ouput respectively.
655+
Each column of the projection matrix corresponds to a factor.
656656
657657
# Report
658658
659659
The fields of `report(mach)` are:
660660
661661
- `indim`: Dimension (number of columns) of the training data and new data to be
662-
transformed.
662+
transformed.
663663
664664
- `outdim`: Dimension of transformed data (number of factors).
665665
@@ -712,61 +712,61 @@ In MLJ or MLJBase, bind an instance `model` to data with
712712
Here:
713713
714714
- `X` is any table of input features (eg, a `DataFrame`) whose columns are of scitype
715-
`Continuous`; check column scitypes with `schema(X)`.
715+
`Continuous`; check column scitypes with `schema(X)`.
716716
717717
Train the machine using `fit!(mach, rows=...)`.
718718
719719
# Hyper-parameters
720720
721721
- `maxoutdim=0`: Controls the the dimension (number of columns) of the output,
722-
`outdim`. Specifically, `outdim = min(n, indim, maxoutdim)`, where `n` is the number of
723-
observations and `indim` the input dimension.
722+
`outdim`. Specifically, `outdim = min(n, indim, maxoutdim)`, where `n` is the number of
723+
observations and `indim` the input dimension.
724724
725725
- `method::Symbol=:ml`: The method to use to solve the problem, one of `:ml`, `:em`,
726-
`:bayes`.
726+
`:bayes`.
727727
728728
- `maxiter::Int=1000`: The maximum number of iterations.
729729
730730
- `tol::Real=1e-6`: The convergence tolerance.
731731
732732
- `mean::Union{Nothing, Real, Vector{Float64}}=nothing`: If `nothing`, centering will be
733-
computed and applied; if set to `0` no centering is applied (data is assumed
734-
pre-centered); if a vector, the centering is done with that vector.
733+
computed and applied; if set to `0` no centering is applied (data is assumed
734+
pre-centered); if a vector, the centering is done with that vector.
735735
736736
# Operations
737737
738738
- `transform(mach, Xnew)`: Return a lower dimensional projection of the input `Xnew`, which
739-
should have the same scitype as `X` above.
739+
should have the same scitype as `X` above.
740740
741741
- `inverse_transform(mach, Xsmall)`: For a dimension-reduced table `Xsmall`,
742-
such as returned by `transform`, reconstruct a table, having same the number
743-
of columns as the original training data `X`, that transforms to `Xsmall`.
744-
Mathematically, `inverse_transform` is a right-inverse for the PCA projection
745-
map, whose image is orthogonal to the kernel of that map. In particular, if
746-
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is
747-
only an approximation to `Xnew`.
742+
such as returned by `transform`, reconstruct a table, having same the number
743+
of columns as the original training data `X`, that transforms to `Xsmall`.
744+
Mathematically, `inverse_transform` is a right-inverse for the PCA projection
745+
map, whose image is orthogonal to the kernel of that map. In particular, if
746+
`Xsmall = transform(mach, Xnew)`, then `inverse_transform(Xsmall)` is only an
747+
approximation to `Xnew`.
748748
749749
# Fitted parameters
750750
751751
The fields of `fitted_params(mach)` are:
752752
753753
- `projection`: Returns the projection matrix, which has size `(indim, outdim)`, where
754-
`indim` and `outdim` are the number of features of the input and ouput respectively.
755-
Each column of the projection matrix corresponds to a principal component.
754+
`indim` and `outdim` are the number of features of the input and ouput respectively.
755+
Each column of the projection matrix corresponds to a principal component.
756756
757757
# Report
758758
759759
The fields of `report(mach)` are:
760760
761761
- `indim`: Dimension (number of columns) of the training data and new data to be
762-
transformed.
762+
transformed.
763763
764764
- `outdim`: Dimension of transformed data.
765765
766766
- `tvat`: The variance of the components.
767767
768768
- `loadings`: The models loadings, weights for each variable used when calculating
769-
principal components.
769+
principal components.
770770
771771
# Examples
772772

0 commit comments

Comments
 (0)