Record Class FRegression
java.lang.Object
java.lang.Record
smile.feature.selection.FRegression
- Record Components:
feature- The feature name.statistic- F-statistic.pvalue- The p-value associated with the F-statistic.categorical- True if the feature is categorical.
- All Implemented Interfaces:
Comparable<FRegression>
public record FRegression(String feature, double statistic, double pvalue, boolean categorical)
extends Record
implements Comparable<FRegression>
Univariate F-statistic and p-values, which can be used as a feature
selection criterion for linear regression problems.
-
Constructor Summary
ConstructorsConstructorDescriptionFRegression(String feature, double statistic, double pvalue, boolean categorical) Creates an instance of aFRegressionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecategoricalrecord component.intcompareTo(FRegression other) final booleanIndicates whether some other object is "equal to" this one.feature()Returns the value of thefeaturerecord component.static FRegression[]Calculates the signal noise ratio of numeric variables.final inthashCode()Returns a hash code value for this object.doublepvalue()Returns the value of thepvaluerecord component.doubleReturns the value of thestatisticrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
FRegression
Creates an instance of aFRegressionrecord class.- Parameters:
feature- the value for thefeaturerecord componentstatistic- the value for thestatisticrecord componentpvalue- the value for thepvaluerecord componentcategorical- the value for thecategoricalrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<FRegression>
-
toString
-
fit
Calculates the signal noise ratio of numeric variables.- Parameters:
data- the data frame of the explanatory and response variables.response- the column name of response variable.- Returns:
- the signal noise ratio.
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
feature
-
statistic
-
pvalue
-
categorical
public boolean categorical()Returns the value of thecategoricalrecord component.- Returns:
- the value of the
categoricalrecord component
-