Back to API
API Documentation
cross_validation
Category: Statistical Models
Classes
CrossValidation
Methods
init(estimator, kfold, scaler)
fit(x, y)
Fitting variable matrix X
Parameters
x: np.ndarray Variable matrix with size n samples by p variables.y: np.ndarray | list Dependent matrix with size n samples by 1. The values in this vector must be 0 and 1, otherwise the classification performance will be wrongly concluded.
predict(x)
Do prediction using optimal model.
Parameters
x: np.ndarray Variable matrix with size n samples by p variables.
reset_optimal_num_component(k)
Reset the optimal number of components for manual setup.
Parameters
k: int Number of components according to the error plot.
orthogonal_score()
Cross validated orthogonal score.
predictive_score()
Cross validated predictive score.
scores()
q2()
Q2
Returns
q2: float
optimal_component_num()
Number of components determined by CV.
R2Xcorr()
R2XYO()
R2X()
R2y()
correlation()
Correlation
covariance()
Covariance
loadings_cv()
Loadings from cross validation.