From 3d2492578eaa65866c691c759d923c987ed0139e Mon Sep 17 00:00:00 2001 From: flatberg Date: Wed, 14 Mar 2007 16:33:54 +0000 Subject: [PATCH] whitespace --- fluents/lib/validation.py | 53 ++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 15 deletions(-) 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='