Package smile.feature.selection
Class SignalNoiseRatio
java.lang.Object
smile.feature.selection.SignalNoiseRatio
- All Implemented Interfaces:
Comparable<SignalNoiseRatio>
The signal-to-noise (S2N) metric ratio is a univariate feature ranking metric,
which can be used as a feature selection criterion for binary classification
problems. S2N is defined as |μ1 - μ2| / (σ1 + σ2),
where μ1 and μ2 are the mean value of the variable
in classes 1 and 2, respectively, and σ1 and σ2
are the standard deviations of the variable in classes 1 and 2, respectively.
Clearly, features with larger S2N ratios are better for classification.
References
- M. Shipp, et al. Diffuse large B-cell lymphoma outcome prediction by gene-expression profiling and supervised machine learning. Nature Medicine, 2002.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(SignalNoiseRatio other) static SignalNoiseRatio[]
Calculates the signal noise ratio of numeric variables.toString()
-
Field Details
-
feature
The feature name. -
s2n
public final double s2nSignal noise ratio.
-
-
Constructor Details
-
SignalNoiseRatio
Constructor.- Parameters:
feature
- The feature name.s2n
- Signal noise ratio.
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SignalNoiseRatio>
-
toString
-
fit
Calculates the signal noise ratio of numeric variables.- Parameters:
data
- the data frame of the explanatory and response variables.clazz
- the column name of binary class labels.- Returns:
- the signal noise ratio.
-