You are viewing the documentation for metbit 1.0.1. Change release context
metbit.multivariate.opls.pls
Analysis and models module in metbit 1.0.1.
import metbit.multivariate.opls.plsClasses
PLS
Partial least squares.
Methods
__init__(self)
fit(self, x: np.ndarray, y: np.ndarray, n_comp: int=None, dot=np.dot)
Fit PLS model
Parameters
xnp.ndarrayVariable matrix with size n by p, where n number of samples/instances, p number of variables
ynp.ndarrayDependent variable with size n by 1
n_compintNumber of components. Default is None, which indicates that smaller number between n and p will be used.
Returns
PLS object
predict(self, X, n_component=None)
Do prediction.
scores_x(self)
Scores.
Returns
np.ndarray Scores
loadings_x(self)
Returns
np.ndarray loadings
weights_y(self)
Returns
np.ndarray y scores