metbit.multivariate.anova
Other module in metbit 1.0.3.
import metbit.multivariate.anovaClasses
anova_oplsda
ANOVA for OPLS-DA model
This class implements ANOVA analysis for the OPLS-DA (Orthogonal Partial Least Squares Discriminant Analysis) model. It calculates the F-statistics and p-values for each number of components in the OPLS-DA model.
Parameters: - X: predictor variables as numpy array or pandas DataFrame - Y: response variable as numpy array or pandas Series (categorical) - n_components: number of components for the OPLS-DA model (default: 2) - cv: number of folds for cross-validation (default: 5)
Methods: - fit(): Fits the OPLS-DA model and calculates the F-statistics and p-values. - summary(): Generates a summary table with the F-statistics and p-values for each number of components.
Methods
__init__(self, X, Y, n_components=2, cv=5)
fit(self)
Fits the OPLS-DA model and calculates the F-statistics and p-values.
summary(self)
Generates a summary table with the F-statistics and p-values for each number of components.
Returns: - summary_table: pandas DataFrame with the F-statistics and p-values