diff --git a/fluents/lib/validation.py b/fluents/lib/validation.py index 1c3c162..4d6cfe1 100644 --- a/fluents/lib/validation.py +++ b/fluents/lib/validation.py @@ -10,11 +10,15 @@ from engines import w_simpls,pls,bridge,pca from cx_utils import m_shape def w_pls_cv_val(X, Y, amax, n_blocks=None, algo='simpls'): - """Returns and RMSEP for pls tailored for wide X. + """Returns rmsep and aopt for pls tailored for wide X. + + + comments: + -- X, Y inputs need to be centered (fixme: check) + """ k, l = m_shape(Y) PRESS = zeros((l, amax+1), dtype='f') - # X,Y are centered0 if n_blocks==None: n_blocks = Y.shape[0] XXt = dot(X, X.T) @@ -29,7 +33,7 @@ def w_pls_cv_val(X, Y, amax, n_blocks=None, algo='simpls'): That = dot(Doi, dot(U, inv(triu(dot(H.T,U))) )) else: raise NotImplementedError - #Yhat = empty((amax, k, l),dtype='