Linear Discriminant Analysis#
Linear Discriminant Analysis (LDA) is a supervised dimensionality reduction technique that selects the most informative features using information in the class labels. More formally, LDA finds a linear combination of features that characterizes or best discriminates two or more classes.
Interfaces: Transformer, Stateful, Persistable
Data Type Compatibility: Continuous only
Parameters#
# | Name | Default | Type | Description |
---|---|---|---|---|
1 | dimensions | int | The target number of dimensions to project onto. |
Example#
use Rubix\ML\Transformers\LinearDiscriminantAnalysis;
$transformer = new LinearDiscriminantAnalysis(20);
Additional Methods#
Return the amount of variance that has been preserved by the transformation:
public explainedVar() : ?float
Return the amount of variance lost by discarding the noise components:
public noiseVar() : ?float
Return the percentage of information lost due to the transformation:
public lossiness() : ?float
Last update: 2021-01-23