diff --git a/pyChemometrics/ChemometricsPCA.py b/pyChemometrics/ChemometricsPCA.py index a81b324..1b07776 100644 --- a/pyChemometrics/ChemometricsPCA.py +++ b/pyChemometrics/ChemometricsPCA.py @@ -512,7 +512,7 @@ def cross_validation(self, x, cv_method=KFold(7, True), outputdist=False, press_ # Assemble the dictionary and data matrices self.cvParameters = {'Mean_VarExpRatio_Training': np.array(cv_varexplained_training).mean(axis=0), - 'Stdev_VarExpRatio_Training': np.array(cv_varexplained_training).mean(axis=0), + 'Stdev_VarExpRatio_Training': np.array(cv_varexplained_training).std(axis=0), 'Mean_VarExp_Test': np.mean(cv_varexplained_test), 'Stdev_VarExp_Test': np.std(cv_varexplained_test), 'Q2': q_squared} diff --git a/pyChemometrics/ChemometricsPLS.py b/pyChemometrics/ChemometricsPLS.py index 9f1caed..0a95288 100644 --- a/pyChemometrics/ChemometricsPLS.py +++ b/pyChemometrics/ChemometricsPLS.py @@ -674,7 +674,7 @@ def dmodx(self, x): :return: The Normalised DmodX measure for each sample """ resids_ssx = self._residual_ssx(x) - s = np.sqrt(resids_ssx/(self.loadings_p.shape[1] - self.ncomps)) + s = np.sqrt(resids_ssx/(self.loadings_p.shape[0] - self.ncomps)) dmodx = np.sqrt((s/self.modelParameters['S0X'])**2) return dmodx @@ -896,7 +896,7 @@ def cross_validation(self, x, y, cv_method=KFold(7, True), outputdist=False, # Store everything... self.cvParameters = {'Q2X': q_squaredx, 'Q2Y': q_squaredy, 'MeanR2X_Training': np.mean(R2X_training), 'MeanR2Y_Training': np.mean(R2Y_training), 'StdevR2X_Training': np.std(R2X_training), - 'StdevR2Y_Training': np.std(R2X_training), 'MeanR2X_Test': np.mean(R2X_test), + 'StdevR2Y_Training': np.std(R2Y_training), 'MeanR2X_Test': np.mean(R2X_test), 'MeanR2Y_Test': np.mean(R2Y_test), 'StdevR2X_Test': np.std(R2X_test), 'StdevR2Y_Test': np.std(R2Y_test), 'Mean_Loadings_q': cv_loadings_q.mean(0), 'Stdev_Loadings_q': cv_loadings_q.std(0), 'Mean_Loadings_p': cv_loadings_p.mean(0), diff --git a/tests/test_data/pca_cvloads.csv b/tests/test_data/pca_cvloads.csv new file mode 100644 index 0000000..d51fc1c --- /dev/null +++ b/tests/test_data/pca_cvloads.csv @@ -0,0 +1,6 @@ +-2.107560291758000734e-02,1.819149375994711521e-02,4.344241548455026608e-03,-5.586396322460725899e-02,2.259522360440791716e-02,-6.213056224373855047e-02,-6.729597656332397815e-02,-4.870393381333307931e-02,5.954499936141727928e-02,-7.774340042771012149e-02,-2.403161193642705876e-02,-2.206065869442300556e-02,-8.487366462601440842e-02,-7.761997197236782109e-02,-7.149023618455303819e-02,-6.899687732547900298e-02,-9.718214677521937184e-02,6.694051460496376615e-02,2.675883306052079594e-02,1.432215039872907977e-02,3.836801977013507697e-02,-8.627780502387048800e-02,-5.040755715394892172e-02,9.254638443487879507e-02,6.206782653617474305e-02,7.838754157346795870e-02,-2.456986277069126909e-02,-4.275545716694894444e-02,4.606395961106084930e-02,4.158658257940544417e-02,-7.924698811179506364e-02,-2.365217968836211965e-02,-2.291258780574514584e-02,-5.236230717743683288e-02,-3.051558875255473355e-02,-3.203848718144595986e-02,2.042494761352266555e-02,4.055350983461931957e-02,-2.938618135442172541e-02,5.810387341062493542e-03,6.546474674058286314e-02,-1.490610253615300487e-02,7.520239236232006963e-02,-4.132391415803287477e-02,3.850106554016571175e-02,-1.082847435431627398e-01,7.973299926755192391e-02,-5.794070821174806402e-02,5.720905391863451150e-02,9.994355577300088889e-02,1.292540242878991719e-01,-3.516580203423382012e-02,3.767972958967055058e-02,1.067602397728979330e-01,7.938709851414715857e-02,-2.791071492578949681e-02,2.503210725984352566e-03,3.478397052509723392e-02,-4.110967967803334094e-02,-4.733526293296542314e-02,-6.800753015525709544e-02,1.143708409149113009e-01,-6.968807040465332947e-02,1.479039134907065012e-01,1.774826893521442434e-02,1.710022564592791894e-02,-4.167082272073974886e-02,5.512705364416330828e-02,-1.044000373583539240e-02,-7.428548953237144696e-03,-1.141160030551060037e-02,1.859067690119071276e-02,1.653600744775094973e-03,-1.190556605967325321e-01,-3.190974947893739783e-02,-7.232701932107753195e-02,-4.296261465439248084e-02,6.822721840382747240e-03,1.297415628328586479e-01,3.625270923775476134e-02,1.255985410328865591e-02,5.376337861959522291e-02,6.034837773890037310e-02,-7.667373281591603751e-02,-9.814645699042535976e-02,-9.425326869667270679e-02,-2.318580711217387361e-02,-9.011110843231364201e-03,-3.165115971706271292e-02,4.545600409591549901e-02,-1.297008097238700440e-02,9.863280519120638801e-02,4.990657205329749463e-02,-2.159220542599509657e-02,-5.599388283764839165e-03,1.775005842544103915e-02,1.419616590500580137e-02,-4.051557199780827373e-02,-4.090717411658932601e-02,-6.340967175910780518e-02,7.068981638553216429e-02,-6.971650169188987889e-02,-1.183663071962103991e-01,1.065949411957162370e-02,3.554433939638108929e-04,3.533127994133444111e-02,-5.616185378025392166e-02,-3.386813567251587692e-02,1.280682587832516206e-01,1.004912195728290547e-01,1.915191069285320652e-02,3.109071503603256376e-02,2.941951557222769256e-02,-8.010484942023069583e-04,2.241559791303929239e-02,2.408410761419473370e-02,-6.845300471707600623e-04,-4.853604109017872065e-02,6.774706304678210222e-02,-5.639213158625152461e-02,1.987395649742923834e-02,3.387476646010207943e-03,1.115371964791901510e-01,6.851830004647020689e-02,-5.206392934681494319e-03,1.204066880950475406e-02,-3.568495136668046325e-02,-8.517369886392604826e-04,1.547295887387899020e-02,-1.246553994624315098e-02,-4.254222205579761412e-02,3.094458052585172605e-02,9.512991850823090956e-02,5.551748470521823686e-02,4.379701713318046724e-02,5.648380621519528272e-02,7.011835297556645238e-03,-4.270863095360551636e-05,7.253179908289665578e-02,1.541906297982157184e-02,5.180234030844110132e-02,-6.202704848989772091e-02,-7.020488773366892477e-02,1.332047657416820796e-01,8.486245261615276217e-03,-2.949066602508977272e-02,2.556895468879522362e-02,-2.950789208965759816e-02,-3.288319501529069627e-02,3.153826488491242881e-03,-4.104680791508251436e-02,-3.421262473108766661e-02,3.336059436694086000e-03,-8.752881371352601997e-03,-1.407199991073703263e-02,-3.078558793832946762e-03,-3.228265377993346646e-02,-1.655807874455068190e-02,6.217828595903833119e-03,-1.303731571215810056e-02,2.611705799916034035e-02,-1.094732986148711229e-01,3.184483948222845834e-02,-1.034830968279668306e-01,1.694294509653343772e-01,4.591424407515002498e-02,5.135781559467443580e-02,-5.584382806593338883e-02,-3.937634431449141964e-02,6.425450284887808394e-02,5.013653255195100328e-02,-3.235517106454214448e-02,6.160011561849360051e-02,3.232528044230050662e-02,8.824846499685282120e-02,6.682665760252763480e-03,-1.009694965222725366e-01,-1.341720169913895311e-01,-7.903697107570488434e-03,-6.142128211909768376e-02,-5.231000858511224150e-02,-6.463192419631502705e-02,-1.329717965363429698e-02,6.287075113269514903e-02,-1.250147499774037843e-02,-1.142761111663087061e-02,3.184750393042261318e-02,3.754989754149417464e-02,-4.037934932761561707e-02,2.666666731335602322e-02,3.931906781334894296e-02,-2.777354765644875559e-02,-6.317170753651484005e-02,-1.801157685832581110e-02,7.135441651015603237e-02,-3.013996106046764115e-02,-5.343212063947577750e-02,2.770418304913641050e-02,3.585156782644883383e-02,8.816200285482614363e-02 +8.169946054660121026e-03,-1.750255257597843964e-02,5.622649467154175983e-03,-1.390070211795557675e-02,-2.624551723265347580e-02,-1.915621553980572950e-03,-6.373511920111017649e-04,-3.299860268787531414e-02,1.494950535341495537e-02,2.377595285452786117e-02,1.707497086160784591e-02,3.908561299191499333e-02,-2.097203294299950990e-02,1.322720764630054904e-02,-4.376798293858564365e-02,-2.141453072297573937e-02,-6.213620837351745141e-02,9.991234782611477239e-02,-4.333951266163431522e-03,2.314276445197480450e-02,2.080438575893540573e-02,-6.197389283561993700e-02,2.590229169415403376e-02,5.559266856383691946e-02,4.066431809768899369e-02,-3.540921538904141103e-02,-8.988672625888807430e-03,4.017120894890868765e-03,4.703631539501233749e-02,-1.637766603266301024e-02,-8.459584845653787821e-02,-9.430953045868217810e-03,-4.959074660989804678e-02,3.636111009585100279e-02,-3.671580362245063095e-02,1.082288732086767249e-02,3.891141588037101001e-02,3.223034082652201111e-03,-4.357694055012000661e-02,1.350376503905129262e-02,-8.024740926519308148e-03,4.429218487995643244e-02,2.185667637276325972e-02,-4.847497364369308904e-04,-1.843978846081698389e-02,-4.802655554484453609e-02,-2.083686655527482840e-04,-5.795525988380995780e-02,6.689820703780975653e-02,-3.629039502156683559e-03,2.845749233534453429e-02,9.987364834731201138e-03,4.141089052961095807e-02,-4.419863783281341267e-03,2.051004027190556772e-02,3.200730028901924411e-03,1.687782482205012896e-02,-4.294197885896509394e-03,-2.334674632973871358e-02,6.939247257159056326e-02,-4.906317481463747660e-02,-3.983783486322649108e-03,-8.677280443837216695e-02,9.043935404476408091e-02,3.887319329593273004e-02,4.943731493715360949e-03,-3.287384996349958233e-02,5.187149539564390316e-02,-7.193517219454316665e-03,-1.376767458722387254e-02,2.752963399859393624e-03,1.942190991291801311e-02,-2.696578004182658556e-02,-5.742301237408987263e-02,-2.335246496339876340e-02,1.789470005007386686e-03,3.620872007800559483e-02,1.520671824332296869e-02,1.170065891404849928e-01,6.643394849316577866e-02,-3.175131073364477474e-02,4.499765173008991176e-02,8.533664918533154231e-02,-7.062276480686345559e-02,-8.543466424507049906e-02,-3.568478780699205211e-02,-2.452166087451383356e-02,-1.054277690509682411e-02,-2.892577732592585896e-02,6.763219661054900578e-02,7.428741165549467354e-03,6.089718424647116990e-02,3.109758211254815691e-02,-1.780285856137079140e-02,-2.741739655942727547e-02,4.195492610121171612e-02,-4.342657639135084208e-02,-5.927707659444412212e-03,-1.429875306977447091e-03,1.548767093748411490e-02,4.419474843826105143e-02,-1.660357703504295249e-02,-1.145740152139167189e-02,-4.013479095485312370e-02,-8.593959336649451344e-03,1.857149388576178131e-02,3.000917591268391317e-04,-7.728158426206478693e-02,7.453507625866021002e-02,5.713026015834012442e-03,4.223801592954271739e-02,5.169627479092164801e-02,3.315736268109596013e-02,-1.597260572228708861e-02,5.955768152748572644e-03,3.500492017847682547e-02,-4.683021088679151928e-02,2.019010384905347080e-02,5.780158746554352710e-03,6.403504383077148095e-03,-1.670142608867307421e-02,3.276937186677610081e-02,2.365479387139501899e-02,8.037042529541747748e-02,-1.418754756118105302e-02,-1.092985532203268571e-02,-5.301709484174300935e-02,1.656829490980646011e-02,-4.053147326964006564e-02,-1.234421978494366912e-02,-5.204133753994886341e-02,1.368706200705388509e-02,5.127862079394496231e-02,-2.236826145754198039e-02,-5.963152643504350710e-03,4.364195099624202517e-02,-1.089214684667249265e-02,-2.943216424857039541e-03,8.841864045962247523e-03,4.018561776578932071e-02,2.397613586016445614e-02,-3.926538435046812020e-02,-6.011790197680958597e-02,8.532891193175291822e-02,3.652683429734596837e-02,-2.529666050677430861e-02,6.052108754713903666e-02,5.256563248431288249e-02,1.673718853863754435e-02,-1.454261580300346586e-02,2.004992200218887535e-02,-6.070521983756015788e-02,-4.722286115825515690e-02,-6.858075270203921325e-02,-3.445364920846652468e-02,7.047904427627417479e-02,-2.376968003481423619e-03,-5.230152341440470060e-02,2.593204556838463529e-02,3.226995771202735563e-02,4.814440251397906351e-02,-1.777481747524680203e-02,2.984341467926764774e-02,-4.951583657105828457e-02,8.505858482154615707e-02,-3.782631971190437981e-02,6.449821441590469773e-02,-2.582695391838880222e-02,-3.739683895030422589e-02,-9.187068107831838568e-03,1.446487677506449673e-02,-5.117367342474111840e-03,3.064838766953386501e-02,-5.394868462753738686e-02,5.430008765800734688e-02,-2.992302819531917832e-02,-4.752598046101373652e-02,-3.478958709639495828e-02,3.658101251568463691e-02,-2.098941131455073217e-02,-3.428350881028396913e-02,5.736507330069961011e-03,5.220291611301114496e-04,5.439850144828350248e-02,-2.604887907146924420e-02,1.488126477421658662e-02,2.712230376530894507e-02,-3.202942621949155660e-02,-7.004029366232251974e-02,5.593578581846662956e-02,-6.642966451864643074e-03,2.316531669217506556e-02,-6.757854587171666094e-04,-3.417978089331896729e-02,2.661604061401428439e-02,-3.780907662948802643e-03,-1.426398849358997793e-02,2.238160228266002430e-02,1.357706397631581498e-02,-1.908268340166870483e-02 +4.557475773817580567e-02,-1.947262345131792888e-02,6.255314406560173734e-02,4.451021492077150699e-02,-6.076559788643630389e-02,2.909691639360225887e-02,4.644640419908383638e-02,6.501108556369846261e-03,7.679648618717413097e-03,4.487740234845703086e-02,2.411647408298369863e-02,1.908644355093017456e-02,5.284998143570900780e-02,2.502127779742618907e-02,2.588901472180878821e-02,-2.091416561065018512e-02,-7.844365619155488009e-03,8.366180312150897636e-02,1.555093517962847713e-02,-4.777550243686455589e-02,1.390820589183493737e-02,-3.738448771101683926e-03,9.549191581618740599e-02,-1.999137394511706425e-02,-3.414483429480755488e-03,-7.044224443288313320e-02,-4.516156455248960394e-02,-3.182824310210927848e-02,3.503611774610271550e-03,-5.120482954162330902e-02,-5.215836710254779206e-03,-7.204662640469312873e-02,-5.100170123077313322e-02,6.765866637126256855e-02,2.430026772859637026e-03,-2.333454912694188019e-02,2.309540167705525018e-02,-5.474429767624177517e-02,5.518733545958581788e-03,-2.289307545959074278e-02,1.146543794321553365e-02,7.954070309705259245e-02,-4.917388975099544479e-03,-5.222937330980331229e-03,-1.713407183915298046e-02,2.028757497724392039e-02,-3.631453378032627882e-02,-4.456119440175011076e-02,-4.087358906320381208e-02,-9.042844358721240094e-02,3.646147897808530510e-04,7.447232111580788516e-02,-1.877907287008921330e-02,-4.605186662618760557e-02,2.730707855159789435e-02,5.280158293560440613e-02,2.365692994449822978e-02,3.766590685420497658e-02,-3.426971884906228338e-02,1.000128662438430488e-01,-1.278895951647744840e-02,-3.239939173196218491e-02,-4.188694468273423954e-02,-1.830215941599756119e-03,-2.246360045599395464e-02,8.665422638653043352e-02,2.787381494483088390e-02,2.032720665699610726e-02,1.064255938256547344e-02,7.663956892228408757e-03,1.830451847186096229e-02,8.496252189118078113e-02,-7.369551230516023510e-02,-5.321385494182682930e-04,1.368976805231283088e-02,1.207434038572485118e-03,2.420726436144862020e-02,2.926679831124003386e-02,1.794315391959435194e-02,3.440837786294296402e-02,-3.636244784237795125e-02,-2.015020631806286114e-02,3.815561124730010994e-02,-5.048118406457841219e-03,-1.319535312914344068e-02,-9.377614235507364306e-04,9.774064772640502635e-03,-5.707129161456283434e-02,-5.042080245170716540e-02,1.823136729662739805e-02,-1.944867390869573984e-02,3.993015407080900692e-02,3.759976214796932614e-02,-2.278364425981672242e-02,-4.677855303706439372e-02,4.723283885648739411e-02,-1.185582232658866225e-01,-1.339334216680129232e-02,3.440094083912333817e-02,2.372720485659260067e-02,-2.788468613365237617e-02,5.358964365187671858e-02,-3.081292321837841332e-03,-4.897762241929754651e-02,-3.262074214480058937e-03,-1.627107558648493296e-02,4.798343380313233736e-02,-8.226905242206176971e-02,1.022112748228763829e-01,1.364977756678868899e-02,2.810978532403922078e-02,4.493857951772492498e-04,-1.723255773036766469e-02,-7.858034057553732465e-02,5.227884140282795106e-02,2.582928394550488768e-02,-2.454353369819726668e-02,4.366834433966191448e-02,-3.138326032380241160e-02,2.799728055408897201e-02,1.988688213750439398e-03,-1.817454684572743576e-02,4.856575621268879352e-03,2.286681600018594662e-02,6.077600328592573653e-02,3.471151312387930205e-02,-3.932963405699469589e-02,-7.198672958867162897e-04,1.438724643963581193e-03,1.228925408609691204e-02,6.477607740714367256e-03,-5.983334719061263185e-02,2.507658977400891408e-03,-4.894793408761569792e-02,-7.560190198125452121e-02,4.048417369181923908e-02,1.757859296794951273e-02,-2.812731663330850576e-02,1.308221505247337060e-02,6.162098920820929804e-02,4.767532982720106699e-02,-2.343771340317859532e-03,-5.378778314151393819e-02,-3.380235292197422063e-04,1.790384299823336717e-02,-6.674746372680526174e-02,1.959065941075839243e-02,4.311444688267714043e-02,1.386656115656465307e-02,-1.108378495366253297e-01,8.045825845270894450e-02,-6.168881259361237018e-02,-7.732066797047677797e-02,2.328383285995351895e-02,-3.930181922786753212e-02,2.884322343300159061e-02,-3.932473316514328160e-02,-5.386181703642043544e-02,-3.312011310204258235e-02,1.446457606394208062e-02,-1.799588396495006176e-04,-1.596638060335219683e-02,8.273742186299541668e-02,-2.196794179976367320e-02,1.722144002997045426e-02,-3.062755040899012293e-02,5.579872818759496617e-02,9.313141503318685165e-04,-5.711068900706906676e-02,-2.033650657941140499e-02,6.227340222975730893e-02,4.596184864161191944e-03,1.242156048116778693e-03,-4.030739635928239084e-02,1.145120902742415535e-02,1.846189913717927525e-02,-3.337060548914782404e-02,2.550649652168339096e-02,3.631204271783849968e-02,-4.065269533421073632e-03,-6.088403658271834828e-02,6.481300501746180276e-02,6.746828533970397612e-02,-3.495063793879831654e-02,-4.280247703820165561e-02,1.428320142050737776e-02,1.276701285835113095e-02,-6.691046242170962943e-02,4.888621690241236458e-04,1.388685262080261926e-02,-4.975048715530656918e-02,-4.866847368578696743e-03,4.561222101487277109e-02,3.369365110066945609e-03,3.768714164284764356e-02,-5.073082537820010340e-02,9.379756439966186257e-03,4.216125516061641765e-02,3.406131529451646850e-02,-9.488022428136215491e-02 +1.570219545712688361e-02,2.696520698780244599e-02,2.503662042159636794e-02,1.699117641926004008e-02,3.879277697827777927e-02,2.845672442014305151e-02,2.470414925645533430e-02,2.554362361943645840e-02,2.941842452855450082e-02,5.726496173893346614e-02,4.088991270120864718e-02,4.085145772705326556e-02,2.637106770651160073e-02,6.990194768338434117e-02,4.222693798795042197e-02,2.712482554188147543e-02,2.014224926977696561e-02,6.331478728881891060e-02,4.120273440669271897e-02,5.190925726108659016e-02,1.685995771063441423e-02,3.100705734313061179e-02,4.233315238015911836e-02,1.725065983505941550e-02,2.008725848743633108e-02,7.964261535146277549e-02,1.866632032625174104e-02,4.483250155114415492e-02,1.285202625748475998e-02,3.008300669962854154e-02,5.431002180104469584e-02,3.422582129609347268e-02,3.228468472290693669e-02,6.924399801417922828e-02,3.083352488172707781e-02,6.452702942079872883e-02,2.812759702910338014e-02,2.471968770024183734e-02,4.710195307286868527e-02,4.498657353972738276e-02,6.397613746865041251e-02,5.140270435875149424e-02,2.720958510589983198e-02,2.183935362660992252e-02,4.926237142347758557e-02,2.602344247130721974e-02,4.605765546591394921e-02,1.489991231363761715e-02,6.143864921395147949e-02,5.239165951462118609e-02,4.755084395732521452e-02,2.766946658038802256e-02,3.245953523582775085e-02,3.959672026778400522e-02,8.450156932286408129e-03,2.366342186055376412e-02,4.062602777929714276e-02,4.533509635134053140e-02,2.308609890306978149e-02,7.377788628123950476e-02,3.377569773574560369e-02,5.511186413285364127e-02,5.218163578728569202e-02,4.122231240992527135e-02,6.904551685964663288e-02,2.003153829953487758e-02,2.637998784743298894e-02,1.326173643518574821e-02,1.832695309303448636e-02,1.209395218523403280e-02,2.224305092522295066e-02,1.304113797186675153e-02,3.508451322538659600e-02,2.347159992620281160e-02,1.255807146170048044e-02,6.133206107480828478e-02,7.250139795915887253e-02,1.362666585512251234e-02,6.180435832942904328e-02,7.042063661754202619e-02,6.456401237808380433e-02,4.568785352127519711e-02,7.165650957990959968e-02,5.334883930038924332e-02,4.184426215901947133e-02,2.376490515422354996e-02,2.738592060516829851e-02,2.652476545457584101e-02,2.751232367509703208e-02,3.636496610435525911e-02,4.795363405096619153e-02,2.017699056108436875e-02,1.259810948218068744e-02,1.780216431480707157e-02,2.455693886545807017e-02,2.514040146381155832e-02,3.691637793712341381e-02,1.700389865416490273e-02,2.787467453418148236e-02,7.956055035661896424e-02,3.568140955597689373e-02,2.248627844389908259e-02,5.064549862795780094e-02,6.277958140283942945e-02,2.928070256297268456e-02,2.466473892666456308e-02,4.006755969904176456e-02,3.526417042122071549e-02,3.267552666447239018e-02,8.688258447433309939e-02,3.544013093775506829e-02,4.762928413194156968e-02,3.005313766113244106e-02,2.258506635366052534e-02,2.759927673605066384e-02,2.499085924135260872e-02,6.099530442709023836e-02,5.806733652529725426e-02,2.068997292349123232e-02,2.114476865099765984e-02,1.053667590908346705e-02,5.497969758337580698e-02,5.532441034033285659e-02,3.932984523539107685e-02,4.048538235851461414e-02,2.523463184424811281e-02,2.690577388318477273e-02,2.711270120556047436e-02,5.623794158332995341e-02,3.049046469846770913e-02,3.551924405412586194e-02,2.648547028978587986e-02,2.458774371600894529e-02,2.558571491344794821e-02,2.171889357474867180e-02,1.413801225685188366e-02,2.460387908104220284e-02,1.337846555674696881e-02,3.512627711016836490e-02,3.293071061469524108e-02,4.087865496070002685e-02,3.041332809667588247e-02,3.638448803809346543e-02,2.792521970453686400e-02,4.752314770131371713e-02,2.072989620642172112e-02,5.189743351756513634e-02,6.251597444237776136e-02,1.880774842480080478e-02,4.777697846470879001e-02,2.924334491629416305e-02,4.163158737373310464e-02,3.404834311805531033e-02,1.017217897523013254e-01,2.391322979109987770e-02,7.306061021764431729e-02,2.822205762548618199e-02,4.158983429465770015e-02,3.966697288636806401e-02,4.202715468842890822e-02,4.101482293617521313e-02,7.159962384167625760e-02,1.502199050216513829e-02,1.134655857465393172e-02,2.065371131739635047e-02,3.671738942956877944e-02,3.381869927319763186e-02,2.228697724549738232e-02,1.988164854407459270e-02,5.786311217050953831e-02,4.071978446916500738e-02,1.858352622233706147e-02,1.328382876775135654e-02,1.021524073275334038e-01,1.966591578127725032e-02,6.421744577759253003e-02,5.292347337605769926e-03,3.686343962943575830e-02,4.237468890929251691e-02,1.720316337758386049e-02,4.210032936641346091e-02,3.661645643237894376e-02,3.016349764178193407e-02,3.657107949574943395e-02,2.684629288160377686e-02,3.216816661822406026e-02,2.854828804860468083e-02,5.105377883999705907e-02,8.541297798311962841e-02,4.540021773980872088e-02,1.543794947610022117e-02,7.426347014381132206e-02,3.277533770184707512e-02,5.139648474763557767e-02,3.713094383950900357e-02,2.884631087795111459e-02,2.582421257977027956e-02,3.045318857502783000e-02,2.444772585203119561e-02,3.290740173570715771e-02 +4.318905267856263525e-02,5.492372022481478711e-02,6.413949980838884457e-02,5.358004819364293320e-02,5.314009540549152061e-02,4.412066389769505464e-02,5.681082015452042916e-02,3.578773030433454044e-02,2.768420087377392383e-02,6.226139160774066955e-02,5.305636756126520109e-02,5.551415056400645087e-02,2.443144897390853165e-02,8.406598248766740389e-02,5.435584112431057074e-02,4.047503288163036006e-02,3.999593358323955128e-02,6.388598897415129207e-02,7.785862694586941080e-02,7.983925829908562755e-02,5.103566326890564969e-02,4.069425237061091716e-02,8.386279652924627515e-02,4.846312337215844673e-02,2.736034751109650207e-02,9.496492386480825942e-02,6.604901993787822001e-02,7.234855465958389686e-02,2.878481802765525677e-02,2.991290454654404324e-02,7.838155182624716166e-02,5.405028082783044918e-02,3.541782387931755732e-02,9.406732238292378478e-02,5.706774890789251264e-02,9.694970666757343758e-02,4.484273098410602315e-02,4.121052217146209395e-02,5.133128097485899211e-02,5.581694253289758850e-02,7.442293587283653478e-02,5.218505957374777043e-02,3.181682898184132191e-02,4.840305138911483313e-02,6.238442537335418814e-02,6.389594612701259002e-02,3.932935836570443378e-02,3.186731569281802540e-02,8.150740484296042920e-02,5.243812183147621847e-02,5.045426323977577482e-02,6.773476479685761054e-02,6.263519815618995290e-02,4.261755927518953713e-02,2.910835961436633937e-02,3.961992738502157635e-02,4.418745599921355266e-02,5.853517447411057256e-02,5.156720195123604827e-02,8.084515042220712100e-02,3.864444111795618114e-02,6.347393196247164138e-02,6.804372176122860938e-02,6.634066043195918638e-02,6.498420145256539326e-02,3.658854260081549625e-02,3.734218383053763968e-02,1.117206309907416324e-02,4.472913885673059087e-02,4.425881632610310229e-02,4.226575313336657092e-02,2.549376143489717750e-02,3.604632413990589007e-02,2.971352004899862481e-02,3.592741651103576600e-02,9.234173143715432297e-02,7.893232722114346123e-02,1.100682584484828121e-02,6.510469431137433372e-02,9.304311111969296166e-02,5.099784592966447039e-02,5.928033032415185033e-02,7.607673981993735846e-02,7.516615173552147755e-02,5.674295946451367312e-02,4.619398125271863276e-02,4.391129089838457372e-02,2.582990695252930513e-02,2.245941175636089956e-02,4.339980282516908011e-02,8.535256125781856551e-02,7.414893793028379254e-02,4.257329553212191309e-02,1.509502379025896499e-02,2.852790038629149719e-02,5.850571363190651408e-02,6.832640810027246214e-02,4.597105442392788316e-02,4.700452491223875567e-02,7.358854379957258107e-02,6.716339822214695277e-02,1.864667402136040500e-02,8.814676449377832623e-02,6.360789489294142729e-02,3.273590665985080111e-02,2.803398516023504136e-02,5.086734495595821720e-02,5.186975902086413820e-02,7.442082975079220009e-02,1.003662204162330263e-01,3.927970623537776346e-02,5.204570378620946430e-02,1.962262215282336089e-02,7.567681829658103043e-02,5.937119595713996612e-02,1.715151600085662933e-02,6.259761382034428889e-02,6.442052974805347054e-02,2.926302327193251382e-02,4.523230876572760517e-02,2.355575785451865731e-02,7.434497364998216007e-02,7.902579345119739584e-02,4.249289350599931570e-02,5.195103375825411984e-02,6.614715473896461140e-02,3.892937914611247635e-02,3.929546202415820644e-02,9.544316913282899217e-02,5.465758981214253326e-02,4.536492198683210464e-02,7.271134758607214477e-02,6.280231108089984193e-02,4.374642967687637080e-02,6.268653888615556558e-02,7.143234465607709027e-02,3.299877845576051211e-02,2.002274767806024730e-02,5.883471491732476799e-02,2.116694460739623751e-02,8.617589399827289831e-02,3.447915453789287404e-02,5.200661423863620070e-02,4.504112445970862022e-02,6.556021415886129078e-02,9.400316729777691283e-02,8.903937209432032096e-02,6.482198964506193095e-02,4.548274061620407455e-02,1.021344721980392556e-01,5.322111465328299706e-02,5.797102466596838061e-02,4.728079810641323821e-02,1.457721202080214662e-01,4.898675179150022152e-02,7.081479003940818751e-02,4.820358542310471811e-02,5.261377393496559363e-02,5.157468343714965986e-02,5.930603954332815120e-02,4.265717882652329818e-02,8.852462398155343248e-02,2.726240733199177327e-02,4.578539637328191136e-02,4.761942065290184628e-02,4.706149933878714386e-02,3.397928669891221026e-02,3.312218035354448642e-02,4.156154346542587086e-02,7.044102150295838971e-02,9.838961539450263860e-02,3.171552745456748812e-02,4.847556361656332746e-02,1.123254704525379483e-01,4.706170830387844395e-02,7.349042896070338837e-02,5.272001946451183169e-02,6.171734496135825726e-02,4.243712239597211694e-02,4.347065447071778860e-02,1.026378289418241191e-01,4.828095148686034621e-02,4.512789827460179926e-02,5.308470072186128458e-02,3.157047187106830355e-02,3.602247005617257442e-02,5.817946293888907883e-02,7.048898178877886778e-02,1.010714440753881366e-01,4.952963204963088673e-02,3.733067984252084331e-02,8.195659260017570946e-02,5.391810733478625411e-02,8.172382190526152057e-02,7.416464302775979678e-02,3.352832015628937068e-02,5.399697090247683462e-02,2.130357609845866251e-02,5.170273952772713039e-02,6.265584990093044093e-02 +6.129342177032404831e-02,1.001143786336243097e-01,2.668592280980690637e-02,3.763066823457588556e-02,4.906405999329543216e-02,5.340982777069330084e-02,6.844878336142701247e-02,6.419462793034642900e-02,2.456123111431775252e-02,4.171294283002293518e-02,2.732135559991342305e-02,7.402022532777451092e-02,8.709384238429761227e-02,3.630082580222023653e-02,3.468703057257444683e-02,6.403657958694287944e-02,3.309261843936458364e-02,3.684943296349859482e-02,4.871256943969112102e-02,4.201729441887305794e-02,9.422881977215047389e-02,4.570194422524297834e-02,7.738462584202923655e-02,3.237426968029900182e-02,2.324520717033240133e-02,8.025665214123454960e-02,7.385359611427168292e-02,5.998192404411941542e-02,4.914434148609596320e-02,4.589904425324495968e-02,8.291689234774471395e-02,4.666062729843128976e-02,6.444549592674272964e-02,8.489275576838560544e-02,1.824487234014109116e-02,3.505859308549622022e-02,2.627021974213893107e-02,2.922173377113067641e-02,6.015880968074224094e-02,6.200547222044530682e-02,4.820729274771817785e-02,5.773325891469879845e-02,3.771209665554787344e-02,3.562780371186997919e-02,4.010875538430603432e-02,6.955101046402462073e-02,1.069008113131153515e-02,6.817786108639498077e-02,7.864377548879046553e-02,4.619847434725109919e-02,4.944780845413063869e-02,4.088831268945453123e-02,8.001496426643565918e-02,4.092955112337336859e-02,8.604286504846894723e-02,3.017252766733429653e-02,5.128111652406341925e-02,8.244938020777940746e-02,5.812886273371943580e-02,7.217715232229776623e-02,1.706893790721289092e-02,4.405964646927545275e-02,4.665167459740632294e-02,4.691859298577501225e-02,9.306859054831853606e-02,5.821056065943929630e-02,2.950837857388785568e-02,4.219064289900471137e-02,8.407997219581581083e-02,2.859289528283973092e-02,6.196093845719322785e-02,4.424471271065454764e-02,5.162121008800208549e-02,6.977748275711853632e-02,4.669666211791451832e-02,3.465605675003062547e-02,3.232070908095402428e-02,3.904251651479350577e-02,7.836201493844553723e-02,5.653504244490007574e-02,4.158678876244590455e-02,3.651159593507746076e-02,8.581071457129876845e-02,3.810077231611622151e-02,3.482982790345068302e-02,3.291415879681505730e-02,4.096386182182006064e-02,7.311113807514915686e-02,6.054395614977237799e-02,4.437520867531510177e-02,7.673701094505305798e-02,6.428670965031665907e-02,4.657901646412127006e-02,5.633727596572300073e-02,4.143541854256219126e-02,4.245717838366087210e-02,5.720788803402725858e-02,5.864250344598098685e-02,5.184684995570482818e-02,3.051937842661155489e-02,6.432293399734000106e-02,3.196710225840589809e-02,4.864402815373573136e-02,4.511300240460426603e-02,3.494180612978787376e-02,1.170748954977257790e-02,8.914950534009959127e-02,4.446475986489228233e-02,5.626834226628050356e-02,1.076650956611328591e-01,4.997047592671170768e-02,3.387914071804960792e-02,3.765110908083657559e-02,6.647688133106006980e-02,4.140224382252237489e-02,2.723409625952374208e-02,3.448606139250441627e-02,5.000749205831810096e-02,5.297529794858839985e-02,6.536791987420224881e-02,2.863083064335238473e-02,6.829453119820082241e-02,6.313942719335048637e-02,3.207637713245005406e-02,3.834920771382410026e-02,8.561478275561992812e-02,9.637442063441709061e-02,4.957719943212243741e-02,6.796956388427166651e-02,8.757386372122087648e-02,4.586415351477057811e-02,5.360241092472314145e-02,8.103710516404842579e-02,7.236095702274657204e-02,6.337198941699331844e-02,1.032811468242333525e-01,3.212565975936683416e-02,5.662803176038225944e-02,2.598206904489853974e-02,4.425278581884129619e-02,7.894944953918239805e-02,1.067109992851567601e-01,6.461161643560417445e-02,7.602334684684174115e-02,2.641377868947760235e-02,9.073261474972521556e-02,2.590241918123370457e-02,4.413050448152561200e-02,4.303349857912992099e-02,3.749672810989703592e-02,5.135807493661059819e-02,3.604845040799160155e-02,4.301093988455976375e-02,5.867150883100441527e-02,3.892933459496634996e-02,4.803034964376138444e-02,2.459378665111925863e-02,5.275285209764827427e-02,5.132230064716975654e-02,6.459227539117004535e-02,4.996296133490161356e-02,3.247702232115247389e-02,5.399552825333105155e-02,5.053635969599428596e-02,5.205050193013534277e-02,5.202541380673333937e-02,6.813317834717000365e-02,7.093406626094815592e-02,4.341660469476293222e-02,5.865709570237917503e-02,6.930079182401761850e-02,8.697477381012878872e-02,3.525428379634296810e-02,6.248509343447205405e-02,4.686659286435420485e-02,2.576422688365208671e-02,5.992242579726889812e-02,4.677468780882300392e-02,5.589809740006595334e-02,3.978751863452877763e-02,1.018150346508262943e-01,4.586756251919219679e-02,5.288672110589721226e-02,7.928746924464941115e-02,7.801139840367256328e-02,7.183944592155269704e-02,5.236730538147999631e-02,3.420799857800620875e-02,7.089278462806899994e-02,2.291102666515592093e-02,4.244024721672758765e-02,2.906865784963466245e-02,3.688560355447328964e-02,6.140919994261459514e-02,6.272747808185383245e-02,5.751179432899017341e-02,4.015483172951935659e-02,3.173807546086536424e-02,3.817749220253431608e-02,6.418395749445150733e-02 diff --git a/tests/test_data/pca_dmodx.csv b/tests/test_data/pca_dmodx.csv new file mode 100644 index 0000000..7c61abb --- /dev/null +++ b/tests/test_data/pca_dmodx.csv @@ -0,0 +1,50 @@ +9.547376961753462066e-01 +9.134740377440152548e-01 +9.842701383396834647e-01 +9.836699856730368730e-01 +9.326253893852096688e-01 +1.001708853877684602e+00 +9.025494297656555531e-01 +9.218346863457997920e-01 +9.843910690320103463e-01 +8.995566039350099130e-01 +1.026222835362880170e+00 +8.955576038509589498e-01 +1.009725911484453675e+00 +1.007834747199417791e+00 +9.539441176181948645e-01 +1.028741229385197853e+00 +8.642982065052304819e-01 +8.836940372455542869e-01 +1.023890341453291164e+00 +9.974846455984128779e-01 +1.039254082586831496e+00 +1.012418347832000132e+00 +9.283675994460589553e-01 +9.822058819958369158e-01 +9.934262141600184171e-01 +9.673194962164211042e-01 +1.064093641416990144e+00 +1.002620298536794019e+00 +9.636817480969475103e-01 +9.136389972525551517e-01 +9.220140398107449231e-01 +9.295380941017938881e-01 +9.390269790418417362e-01 +9.599846518180223942e-01 +8.803473498642546691e-01 +9.449256342528226105e-01 +1.003120926502196975e+00 +9.301976094030653952e-01 +9.469911129479037237e-01 +9.612956184120269310e-01 +9.655866608148460095e-01 +9.245286067378550854e-01 +9.805635267834800217e-01 +9.215028436139562906e-01 +9.012275003721835764e-01 +9.367326031629195082e-01 +1.022791253922555654e+00 +9.879571060789544834e-01 +9.490283072078524729e-01 +8.535581206675064703e-01 diff --git a/tests/test_data/pls_betas.csv b/tests/test_data/pls_betas.csv new file mode 100644 index 0000000..e434a65 --- /dev/null +++ b/tests/test_data/pls_betas.csv @@ -0,0 +1,200 @@ +-1.674513092061086922e-02 +6.381051733661757819e-02 +1.065227472421580515e-02 +3.346870675391705290e-03 +-1.427334254916423975e-02 +6.569500166303836319e-02 +7.281314810589848384e-03 +-6.201410075608012468e-02 +-3.173384700688089421e-02 +1.032402742510815305e-02 +3.467555430476414267e-03 +2.064564965515705564e-02 +3.403098616044916702e-03 +3.783429416627589331e-02 +-2.787488873378988347e-03 +-3.561716089901897225e-02 +1.126575683989128329e-02 +-1.900302572870866263e-02 +2.604550578423189822e-02 +2.489149987742058506e-02 +9.758052839553506275e-03 +1.851878833098708280e-02 +6.562814342591065386e-02 +2.991483221214649713e-02 +9.927121281124419439e-03 +-8.985658189418363473e-03 +4.115822675201876932e-03 +1.303034521605426002e-02 +-2.977537879518609570e-02 +2.234220072518418310e-02 +5.469329777701221335e-02 +5.102661855502343274e-02 +1.814298565290684007e-02 +5.011093117923179352e-03 +-4.634310132988119640e-03 +1.128005735166679770e-02 +4.661724799938300745e-02 +-4.982126107831993250e-03 +9.034842402921794413e-02 +1.530888649750023790e-02 +-1.978683599887670966e-02 +1.949295771858360754e-02 +1.824646935631036443e-02 +-1.504658772146159201e-02 +-2.542584436830095523e-02 +7.749675922316603006e-05 +-1.335843132970728452e-02 +-1.142694341038918981e-02 +2.129334342850567816e-02 +-1.531785444871861662e-02 +5.533044602092716813e-03 +-3.085767737845927783e-02 +4.166221251186095348e-02 +-9.033136418974265641e-03 +-2.724782614505988701e-02 +-1.714501026261514016e-02 +-5.738702102858050241e-04 +-9.324947911327029562e-03 +-1.629316873403144350e-02 +-4.476680613700668998e-02 +-1.924537438983084381e-02 +2.933780441443945008e-02 +2.608750156724396266e-02 +2.960726442148307012e-03 +-3.273367552497733618e-02 +-3.914848346245448397e-03 +2.634859315283939393e-02 +-4.213482319880740984e-03 +4.727083622664947360e-02 +2.076646267466488328e-03 +2.309119285318981390e-02 +4.128217511480737623e-02 +-4.673258316381567658e-04 +-1.199750165452099886e-02 +-2.152128112593101536e-02 +-3.933017618114514197e-02 +3.690857928042425018e-02 +-3.835599501037467024e-02 +-6.998301989199540163e-02 +5.172107162722275331e-02 +2.504937060061642601e-02 +1.495109790487849331e-02 +-1.430419252136162778e-02 +-1.395058627240414531e-02 +-2.135244327595241243e-02 +-1.223263743540846035e-02 +5.408672528633118835e-04 +2.573634705303343845e-02 +-6.717933367616337262e-03 +1.887584506103862081e-02 +3.433244847515343201e-02 +2.191801841848224630e-02 +3.757487889227023592e-02 +9.061154794924283773e-02 +3.769497662103861446e-03 +1.467904543393474051e-02 +-1.404384088275271655e-02 +5.419292581157929972e-02 +1.059971392011506246e-02 +-2.739008316694563350e-02 +2.637388642452629522e-02 +-2.629453047320832321e-02 +2.238061249520764684e-03 +-4.685894855002829817e-02 +-5.779797753214743761e-02 +1.174730618235341958e-02 +-4.690239881891848650e-02 +7.723071122123467691e-02 +-1.899724627280966610e-02 +-3.937686008504235648e-03 +6.697315923635635548e-02 +-2.183953002037516966e-02 +1.223964984671004064e-02 +-3.622066832997462849e-02 +-3.063559626483304890e-02 +2.397232741060550953e-02 +3.584148836742480360e-02 +6.902796383752369397e-03 +-5.794263745288690676e-02 +-6.049739406711680985e-04 +5.971673455482764958e-02 +9.707908571682000165e-02 +7.400507260034294710e-02 +3.151794532028705936e-02 +-2.001955588252358337e-02 +-2.180641600359188928e-02 +1.003215910792861973e-02 +6.935094107522482391e-03 +1.727776141753912392e-02 +6.244629363326368449e-02 +2.197266711183865073e-02 +-4.324477311171820437e-02 +-3.656672218824459641e-02 +5.072512987117017147e-02 +7.364669242102661606e-03 +-3.885205633225091715e-02 +-2.324252017736764056e-02 +-8.930061590119045198e-03 +3.050361679217159210e-03 +-9.930350861138005636e-03 +1.654016411562910308e-02 +-5.144867161974704672e-02 +5.595418554995535559e-02 +6.319904084475350126e-02 +-7.430142509107320881e-02 +-2.609810830760637967e-02 +-4.900717000544331514e-02 +4.008453894359649550e-02 +4.221123776572126979e-02 +-2.247418709055682556e-02 +2.188795474952334036e-02 +2.438757751424040082e-02 +3.288226951192740888e-03 +3.606145850195170699e-02 +6.284329873848852827e-04 +-5.238934281849229498e-03 +7.835619795188351194e-03 +-8.543461480753579418e-02 +3.914857789633053448e-02 +-2.255600144459325718e-02 +-1.325353693664368254e-02 +-2.318974577832596043e-02 +-8.305022351738101938e-02 +-2.546238242999676257e-02 +-1.529308734359976531e-02 +-3.449135498610384626e-02 +9.274583969900027786e-03 +6.268654272853198609e-03 +3.097152742840471318e-02 +1.897937355085733968e-02 +3.072121283174233941e-02 +-1.784926561285942598e-02 +-1.711230805833728608e-02 +-6.023818269418949184e-03 +1.394165933540217860e-02 +2.538383264779345977e-02 +-6.164818518486724769e-03 +-9.728540136505725924e-03 +1.811019123268079942e-02 +-2.061036564507966878e-02 +-1.971990793150094068e-02 +5.043820466786677961e-03 +4.756656126537225915e-02 +-1.769210262443471002e-02 +-2.386321673373085345e-02 +3.711331836965944819e-02 +-2.655579216614718796e-02 +2.671795844199740394e-02 +1.103352963092090952e-02 +1.006855281108964550e-01 +6.499913031194026920e-03 +-2.671876809201738368e-02 +-3.217777847150809362e-02 +6.934771215165223823e-02 +-1.732847562592464488e-02 +-2.568700679373409068e-02 +-2.971534139552490378e-02 +2.512791339130080945e-02 +3.027687762150269371e-02 +-8.551355889434869573e-03 diff --git a/tests/test_data/pls_betas_mc.csv b/tests/test_data/pls_betas_mc.csv new file mode 100644 index 0000000..09aebc7 --- /dev/null +++ b/tests/test_data/pls_betas_mc.csv @@ -0,0 +1,200 @@ +-3.162409646148057085e+00 +1.571241849876504482e+01 +2.762858189877519521e+00 +1.145225787431766840e+00 +-4.431210541624090560e+00 +1.489368798441972253e+01 +2.815849621725142971e+00 +-1.551300324028225575e+01 +-7.579400623424970007e+00 +2.958464179598799149e+00 +1.478591247894270211e+00 +4.949454119762785709e+00 +1.192331676960884268e+00 +9.449863811771489708e+00 +-2.548224218280750630e+00 +-7.793243722507328997e+00 +2.361548405749858581e+00 +-5.706767792068434098e+00 +8.701156636540664735e+00 +6.107490644921222511e+00 +1.831696999516780000e+00 +4.870129861308066133e+00 +1.726607268685754093e+01 +5.839412467582866917e+00 +3.679448721230400565e+00 +-2.087005294053223992e+00 +1.687465199445498332e+00 +5.469734056582082005e+00 +-7.868852259628056345e+00 +7.194463851654624875e+00 +1.396083195339416605e+01 +1.139971837661097709e+01 +5.505423526395254896e+00 +2.103493105506496708e+00 +-6.741773631196212868e-01 +2.641302474244942911e+00 +1.165098506209731077e+01 +-2.149008910020802077e-01 +2.276348828079551012e+01 +3.096891499374472723e+00 +-6.119322747764766035e+00 +4.251731809920744176e+00 +4.424146705948748703e+00 +-3.782996392309181832e+00 +-6.549061851470947104e+00 +4.515762046062140045e-01 +-3.462394977651490180e+00 +-3.564473838494603086e+00 +6.751001743902664387e+00 +-4.906639520547090072e+00 +2.636853756457175457e+00 +-7.560819238855983393e+00 +1.178789885190146514e+01 +-2.207875761666645786e+00 +-5.588014296936929526e+00 +-4.163160092340016050e+00 +1.502532673312223288e+00 +-2.035406603838360695e+00 +-4.108081639975246446e+00 +-1.292191223886698559e+01 +-5.833286545342159179e+00 +6.750302673602444514e+00 +5.542314587195563469e+00 +-1.003485894333748796e-01 +-8.057430139401574820e+00 +-1.866386204354007594e+00 +6.300630349604503522e+00 +-9.140047992627950979e-01 +1.128957976289864007e+01 +2.664727334944403392e+00 +6.460779984740058879e+00 +9.922153501894543481e+00 +-2.459169497435707008e-01 +-2.393731612317763435e+00 +-5.521762577232602887e+00 +-1.077700245458677131e+01 +8.510901940285748424e+00 +-9.819683394608087923e+00 +-1.713504597091093373e+01 +1.122219951989291431e+01 +6.602787927683576363e+00 +4.841965906301310518e+00 +-3.093440135304278193e+00 +-3.417102417941061177e+00 +-5.080216678407730058e+00 +-3.763852798676732281e+00 +2.131193584193745716e-01 +7.522337942576777792e+00 +-1.925798952263422459e+00 +5.720431112455613309e+00 +1.040061038692331508e+01 +5.145366282745054143e+00 +9.951405607069728987e+00 +2.149484365908579875e+01 +7.858953922502607270e-01 +3.803171271522480357e+00 +-3.999753398457007947e+00 +1.439368425393860385e+01 +3.644548591515735403e+00 +-6.528106980740986387e+00 +5.617692407710091373e+00 +-5.738379738278617914e+00 +5.781509062520346909e-01 +-1.167512974856875196e+01 +-1.464774062907670249e+01 +2.265553600148271229e+00 +-1.258160515006534474e+01 +2.171878229791522585e+01 +-3.906093289085390552e+00 +-1.586975152356714380e+00 +1.874352771823000552e+01 +-5.820911274440009109e+00 +2.523789657596673841e+00 +-7.648428173928098595e+00 +-8.026733262815438863e+00 +5.210803872652837399e+00 +7.987819787887960210e+00 +1.214459847563402528e+00 +-1.491305832072391446e+01 +-4.279202868153866302e-01 +1.348618686610983630e+01 +2.141598764809402766e+01 +1.808680056719201801e+01 +8.813101385878770344e+00 +-5.738430432937073000e+00 +-6.189466337394290640e+00 +1.860779239872185853e+00 +1.547462192930868730e+00 +4.644381250511328219e+00 +1.530170731397753947e+01 +7.213628799819104209e+00 +-1.140275687937105609e+01 +-9.882219519700434773e+00 +1.370985465318420005e+01 +4.169776614966583139e+00 +-8.684559396147459864e+00 +-5.333892761090655021e+00 +-2.103791464939418265e+00 +8.236363183637770424e-01 +-2.887288538444361841e+00 +2.645897952819777466e+00 +-1.300489781387021715e+01 +1.366839860784600802e+01 +1.640487658074396649e+01 +-1.863990234209066443e+01 +-5.971647863227482311e+00 +-1.329673874069902695e+01 +1.061330572947623097e+01 +1.126972902918114627e+01 +-5.151541511713649157e+00 +6.064054792377368663e+00 +5.261162469130562513e+00 +1.798791565592523511e+00 +8.616946144044259626e+00 +-1.937891116382576828e-01 +-1.904054830745419258e+00 +1.839836811318213083e+00 +-2.251669211440861673e+01 +1.027117488592561401e+01 +-6.247084399284829281e+00 +-3.180589352241304901e+00 +-6.819502518784008593e+00 +-2.078336054470029026e+01 +-7.385956119784853335e+00 +-3.091812717164413193e+00 +-8.637786057598711764e+00 +1.626296542687855062e+00 +1.026923375684566597e+00 +7.350000138925492976e+00 +4.058062248160482000e+00 +7.762310170379353558e+00 +-5.044908294119052172e+00 +-3.993521886064646420e+00 +-1.161439060375012433e+00 +4.082102958274182569e+00 +6.423946947220287029e+00 +-1.208529790673972704e+00 +-2.088785387012850325e+00 +4.923922252378984510e+00 +-6.743242302476700978e+00 +-3.838892117228625001e+00 +2.060588549779615253e+00 +1.214200777263048181e+01 +-4.482463647506623516e+00 +-6.018586374973902586e+00 +8.370797743807408153e+00 +-6.287262068414365856e+00 +7.823167732150189124e+00 +3.181467811473766449e+00 +2.564114589741715378e+01 +1.395028298564814362e+00 +-6.417081526168552763e+00 +-8.538143473105119341e+00 +1.838562488665504091e+01 +-4.028793353962225154e+00 +-8.085214802063385164e+00 +-8.419802228629766461e+00 +5.495679695675463883e+00 +8.894244432694581093e+00 +-2.615808554004743769e+00 diff --git a/tests/test_data/pls_betas_par.csv b/tests/test_data/pls_betas_par.csv new file mode 100644 index 0000000..43471d9 --- /dev/null +++ b/tests/test_data/pls_betas_par.csv @@ -0,0 +1,200 @@ +-2.343176999177933872e-01 +1.005211008987801691e+00 +1.748522179541228683e-01 +6.363553948700415019e-02 +-2.508782633196276479e-01 +9.904195686688088696e-01 +1.493506631505836513e-01 +-9.875639605247579222e-01 +-4.931212523182762486e-01 +1.742602304607023256e-01 +7.390258641529033612e-02 +3.215038495632825399e-01 +6.489430597456839755e-02 +5.985448891823439421e-01 +-1.009719294416107083e-01 +-5.265379196509841764e-01 +1.663819979207198929e-01 +-3.326171597672958891e-01 +4.807998788269212120e-01 +3.901400685307844229e-01 +1.357843472732248591e-01 +3.012230788486329747e-01 +1.065705421773435413e+00 +4.213130301737745831e-01 +1.961331753160056313e-01 +-1.369848986583824813e-01 +8.684877993052894651e-02 +2.748522744240617932e-01 +-4.859473927591403952e-01 +4.023338432674893328e-01 +8.751298630040805770e-01 +7.677827390185028023e-01 +3.201236191943734877e-01 +1.076765219913028426e-01 +-6.018415666072357562e-02 +1.713965988566622523e-01 +7.401231728876771498e-01 +-4.166356064602400044e-02 +1.436528077729085418e+00 +2.224708241692410493e-01 +-3.490210232143325930e-01 +2.891154643624381793e-01 +2.837332350145033710e-01 +-2.378138707337709989e-01 +-4.104292547439868377e-01 +1.379226659754043127e-02 +-2.185478684065239596e-01 +-2.027500786281775658e-01 +3.791349536163388656e-01 +-2.762551407074986254e-01 +1.303918073473580019e-01 +-4.878787132929554016e-01 +7.029055797351089208e-01 +-1.441523870963777043e-01 +-3.934661622624942012e-01 +-2.677565338869654643e-01 +4.395566411662985007e-02 +-1.425404758204975864e-01 +-2.591846154470557884e-01 +-7.649253770152198983e-01 +-3.374185999788442691e-01 +4.469944288030990309e-01 +3.838470571965935663e-01 +1.846041346315175496e-02 +-5.149787584926435180e-01 +-9.245101544505950064e-02 +4.047752982456014337e-01 +-6.117028377811378065e-02 +7.304141963768616685e-01 +1.069347628007063372e-01 +3.877610571830306108e-01 +6.410741998835344235e-01 +-1.335208323213466636e-02 +-1.705660239057145422e-01 +-3.482430185082441843e-01 +-6.513691719795656754e-01 +5.624371112252366522e-01 +-6.163833013550040762e-01 +-1.096736351352464611e+00 +7.643722139938912141e-01 +4.078028391276141140e-01 +2.712830923055570276e-01 +-2.114315044527961263e-01 +-2.188535051862146030e-01 +-3.267993383568540966e-01 +-2.170533010622943404e-01 +1.428258381941928390e-02 +4.420034140393987454e-01 +-1.140257924259987649e-01 +3.311993911029211812e-01 +6.011415337181088558e-01 +3.376430198496868651e-01 +6.122048823559967934e-01 +1.400197941447862693e+00 +5.348789845472859406e-02 +2.375783557416163427e-01 +-2.402028836678752333e-01 +8.827868924743071943e-01 +1.984840144760339209e-01 +-4.245999399716611777e-01 +3.880124994352072143e-01 +-3.916255956623834744e-01 +3.841248433931335887e-02 +-7.440305206056283538e-01 +-9.213251918600354751e-01 +1.661180450931677433e-01 +-7.718918129602985179e-01 +1.300360224409594645e+00 +-2.753298193214269718e-01 +-8.135879046383426294e-02 +1.126362964095959818e+00 +-3.608417858209445050e-01 +1.797310175034589064e-01 +-5.276669230610251393e-01 +-4.952622409945775517e-01 +3.546887341975551444e-01 +5.366626144845498825e-01 +9.177797888304119189e-02 +-9.309710170904450521e-01 +-1.667552810062528090e-02 +9.020506840547339866e-01 +1.454040413680856458e+00 +1.159848313616793858e+00 +5.286885475636486920e-01 +-3.395038353211254356e-01 +-3.710610775133601491e-01 +1.373293162473723239e-01 +1.029303879835336277e-01 +2.829996828896738648e-01 +9.811770960504346828e-01 +3.999574947491687515e-01 +-7.031229948626503967e-01 +-6.044314387228185703e-01 +8.355580722222547552e-01 +1.905291312680157112e-01 +-5.821333773256797128e-01 +-3.542540934702254618e-01 +-1.376632782009820088e-01 +4.889309945712969757e-02 +-1.717955726582987563e-01 +2.119406740254412003e-01 +-8.193070886009301557e-01 +8.802669536959966123e-01 +1.023307808376692662e+00 +-1.181549854501912522e+00 +-3.969486621912526880e-01 +-8.077321857536932104e-01 +6.536584221807106854e-01 +6.935969854211117003e-01 +-3.420034678111542048e-01 +3.672585969094814828e-01 +3.579791316957013914e-01 +8.339611209690936389e-02 +5.603052001917148139e-01 +-6.629037369381158423e-04 +-1.009697536482340036e-01 +1.206472460238301458e-01 +-1.392137508476515961e+00 +6.338414534749654550e-01 +-3.765185409689275065e-01 +-2.048562300174092965e-01 +-4.004785220580556748e-01 +-1.321432502091305805e+00 +-4.339421874903875986e-01 +-2.201021660671474700e-01 +-5.472465435478829354e-01 +1.250443906170319863e-01 +8.174890696157147141e-02 +4.790233131932097876e-01 +2.773927499175460332e-01 +4.895591302101106601e-01 +-3.010776768701634021e-01 +-2.632260418090784926e-01 +-8.700341997994320842e-02 +2.436482729998146191e-01 +4.087353875849052409e-01 +-8.473684192699044992e-02 +-1.461144823158627148e-01 +2.978292865524747590e-01 +-3.762853835060151475e-01 +-2.752091049046485050e-01 +1.068983355415791536e-01 +7.592695439589784989e-01 +-2.840777319830337655e-01 +-3.793742052013941990e-01 +5.593948964441151084e-01 +-4.086140477486372991e-01 +4.619959685650667502e-01 +1.908982595860822806e-01 +1.612236707698751603e+00 +9.423920828508172698e-02 +-4.171116962282971907e-01 +-5.258185004006235008e-01 +1.134246861072725876e+00 +-2.675823415161251440e-01 +-4.587998231907133295e-01 +-5.030327302006586399e-01 +3.730077146250838083e-01 +5.245055657078285805e-01 +-1.540748745985809076e-01 diff --git a/tests/test_data/pls_cvweights.csv b/tests/test_data/pls_cvweights.csv new file mode 100644 index 0000000..ff935c4 --- /dev/null +++ b/tests/test_data/pls_cvweights.csv @@ -0,0 +1,400 @@ +-4.020822953012154893e-02,-2.670649127019691926e-02,9.109709568444321250e-04 +1.066063001476421218e-01,-6.814329330468635315e-02,2.367550966062275698e-03 +-1.047739692576281877e-02,-6.463463990765368206e-02,5.841898718918715760e-02 +-6.954440358907850589e-04,5.416298313347656795e-02,1.597551614286976673e-01 +-1.720081571897753153e-02,7.991331629262474201e-02,8.434692563284119926e-02 +1.062729426368974189e-01,-9.377589574849316822e-02,1.605225801204705500e-03 +1.185328854342025846e-02,-1.989411651104032626e-03,2.512334481607423828e-02 +-9.994699893346033204e-02,6.519528046188619030e-02,-3.055503330469511863e-02 +-6.190117781450722029e-02,6.839258517004969187e-03,-2.108913045529732175e-02 +3.934628387314783454e-02,3.941084620359344010e-02,3.233689757985721593e-03 +-3.344551624591283502e-03,-4.465719259143826995e-03,3.053867137947643626e-02 +1.226748206690688077e-02,-6.440219577676395933e-03,1.477724621073426836e-01 +2.618875780594320107e-02,4.137785423395128753e-02,-9.025519019888196201e-03 +7.988697467787363171e-02,-4.271597906414560664e-02,-8.018324267006719797e-02 +-2.513678029284350732e-02,-3.271693927917435074e-02,1.975145307970992484e-02 +-7.659500368802754644e-02,-1.757335949067613534e-02,-2.272675618621056853e-02 +-1.121816094504227146e-02,-6.616024011022848816e-02,6.802869681579930272e-02 +-6.058083972580040333e-02,-5.941317742889878906e-02,-1.639262144285218853e-02 +-1.262912129698841833e-02,-1.566189176998792620e-01,1.057434882064147916e-02 +9.175673026715533420e-02,7.285538217511751402e-02,-4.314293909425614970e-02 +3.796986074668675781e-03,-4.863241258424132185e-02,-1.532976963771604494e-02 +3.976861293872761133e-02,2.594555191640382508e-02,4.869770366695131553e-02 +1.255474404615912476e-01,-3.805812618052799995e-02,5.036219142413604979e-03 +3.483923475525074753e-02,-4.675537134498151254e-02,6.282648877551637312e-02 +-2.529930655662060782e-02,-1.188990955101303371e-01,9.487512555145318632e-03 +-4.371271645469791689e-02,-9.663651034608135293e-02,-5.477840028418990564e-02 +2.715810562326348172e-03,2.502366293929840155e-02,9.663043732405872388e-02 +-1.116427231900311498e-02,-6.297541404315994129e-02,3.646983836501276055e-02 +-7.137375541430508730e-02,1.946348501562004604e-02,6.438455932714100272e-02 +-2.262816130946653220e-03,-8.057700234024098296e-02,5.541687972666174689e-02 +8.967287760715307587e-02,-3.182408439348455992e-02,6.327164234040745516e-02 +7.051207016898439206e-02,-5.070210283500366927e-02,1.032627631983254884e-01 +3.995427630237074340e-02,3.450835103787028291e-02,5.518432546696223212e-02 +-1.956290163913483940e-02,-9.251267260811832371e-02,-4.206395978851827644e-02 +3.270920103695084541e-02,8.313492095006325133e-02,-5.196889142136897760e-02 +3.408912232866987552e-02,-2.003977990436999444e-03,-3.753467204931214274e-02 +1.384352351657786584e-01,9.264690699915312244e-02,2.056259441869353992e-03 +-3.310154177907487921e-02,-8.628728680542206708e-02,-6.545859983402103899e-02 +2.087103896145906246e-01,9.857744215282314426e-02,1.123526709156087711e-01 +2.308986689399858752e-02,2.393711128022579272e-03,5.551520200318981607e-02 +-5.731867188775953414e-02,-1.857157434577867000e-02,6.211091566471568098e-02 +4.242993522975940096e-02,3.436513846625721767e-03,1.914055304999081122e-02 +5.388813638336975576e-02,1.390890696112076844e-02,-5.132287756698458020e-02 +-4.046059423665038235e-02,-1.891780816687236785e-02,2.923099081902186605e-02 +-4.587831427797276623e-02,-2.859961314013675145e-03,-6.407218775528791821e-02 +8.078036385534836938e-03,2.780275258089968688e-03,-4.469902666630923976e-02 +-1.582656561418457897e-02,1.114006001088301522e-02,-4.488541552502654797e-02 +3.342398275764187077e-02,1.371515305069604673e-01,-9.616262421465796711e-03 +2.391036919501679167e-02,-1.069393707716360248e-01,-1.213974395634338649e-01 +-1.633627205596050944e-02,2.579957283666027210e-02,-3.472324802384724185e-02 +-3.093035407461655964e-02,-1.090461453624434890e-01,-2.127054078973554876e-02 +-2.732728971625982342e-02,3.779612424662742720e-02,-1.014184782309315996e-01 +7.441017008273388689e-02,-2.349161618547996114e-02,3.026839928186584108e-02 +-2.014524029620037501e-02,1.067530511339526405e-03,1.269662800455861067e-05 +-7.851222219424959514e-02,-7.596813456179640767e-02,-5.964949879750985201e-02 +-1.003747326463807071e-01,-1.226653895302186187e-01,7.746603572715611563e-02 +3.539038274983120902e-02,7.070475160348134447e-02,-2.251855688199860817e-02 +-4.756876460729476648e-04,5.428212468944545489e-03,-8.414691383171149508e-02 +-2.364110602218956123e-02,-3.658326902186111239e-04,-4.116701376064853951e-02 +-7.543249372721021195e-02,-1.487443344837270469e-02,-1.322444340769359239e-01 +-5.847944756534641242e-02,-2.969273115876535502e-02,1.266638318763506355e-02 +4.803634311212319485e-02,-5.213164038135588430e-02,-1.961933961360613071e-02 +1.211293769839386428e-02,-4.499211940201301024e-02,1.242406504703121861e-01 +4.283461432879901755e-03,1.115182306124309648e-03,1.174495548200399581e-03 +-1.072802882232719475e-02,1.488446228809022220e-01,-1.176751205552926428e-02 +1.286215736598657171e-02,4.259198210422995151e-02,-4.595251060639112678e-02 +3.904010159254506923e-02,-5.486676424048908540e-02,-1.948074353415294932e-02 +-2.863703565808643076e-02,1.249027743343338395e-02,1.069623255047855992e-01 +1.340406913577367742e-01,6.710876039673080440e-02,-3.703893051608028036e-02 +9.378665628111390595e-03,1.428743570153889753e-02,-1.089367992194260372e-02 +6.080558620070643239e-02,5.573554045320409933e-02,3.826875320650613421e-02 +7.431548295025977580e-02,-5.460376683332084091e-02,-5.952555964164212704e-02 +9.607890098206289461e-03,8.212615853677138894e-03,-4.379722257549625158e-02 +-3.655635699336313299e-02,-2.517548047379397982e-02,7.274089984965761806e-03 +-4.121827584625341323e-02,-3.823262772471333875e-03,-1.756352453121271320e-02 +-8.932255386755738602e-02,-1.207210760068563003e-02,-1.690470592604678690e-02 +7.008317430337356047e-02,-1.447471550459933538e-02,1.275763954499923268e-02 +-5.761772798315036026e-02,3.165042018817253167e-02,-4.575200045590559900e-02 +-1.450758337020369715e-01,6.952930515288131830e-02,1.367750301520840039e-01 +1.031140918109016286e-01,2.122545997515819932e-02,7.547620900606810679e-02 +6.082698639335858831e-02,2.152720183041922919e-02,1.123651193652940201e-02 +5.770522278939461958e-02,3.707239549242320222e-03,-1.227173637848359145e-01 +8.995732832812903049e-03,6.801451959217293119e-02,-6.256596764806665600e-02 +-5.776494944667889125e-02,-3.352459475437895992e-02,6.249443823435933687e-02 +-7.658298233620905449e-02,-4.820759642439580162e-02,2.950375217434741612e-02 +-3.679185591884157752e-02,-2.760162952256614566e-02,-8.000364702027819384e-04 +-6.860382131357654727e-03,9.688765631561683384e-03,8.639016052134425305e-02 +5.729308493717977929e-02,2.874540419914518516e-02,4.207644388440385380e-02 +1.136387870946442037e-02,2.896571309426166155e-02,-7.112178440846368688e-02 +5.221834710857703281e-03,-9.277783924709737118e-02,-2.157554827334147093e-02 +2.909475712109024781e-02,-1.099939397860743989e-01,-3.449817461170870143e-03 +5.672066942396468414e-02,2.310619679099807158e-02,-1.971911605651816696e-02 +1.161240810034770282e-01,5.641170440824357785e-02,-9.519619969842632590e-02 +1.402313310342169772e-01,-7.336871750291010241e-02,7.693291906037820482e-02 +-1.235530502589710956e-02,-7.490740152184596767e-02,-6.464968135928501891e-02 +3.241368116696998619e-02,1.205776763733396560e-02,2.789723680797741648e-02 +-2.135502482007288743e-03,7.374622643335693173e-02,2.166576625507951256e-02 +1.205303943079469170e-01,-1.647889726150224624e-02,-4.467319302210524812e-02 +1.746180671508947707e-02,-6.420828348272578090e-02,-9.861622132541658647e-02 +-3.636460994749017572e-02,2.833165786844851763e-02,-4.492919995964261143e-02 +1.933778971575947705e-02,-7.559926372090620961e-02,2.673238712592048566e-02 +-4.702625240803226525e-02,-2.380176764856088961e-03,-2.891095410416700748e-02 +8.277748991735552758e-03,2.284184030733731074e-04,-2.282832406677115511e-02 +-2.010365750709722579e-02,1.774582163393533807e-01,-3.874923104903079535e-02 +-1.080476421410401927e-01,6.884509964172301488e-02,7.916152329841875945e-02 +2.338995096929517500e-02,-5.051962701970648395e-03,-1.352064305676696672e-02 +-9.627658219119177019e-02,-1.583575368758162460e-02,-4.405898377284050982e-02 +1.515907869112176620e-01,-3.676292794148370430e-02,-1.027527807540813166e-02 +-6.235966338402221254e-02,-7.967485369195377587e-02,-4.261939102628138631e-02 +-2.999164945160867277e-02,-2.060009473146868358e-02,6.284119573276049364e-02 +1.133027024854876968e-01,-1.249801440556384292e-02,1.329461281381478233e-01 +-2.215791751846141189e-02,6.381788874239781306e-02,-9.859063727932330240e-03 +-1.286706138735264036e-02,-5.934352898436427021e-02,8.052958081198094420e-02 +-5.122457649327770424e-02,1.879706117310932928e-02,-6.843165757437945362e-02 +-8.885506042268973004e-02,-6.902981039491352944e-02,-2.190749907797779478e-02 +6.075854163442841877e-02,6.950867587869752340e-04,-4.422658978554483422e-02 +1.012040221036960425e-01,1.019421211081730227e-01,6.033979559176138457e-02 +3.340959065292870706e-02,3.141882881386453413e-02,-1.956630576808830388e-02 +-1.135286674058421930e-01,2.931745078552901521e-02,3.960761000511708180e-02 +-8.565162953253199762e-03,-1.903327361622891151e-02,1.371637313777948793e-02 +9.972355969240753737e-02,-4.158320336150860691e-02,5.672043192530316913e-02 +1.801336759580250135e-01,-9.021066934460328368e-02,-5.387073310181068192e-02 +1.539486548540253408e-01,-5.120811978105270675e-03,2.337175485683124637e-02 +4.166641270053936946e-02,-3.831632427903626514e-02,5.653181961197456529e-02 +-2.424386268879416551e-02,2.064292049856531266e-02,-4.073789765695915582e-02 +-2.111422020933759885e-02,4.535687554788042641e-02,-3.456961222647042531e-02 +3.384733394350815383e-02,3.430641858377390984e-04,-4.770790314329725196e-02 +-8.661489793428695655e-03,-5.306554704802483174e-02,3.002917360927294041e-02 +5.962501492518933188e-02,5.089007779313987206e-02,-2.416161985028078898e-02 +1.070546488125925233e-01,-9.546268975191496420e-02,-5.859774086843231450e-02 +7.076354741595974884e-02,6.067729728872816447e-02,5.077589871121700356e-03 +-8.289616090780602131e-02,2.099132537687248973e-02,3.543768123503731205e-03 +-8.190026401407099477e-02,-2.416862503419466707e-02,-5.368268435390201321e-02 +1.109582802312952532e-01,-2.352098417176990384e-03,-2.386789853904899492e-02 +3.670115039191419043e-02,5.125553349702077072e-02,-1.373678274645670928e-03 +-3.972073988014251933e-02,1.430181697326743939e-01,4.730024191380214488e-02 +-5.819012197455735586e-02,-3.509779346825284141e-02,-2.850937456665946293e-02 +-2.661728346827758190e-02,1.390279096135802958e-02,8.419777845520670656e-02 +1.834403349157800317e-02,1.843618294824431528e-02,-4.834955766502536945e-03 +-1.995516306361183947e-02,2.317666723548093138e-02,4.951539012888182129e-02 +4.753125105649108617e-02,-1.890869817466035024e-02,-1.031446775842317087e-01 +-7.208765876704460729e-02,1.111930177927976798e-01,5.333671157206498759e-02 +7.893417289451425123e-02,-7.845922746058456299e-02,2.532902040877641966e-02 +1.436156663060252081e-01,-4.938848819934315779e-03,-6.447710398200355575e-02 +-7.850425609888318779e-02,1.329482058628501384e-01,-1.117231014034081316e-01 +-8.630266913330723877e-02,-9.709448711715709668e-02,-5.534975274634203191e-02 +-7.132791950471913112e-02,1.209079688992880791e-01,6.886592571211570812e-02 +1.080506262848697913e-01,4.074532986662956352e-02,-2.259985222814807002e-02 +6.947032089680814371e-02,-6.643701472405444397e-02,-1.160963174698721734e-02 +-3.353740219507235498e-02,6.818595309484969114e-02,6.611406099339592335e-02 +7.189952314890649121e-02,6.188411936110697203e-02,3.698870026610455962e-03 +3.870168946326311282e-02,-4.799550940850762920e-02,-3.731758552765264414e-02 +9.638492877422575808e-03,5.125347652295723228e-02,8.356180895599249481e-02 +3.508825004013350207e-02,-8.187021009020931106e-02,4.234650015816728702e-02 +3.950349954824323257e-04,-1.485564557755800208e-02,4.804731798456829753e-03 +-3.470213319846598282e-02,-3.752500878002738849e-02,3.942826681164747493e-02 +1.677053659411260542e-02,5.911058927061256171e-03,1.310372161775049359e-02 +-1.545862318242019473e-01,2.097016571995530265e-02,-7.941333328064074937e-02 +5.195934550521807277e-02,-6.271783479474822565e-02,1.385278314651301225e-02 +-3.700837877172393625e-02,1.523095242542958118e-02,-3.100939930064772546e-02 +-1.613112350388100011e-02,6.515682762333810385e-02,2.619498177847564419e-02 +-4.752169492798080652e-02,1.310868842662871007e-02,6.026175086760230878e-03 +-1.434179072185871873e-01,4.027752322493175635e-02,-7.696399124657236912e-02 +-2.543050125799865141e-02,1.021240504487131856e-01,5.795376474332299827e-02 +7.259166231915093956e-03,7.131947061300406010e-02,-6.237358720001114770e-02 +-5.911449426335824153e-02,4.418721184274065905e-02,1.765872282044913741e-02 +-2.375114787524297295e-03,-6.838465179890988732e-02,-6.111340044143870678e-03 +5.185247561606882299e-02,7.866938953417587643e-02,-5.118449932466059143e-02 +2.478911012361685942e-02,-1.140259880521286295e-01,-3.410887177569469492e-02 +6.820077305133816215e-02,3.385148043542650365e-02,-8.920430173849472344e-02 +3.444569133938121808e-02,-8.198768627506883289e-02,-1.235414229498758495e-02 +-3.094933601027442457e-02,1.261243912346971321e-02,-2.211432961051651089e-02 +-2.544837171771139814e-02,3.320382867280238098e-02,2.259492343850873913e-02 +2.706723414797837513e-02,1.110792892498660978e-01,2.329062193258522526e-02 +2.229697903665918066e-02,3.953999988912958174e-02,9.185879946814047570e-02 +1.631238007717241562e-02,-4.294757991614778919e-02,1.109349929406966279e-01 +6.096920302368260235e-03,7.369828019156984822e-02,5.963588567813261909e-02 +-1.166342761920986446e-02,1.565527591066031080e-02,1.013711131430776458e-03 +5.053257629910391791e-02,-1.085339744089117674e-02,-7.291429000957809492e-02 +-8.518765397690127028e-02,-6.715244815295022540e-02,5.328407492785066507e-02 +-2.833505378235202238e-02,-1.506642518987533728e-02,-1.008751516461190295e-01 +-1.325360452893259780e-02,-3.257508606657121691e-02,4.142582442073955429e-02 +8.173895929921178027e-02,-7.087391856629568498e-02,-4.295270500415571818e-02 +8.536043010380283541e-03,7.978664987672737241e-02,-4.499223481448611645e-02 +-5.519759765584020955e-02,2.531692582047867512e-02,6.408054815574050489e-02 +6.659245306459336822e-02,-1.421471463010805800e-03,6.263895162791831284e-02 +-2.686774332591701508e-02,6.939551687454521833e-02,-3.093828476198502036e-04 +2.150209644281437810e-03,-1.088592092019624730e-01,3.987394499452797531e-02 +1.540075786995601971e-02,-5.564417404310786561e-03,1.289432157848607007e-02 +1.734178685699543365e-01,-7.304189398967866897e-02,1.734552643444218015e-02 +3.602183778014580312e-02,5.906847476456026334e-03,-8.174209567168086443e-02 +-7.890007421156901291e-02,-4.494009052651247449e-02,1.754324041315472385e-02 +-7.545551809106550156e-02,3.049082219564591689e-02,9.286079472677420676e-02 +1.218243508515660378e-01,-5.351239298785755161e-02,2.734404419902968994e-02 +-3.779360232121533464e-02,-6.691104504348134238e-03,9.183574480520487887e-03 +-8.184268128200151982e-02,-8.934122264480112707e-02,-4.521065474236437426e-02 +-8.628664977899229427e-02,-7.073471326991907782e-02,-1.144968962782705497e-02 +8.704492376323699765e-02,9.168527352749271386e-02,3.441562859561003024e-02 +5.705983149718115571e-02,-2.783601774746799484e-02,-1.441275815491819927e-02 +-2.001494618148984619e-02,-1.052777022551762420e-02,-3.701267741998150694e-03 +2.962462731935833551e-02,3.103130515777686657e-02,7.289208966974092263e-02 +1.754307646879780039e-02,3.619247870398496075e-02,4.170790311179028986e-02 +3.989485541347135428e-02,3.321086417863960971e-02,4.477683360776837929e-02 +1.389122910566178634e-02,3.142997896875942415e-02,3.911170097233265114e-02 +2.061733801915115530e-02,3.616160263362287047e-02,3.755716415720837531e-02 +2.541982794253738742e-02,4.387106531215168720e-02,2.336282549603541439e-02 +2.429608593467351418e-02,4.405581256137924839e-02,5.400894550154730633e-02 +3.563628128680329521e-02,2.309541761094299067e-02,5.632426729096536022e-02 +3.592610033730132130e-02,2.529994228847264742e-02,2.410411355747280743e-02 +2.249161218216080838e-02,4.261587525655956277e-02,3.826406073143336084e-02 +2.004712240450167229e-02,5.099646858234022778e-02,5.473517739180070590e-02 +1.603007100517899602e-02,1.621894330791732661e-02,3.307195803528523853e-02 +1.784889075419035520e-02,1.918900984718728553e-02,4.225850647289969980e-02 +2.358236561674828188e-02,2.857509125657087257e-02,4.593246830311550205e-02 +2.133201924437644684e-02,3.577133374454199294e-02,4.208963013997760183e-02 +2.487608749381478926e-02,4.300101673770058419e-02,3.947821914519673153e-02 +2.334581030278718577e-02,2.970429999142944893e-02,5.208750659016531115e-02 +1.333442852574259416e-02,4.552403643801180427e-02,6.341991040346137143e-02 +2.988343000660950710e-02,2.974769793935947912e-02,2.697560620505914247e-02 +2.190715137381255700e-02,2.889832143958147997e-02,4.230690216131786918e-02 +2.261255334719690022e-02,3.404196786605269420e-02,2.429081469794861295e-02 +2.563250823872948586e-02,3.244935571836445043e-02,3.832119486490973004e-02 +2.146559344195700034e-02,3.773075481829910038e-02,2.797662676946768151e-02 +1.497221413878476251e-02,5.194296235916402021e-02,4.298739189540622813e-02 +2.078456607691707078e-02,5.448359752877916795e-02,3.562928713020917237e-02 +2.675951657280331575e-02,3.667095099755445647e-02,2.725026614313628276e-02 +2.477637774591086653e-02,4.480465957457736154e-02,5.964337136916082055e-02 +3.352477942865923766e-02,2.344594327123447966e-02,5.281192508640037558e-02 +1.597252991150934984e-02,6.762432566938186840e-02,3.334065124663358054e-02 +3.306214362206072455e-02,4.558585221215322170e-02,4.095136768373353747e-02 +2.562470413969262367e-02,5.637814110949310870e-02,4.001666329201043759e-02 +5.445001141912101522e-03,4.682675148559643091e-02,5.092437958957748978e-02 +1.819268390855333095e-02,3.545659708054311327e-02,4.846783678864906991e-02 +2.077519967565737494e-02,2.234211100145541348e-02,6.510297378418682113e-02 +3.276939224631113950e-02,2.823220803862583339e-02,6.706680767553067912e-02 +1.987147200623666163e-02,3.139346460353136664e-02,3.615639113319090575e-02 +2.169383832938451273e-02,2.482104583235236056e-02,3.839172509942517797e-02 +1.931692924983538853e-02,2.667949527980466654e-02,2.903630686253909701e-02 +1.474596059189729400e-02,1.661113863649072223e-02,3.083139284288745688e-02 +3.106293871102442858e-02,3.512446370645971178e-02,6.008974583712609757e-02 +3.383973359193464397e-02,2.776357888894515763e-02,2.511887577980878583e-02 +2.574982241442216185e-02,2.896047809112009888e-02,3.993113835102642117e-02 +2.278137316704860818e-02,3.869917481910332968e-02,3.352976549456911093e-02 +4.825343649238903604e-02,3.512794951676616317e-02,3.329686044357468150e-02 +3.837917253511571869e-02,5.022925377491931770e-02,5.054546368423910169e-02 +2.859937330931306906e-02,4.893115886168055567e-02,4.102353358855632959e-02 +2.390612637538633983e-02,3.959025378037325793e-02,5.093850340483368350e-02 +4.047906298325040092e-02,2.324274422247567251e-02,4.535674703578652239e-02 +3.113744758949129818e-02,3.792985760872550488e-02,2.224078845769191654e-02 +1.768532011404256102e-02,5.332123545966515471e-02,5.258379734029074853e-02 +3.467552758885757841e-02,2.289170550472612031e-02,5.373621305226046474e-02 +1.243896813326685925e-02,4.748006208309686615e-02,4.303880546696773474e-02 +2.440032382074861991e-02,2.467678269834985838e-02,4.542069867198719746e-02 +2.622191568252759536e-02,2.990232922907864327e-02,3.154775075801892481e-02 +1.658274560821756949e-02,4.114506340378450838e-02,6.205731626187763889e-02 +1.892647630124281999e-02,3.062417315707720994e-02,4.603269107661955850e-02 +1.647957019193466502e-02,3.380823262850586597e-02,2.755640628409227605e-02 +2.214571054553262502e-02,2.353545596736230511e-02,5.849915121145156383e-02 +3.032958313673734044e-02,3.083790720331161528e-02,6.009214082309963928e-02 +1.994164333446278928e-02,2.516469787318730694e-02,3.745014977117027549e-02 +2.874087533311329296e-02,3.463299355092158693e-02,2.669907802272462188e-02 +2.354613392639754582e-02,1.214185310455310161e-02,1.811492179705303379e-02 +1.983905973308442219e-02,3.457170595747836167e-02,5.163549550019085749e-02 +2.379906743306193020e-02,2.875473718350871413e-02,5.629017068457940753e-02 +1.600437400263954313e-02,3.343313829216425920e-02,3.747086139359472740e-02 +1.837306112630044883e-02,2.572964882494287522e-02,3.709238627736757138e-02 +2.085030080222140605e-02,3.524034010406425915e-02,4.681761547786820327e-02 +2.425116721755443336e-02,4.839969772298146483e-02,3.786941908486005787e-02 +2.497520785213725586e-02,2.799214029480627530e-02,2.494208433164228633e-02 +2.438862422283974429e-02,2.987398004001086405e-02,4.634654543382110692e-02 +1.546919065546016950e-02,4.295919400853335374e-02,7.678526237074345673e-02 +1.946146958611064126e-02,2.306884542601933888e-02,3.148366835412193254e-02 +3.740375102696388843e-02,3.082131531959773907e-02,3.530791182283429808e-02 +2.469080709318253325e-02,2.825317809987258622e-02,5.403148438489272648e-02 +1.313192462825896883e-02,1.826084012605263054e-02,5.513456487000135964e-02 +2.211761763271074752e-02,7.148032354192057625e-02,4.038433962124704513e-02 +2.596281764465040859e-02,2.836386393263301900e-02,3.992873388457110484e-02 +2.573122718623852001e-02,3.467370427759826346e-02,5.001040654251581730e-02 +2.279464518980687734e-02,3.507196705738054726e-02,4.878527610649469742e-02 +9.102262224434552393e-03,3.225837052836559582e-02,4.885851714032602572e-02 +3.000241616757874305e-02,4.632155822275568074e-02,4.047583003041083788e-02 +1.325150468759814584e-02,4.844345956321852165e-02,4.843397089194933364e-02 +2.538947116013711217e-02,3.332604584457005137e-02,4.610502357603953050e-02 +2.061235013546052278e-02,3.826414309714003259e-02,4.126637954354499954e-02 +2.054981191936683382e-02,3.957419579842987728e-02,5.272689485057260178e-02 +2.487482218893017488e-02,3.144449753281269855e-02,4.934541993109569508e-02 +2.191464235595654356e-02,2.677306841048383498e-02,3.374495440940872282e-02 +1.878506183139294974e-02,2.541785725335393709e-02,5.152962448060326855e-02 +1.263650748482351635e-02,4.171579125094451723e-02,4.710328840818341078e-02 +2.062744478273254717e-02,3.639029861985246250e-02,6.408044194339171384e-02 +1.836701226718319424e-02,2.115124330665831692e-02,3.095334088319910693e-02 +2.281248927835586443e-02,3.703705750461899759e-02,4.677684947421026362e-02 +4.099131822096355876e-02,2.194023234787261661e-02,2.116153350361250907e-02 +2.714961243958066012e-02,2.536815195621340210e-02,3.240421651746235032e-02 +2.987147393855241542e-02,1.731066543749225362e-02,4.537145306723489036e-02 +2.914780853901564883e-02,4.357459356101743564e-02,3.733593381405910655e-02 +2.626095835299221623e-02,2.296214442091841154e-02,4.543472168355904006e-02 +2.975998583769964498e-02,3.231009333232799652e-02,3.215428739181772771e-02 +3.371813318662193748e-02,3.833127079129669545e-02,3.021091500702244997e-02 +3.237413377482857568e-02,3.467271194112197391e-02,2.193482176729929720e-02 +2.352203062816350318e-02,2.655352086473557888e-02,4.025219960473964270e-02 +2.586712631012212660e-02,3.858196476982356238e-02,3.883025049631313314e-02 +4.970309979686188956e-02,5.438091308968905774e-02,2.673238443424512042e-02 +3.279045542107996564e-02,4.054562634829979306e-02,4.767736196863998216e-02 +3.107254912891259727e-02,2.275793527549969941e-02,2.026471275922411830e-02 +2.422474590835994521e-02,4.957768737546212195e-02,3.713255502944854541e-02 +1.842409795285623181e-02,4.561066146727747045e-02,3.543212437593997594e-02 +2.412313283340425385e-02,4.011907510643605151e-02,5.873187770130634811e-02 +1.398486818111636595e-02,3.716687308145793373e-02,4.063628750517600530e-02 +2.901002124214009659e-02,5.640975433654900340e-02,2.287895429305713754e-02 +2.408349762507722147e-02,2.581823886013898811e-02,2.780327230863353927e-02 +4.360540589788895055e-02,3.396965240571675482e-02,2.933103809342705107e-02 +2.888605659152922861e-02,3.732293098251822372e-02,4.517844130557744503e-02 +2.279729421197134592e-02,3.389153273202619859e-02,3.291608764365006740e-02 +1.411294284694294965e-02,2.205781628162847494e-02,4.543219404468988587e-02 +1.504403732015612005e-02,4.787707344895471284e-02,2.054850144704631690e-02 +1.956462190581235647e-02,2.280827097706988188e-02,2.658366067347780332e-02 +2.909866366115015576e-02,3.884067571602712460e-02,4.315995870981479549e-02 +1.587500013221536735e-02,5.181922727657053279e-02,4.651451287994803896e-02 +1.785428316171567067e-02,2.829742525133362510e-02,2.653488378688816443e-02 +2.846720466466359442e-02,3.481594718180892195e-02,4.500975312102960951e-02 +1.181652596922560215e-02,2.904052441904624721e-02,2.188936716895281687e-02 +1.614303984752500642e-02,2.399871550758847505e-02,4.885811566658247035e-02 +2.051985809431649405e-02,5.106557846411971524e-02,4.550901635182963423e-02 +3.188360984878101795e-02,1.617862505471206330e-02,5.318922064425113394e-02 +3.058803511636967037e-02,1.913896063482155643e-02,4.449464904123563019e-02 +1.999310337377691385e-02,2.573719397140713377e-02,6.033168571708789202e-02 +1.610544321144017493e-02,5.385551718128805954e-02,5.385427954923463489e-02 +1.450838035157821573e-02,3.887340271984490725e-02,4.960840377067301382e-02 +2.239195581731738549e-02,6.189427153140586446e-02,2.763418657972172704e-02 +3.182175204140114122e-02,3.423659355204829169e-02,1.883465569885011195e-02 +3.022528346185927514e-02,4.116816495265126358e-02,4.144246072964920952e-02 +1.849291566305012041e-02,3.484191556691731972e-02,2.766992835549854715e-02 +3.281599739918715508e-02,4.816779103821835356e-02,4.665146712512462795e-02 +2.734831264082736649e-02,3.560012733693202619e-02,3.155689549162135621e-02 +1.294866028568441609e-02,2.573124765321255225e-02,1.904969093201920247e-02 +8.799071712822934682e-03,3.719218882990881631e-02,3.625746156490627925e-02 +4.078653243946765011e-02,4.445981829014686304e-02,3.442656942314881174e-02 +2.182033558895753525e-02,5.890795952117386380e-02,5.280372430052659299e-02 +1.358319398905028126e-02,1.841582223675769167e-02,5.400004338372704771e-02 +1.235455672034708845e-02,3.617374614178532621e-02,3.193260261239448672e-02 +2.092919916803747185e-02,2.757310173515244850e-02,2.822730756233465810e-02 +3.571050089629090873e-02,2.878093567783957321e-02,3.189045493787205643e-02 +1.794141206823239229e-02,2.989150751273958115e-02,3.215572375243064968e-02 +2.721099948097768784e-02,5.161648612633541744e-02,2.835267556419542728e-02 +2.650075178549295488e-02,2.702772452518029458e-02,4.782705484277136737e-02 +1.401911101286105153e-02,5.015845402797211583e-02,5.297603033698310843e-02 +1.045584645734690815e-02,4.699044633980295482e-02,5.405229616615784410e-02 +2.162035869052768636e-02,4.529896969696130954e-02,4.354553749918316924e-02 +2.937644708487294198e-02,4.131805403324855658e-02,4.033577293066920727e-02 +2.267990505012894981e-02,3.476302751421720544e-02,4.651028169140447588e-02 +2.570261132334522233e-02,3.883718615069641639e-02,2.094162437190273673e-02 +2.841100867464652416e-02,5.107610925712775807e-02,2.033858061008548407e-02 +3.396937400478033248e-02,3.308303513778369787e-02,4.001865160390774556e-02 +1.688550398244380649e-02,4.854686702046779462e-02,4.205584480073172593e-02 +2.126230225200254759e-02,2.833513707221073374e-02,2.770129215902781411e-02 +3.045745735768399381e-02,3.516294707552994336e-02,6.100115850391369526e-02 +4.358279151472135848e-02,2.997312048856832709e-02,4.734194491984310832e-02 +2.620295915738328832e-02,4.821361003991862793e-02,4.035963779152864500e-02 +2.625355174729473648e-02,2.050453424388818877e-02,2.700722677125048238e-02 +1.857353214378171594e-02,4.577852169172803853e-02,4.793254998602994310e-02 +1.759125361397136100e-02,4.066572288164591736e-02,2.967691219120540888e-02 +2.183519950255886216e-02,3.346309499449569291e-02,6.382240689144821899e-02 +1.486748385430269014e-02,2.039257954748994670e-02,3.894971811643839488e-02 +2.435648748970973415e-02,4.037226248847481519e-02,3.264184835247157385e-02 +4.111296946444815276e-02,4.044142629128909955e-02,4.572539197195676919e-02 +2.649631371965115167e-02,3.153306850126370159e-02,3.524885841513548251e-02 +2.425533306318723714e-02,2.303650571715462614e-02,3.907368780210033338e-02 +1.367526041611031792e-02,2.441906640284823710e-02,6.180213180942040196e-02 +3.442333796020214526e-02,3.011697861424889391e-02,2.776415254481080092e-02 +2.869096080087855244e-02,2.340359365157967247e-02,6.314377738350715474e-02 +4.121194023333043382e-02,2.667537390000090936e-02,4.858405950070525392e-02 +2.684363352636809016e-02,4.102219641130837313e-02,7.324781564581048232e-02 +4.174876055001215669e-02,3.658709586621101267e-02,3.985326766323100262e-02 +2.357678148495731540e-02,4.820611338001531271e-02,4.636986726695523087e-02 +2.344220168445139071e-02,4.989872506395962026e-02,4.780394098937283676e-02 +2.586764859191450008e-02,1.237540320645990136e-02,4.960347672127436019e-02 +1.484007845730926298e-02,3.900715615833701133e-02,4.572538187327028492e-02 +5.238392039182503818e-02,2.593784584979891977e-02,3.282858166981499765e-02 +9.624595467735969426e-03,3.205909652042680108e-02,5.862749386251209227e-02 +2.437981109084790335e-02,4.365620150407786837e-02,2.877845701849991028e-02 +2.288511728879198334e-02,4.816287551530163552e-02,1.977594603243133103e-02 +1.927902067302038336e-02,2.895281198816397616e-02,4.144492790892427558e-02 +2.287526434621189181e-02,4.543857637123690368e-02,3.878695788406461009e-02 +3.837981206380238625e-02,2.791880026738886508e-02,5.591452911803462128e-02 +1.651132635148932701e-02,4.964498763795918701e-02,4.505768311460705416e-02 +2.432130693312327396e-02,5.634027972633752490e-02,3.104356764506840949e-02 +2.472931951412012802e-02,5.460978386876752522e-02,3.793249237154881770e-02 +2.573375776116827024e-02,3.931731127344613441e-02,7.671822142463187444e-02 +2.858123142755132975e-02,4.395089248081858468e-02,1.200871669771079453e-02 +2.378105617107027780e-02,2.971915566222755115e-02,3.069859586965157511e-02 +2.796629300616561634e-02,3.494751339100125864e-02,7.296681399676376023e-02 +1.175667230568511537e-02,4.070726951769158136e-02,4.481534928212307228e-02 +1.749051235013342545e-02,3.943174016003254956e-02,5.030977353392263735e-02 +2.553646952111119847e-02,4.271189081751603639e-02,3.300961531635093760e-02 +1.871019661403571996e-02,4.529127279128532940e-02,3.498524029487883047e-02 +3.459426405049281089e-02,3.045051170825727876e-02,3.573894244132328618e-02 +2.002910441043407805e-02,4.720394680510485441e-02,3.872669566199103686e-02 +3.435842937719673501e-02,6.563885634375536682e-02,4.944996900186996586e-02 +2.467901983182234707e-02,3.659320969419035258e-02,2.648334735681160193e-02 diff --git a/tests/test_data/pls_dmodx.csv b/tests/test_data/pls_dmodx.csv new file mode 100644 index 0000000..651e8ab --- /dev/null +++ b/tests/test_data/pls_dmodx.csv @@ -0,0 +1,50 @@ +1.000576759577843422e+00 +1.106931273713132491e+00 +9.129711826729584034e-01 +9.132209676799446507e-01 +8.812918849118313025e-01 +8.911746956618664672e-01 +9.960002773861161840e-01 +8.620658992287187905e-01 +9.953561780552300231e-01 +9.452888896850945022e-01 +9.602921674093721771e-01 +9.802408285628980700e-01 +9.860825930399202965e-01 +8.664675751072170584e-01 +9.825197707709393269e-01 +1.004229364584903195e+00 +1.027899236894302515e+00 +1.007874055597027585e+00 +9.257501595988043563e-01 +9.582750766774098539e-01 +1.014694572546720464e+00 +9.248924447193892506e-01 +9.909615391017120301e-01 +9.365049206015465533e-01 +9.782330217282571017e-01 +1.034997336668909140e+00 +1.017564127030529342e+00 +9.758053445551109206e-01 +9.876983605451454817e-01 +8.963461917329873518e-01 +9.440157032951075333e-01 +9.112117303713160865e-01 +9.764482604897710694e-01 +8.632769825127607488e-01 +9.936092961812859059e-01 +1.006913171977454446e+00 +9.055361364778516942e-01 +9.817655922441614891e-01 +9.761619544051205466e-01 +8.774351474640386117e-01 +9.296686766673371016e-01 +9.858543483549858655e-01 +9.706341189894200916e-01 +1.009034913921884158e+00 +8.571581630159796905e-01 +1.037769760430681254e+00 +9.444864270674639961e-01 +8.582783390663130119e-01 +9.676579757060308484e-01 +9.208803925396860102e-01 diff --git a/tests/test_data/pls_loadings_p.csv b/tests/test_data/pls_loadings_p.csv new file mode 100644 index 0000000..1565ea9 --- /dev/null +++ b/tests/test_data/pls_loadings_p.csv @@ -0,0 +1,200 @@ +-5.093117088461956987e-02,-2.165446383956613416e-02,2.777445686172912501e-02 +9.250196742448198173e-02,-6.403678410902706453e-02,1.005940757262579859e-02 +-2.948952218689918081e-02,-3.411809167647167351e-02,3.312082541912788475e-02 +1.520998416418877820e-02,1.224694898396012782e-01,2.178740057150728160e-01 +6.183522845680983898e-03,1.290174776941613033e-01,1.425485025624491364e-01 +8.158371306713899096e-02,-1.094747176678524808e-01,9.748172982491845953e-03 +1.052396777284924506e-02,1.072957032117529720e-02,3.817678157137196354e-02 +-8.592261211263460541e-02,6.035440049962765424e-02,-2.383687710526987205e-02 +-6.699546140711833131e-02,-1.629432046739955758e-02,-7.454504221035128386e-02 +5.717202716110346417e-02,5.443292530350381242e-02,-1.637108644413236280e-02 +-6.804782261121123527e-03,2.223937689949253595e-03,-5.870451370459675577e-02 +5.846074731130607161e-03,4.473425710525850280e-02,2.045515585305445749e-01 +4.447886436559538026e-02,5.701833795316985087e-02,1.978935599024376352e-02 +7.342429790456794780e-02,-8.590137853212659325e-02,-4.066105288551917496e-02 +-3.902478037366947927e-02,-4.008279886906290779e-02,6.508410291436277084e-02 +-8.951388447164022877e-02,-3.201947706531133725e-02,2.274785804411074731e-03 +-3.431190320590885717e-02,-4.733797932979501299e-02,9.968199747249821552e-02 +-8.624169747006826814e-02,-7.380003785559914598e-02,5.743887104124197583e-03 +-6.984246119264403418e-02,-1.924716202884814986e-01,6.697557747908398917e-02 +1.279811621823929435e-01,8.088432572120413111e-02,-1.065416716696906962e-01 +-1.422847057806543407e-02,-5.934118744523222966e-02,6.217580835615756779e-02 +5.286727224403074687e-02,6.727426267978547925e-02,5.740214332097689186e-03 +1.211641544617032412e-01,-4.938159280808118723e-02,-2.519860425198315601e-02 +2.179468232227643049e-02,-2.469388535408831992e-02,2.796162532972385970e-02 +-6.332387430715052945e-02,-1.289867135748373195e-01,1.488004501278098607e-02 +-7.711113430907313993e-02,-1.220000928379289667e-01,-5.742271938142252258e-02 +1.079854202235226192e-02,8.703802375554545168e-02,9.941230653441475440e-02 +-3.766595990418144385e-02,-7.303663517044273190e-02,4.026317436341325662e-02 +-7.296399655277610585e-02,3.214991152549623310e-02,8.365806727374820728e-02 +-3.122825888653014970e-02,-6.814287964732200498e-02,1.030467566211838160e-01 +8.419917318458909616e-02,-1.194437362667822439e-02,9.448629061571379995e-02 +5.612574528661012224e-02,-6.829642336279967765e-03,1.323071772681464753e-01 +5.166784496545635819e-02,6.365700269013375989e-02,1.328568983706369389e-01 +-5.199461081971448045e-02,-1.271799019145506970e-01,-7.867665143972882302e-02 +6.221881989929776979e-02,6.021081337923907956e-02,-3.858759026126393210e-02 +3.744344332044886869e-02,-5.969886423400360548e-03,-3.217850742378729201e-02 +1.820686693217221652e-01,1.229633938839641005e-01,8.329881613452792821e-03 +-6.648102892573556910e-02,-1.428762548439877211e-01,-7.727523446474372781e-02 +2.572643083964791244e-01,1.676153872521352617e-01,1.296896240788299737e-01 +2.665655109432565895e-02,2.544760128636063684e-02,6.930188361213464321e-02 +-7.014112836595121081e-02,-4.769073319281487942e-03,1.252272170792155803e-01 +4.903101570415929061e-02,2.495124729890417156e-02,4.319186437727387529e-02 +6.473960188622600309e-02,4.308735214041172759e-04,-8.162381183272811314e-02 +-4.685719662447009742e-02,5.267796280762628361e-03,7.131508471967937246e-02 +-5.177768614527256119e-02,-4.394052108557675029e-02,-5.797454809160352933e-03 +9.957126010988684092e-03,-1.964977210544245623e-02,-2.867664201976366858e-02 +-1.269403579358834890e-02,-2.478158709087113776e-02,-1.373974556695219118e-01 +8.590942974069031013e-02,1.611655926369417180e-01,-3.826797856321363656e-02 +-1.117540351073977901e-02,-1.955505633483538841e-01,-1.529118316617383566e-01 +-6.523163320615655777e-03,1.448374323370995101e-02,-9.679477258141123974e-02 +-7.112752345864296888e-02,-1.371477316825354953e-01,-4.288067067887479239e-02 +-1.249216612178478784e-02,6.074796688698178709e-03,-1.675571525209234858e-01 +7.223559649314312270e-02,-7.294751890265984556e-03,6.820193032542243294e-02 +-2.411040744928535581e-02,-4.349851236059751672e-03,9.400212114080408118e-03 +-1.117219808455438557e-01,-1.283768578220275403e-01,-1.118777646861170982e-01 +-1.504461507492275973e-01,-1.051150218187399676e-01,1.308573567617747346e-01 +6.582933260761618388e-02,8.563406032383230615e-02,-5.191478866475575382e-02 +2.347598026865892543e-03,-4.586040691847530215e-02,-8.434108976887862152e-02 +-2.513708624141858944e-02,-2.110784278121073318e-02,-2.967388299131961532e-02 +-8.310806986735094770e-02,-7.689173359976343713e-02,-2.291547725959450499e-01 +-7.471005957985028811e-02,-2.765580358820950851e-02,8.619840691594835014e-02 +3.620203518641466195e-02,-5.553976860434357149e-02,6.449606115487525881e-02 +-4.378035668298601961e-03,7.020369441680457227e-03,1.109485598898024006e-01 +5.501856021398742434e-03,1.138500067469075004e-03,-4.826203251358638160e-03 +3.595920929596003318e-02,1.570954803633371755e-01,-1.078529209208799709e-02 +2.859633673077591198e-02,2.574047663559438440e-02,-9.388846558525139330e-02 +2.213672261449508433e-02,-8.006640351705157643e-02,-1.277861634746137003e-02 +-3.004458802575466284e-02,5.763335353743131995e-02,1.271740328334174386e-01 +1.679737393895042730e-01,5.939786064660862452e-02,-1.014212165412393812e-01 +1.387214707824874910e-02,9.553112644343412715e-03,-3.955611317644518871e-02 +8.281689532716307589e-02,7.735263491476339348e-02,1.873009116779475458e-02 +6.152120049066474999e-02,-8.904991514661232677e-02,-9.224768431400909297e-02 +1.767522704722846588e-02,4.599938429514550150e-04,-1.200301111599421239e-01 +-4.977148780176021692e-02,-2.902954115515161276e-02,1.107530486558432406e-02 +-4.688610862678729146e-02,-1.425175231945650933e-02,-1.974164502269458096e-02 +-1.026754067161756434e-01,-3.613855625456754983e-02,1.233413186486370661e-02 +7.302800734548500761e-02,1.638465558768725707e-03,3.652759098431297008e-02 +-4.961724565025942002e-02,1.811324048394031411e-02,-7.367389386089619185e-02 +-1.340554186929594493e-01,1.473572188045835507e-01,1.600194604691338729e-01 +1.170553722105334704e-01,6.518700367189460276e-02,1.273198253809123548e-01 +7.193433680387681384e-02,2.627705869297857627e-02,-8.589364881225971041e-03 +6.556368182600021133e-02,-4.435293495007183728e-02,-1.481480621266481335e-01 +3.598432219567163082e-02,5.901490047036220959e-02,-1.313466911806835946e-01 +-7.654409378589507873e-02,-9.868067579985578125e-03,9.346559312737669212e-02 +-1.008188963155985107e-01,-3.800478602917243404e-02,8.741104395008407468e-02 +-4.766990022255120779e-02,-2.266820285598266510e-02,-9.223660259555874208e-02 +-3.797429447027018002e-03,5.397277859619060286e-02,1.491021548184643941e-01 +7.139050160123422417e-02,5.275209752247554673e-02,8.381338718680486632e-02 +2.488164021819192634e-02,1.577840921889249806e-02,-8.520957529519983253e-02 +-2.563847661990753535e-02,-1.160205753712148513e-01,-7.885424280949823728e-02 +-3.738153119314367116e-03,-1.194646583515270727e-01,2.602387636731786063e-03 +6.740173088266158963e-02,1.601331825993310490e-02,-2.873784421135741271e-02 +1.444760243422185397e-01,9.977037635773768065e-03,-7.178320758248356304e-02 +1.221549077145683559e-01,-5.531450131878219018e-02,1.169374912770268921e-01 +-3.275970754884111741e-02,-1.150047914603639088e-01,-3.545299069395744379e-02 +3.931539708166249120e-02,4.054060836754917740e-02,5.721983768611486193e-02 +2.627725844699031407e-02,1.080057997216056220e-01,1.178233985313036081e-02 +1.244201349895992376e-01,-4.068907596490418249e-02,-7.073771889645331934e-02 +-2.956591058282634094e-03,-1.200475704211148020e-01,-7.917572495874081184e-02 +-2.514750554643535932e-02,2.257762242131592170e-02,-7.682633920181722309e-02 +-1.790209701079958915e-03,-7.041352885412609230e-02,-1.584929349935028722e-02 +-5.520532531324992553e-02,-2.105554442475657956e-02,-8.059086629379424993e-02 +1.057137079792292746e-02,-1.012577322217666533e-02,-4.589301701116148269e-02 +3.873333406169764820e-02,1.820908817090115817e-01,-2.874070396112515108e-02 +-9.340622015625561769e-02,1.238726273499208969e-01,9.206153928721523549e-02 +2.360732771527460777e-02,-6.719129022544872119e-03,-4.184335768263642424e-02 +-1.078030490712711537e-01,-3.817604167541169963e-02,-6.465984445105685957e-03 +1.534021496613937330e-01,-3.614778052789696661e-02,-3.922101899032100214e-02 +-9.057022663157214548e-02,-1.015198384956381428e-01,-1.404556102354866456e-02 +-4.113513390554730115e-02,-1.294942156382845573e-03,8.442813730135970141e-02 +1.159454439856554692e-01,5.554099260840538593e-02,1.998152936520856682e-01 +-2.034431713881543896e-03,7.067561689776852285e-02,1.430194877358993526e-02 +-3.734743479861389603e-02,-4.536178629005228891e-02,8.697680524171473582e-02 +-4.961609141562609709e-02,-4.074419955139964647e-03,-6.807063766346146960e-02 +-1.202878710278860314e-01,-9.486773509629385648e-02,-6.997729606308557282e-02 +6.552875143240829980e-02,-2.298524870639824524e-02,-4.810844160751061305e-02 +1.397386219801583507e-01,1.455456477089878686e-01,9.663327367941255963e-02 +4.892210920524753953e-02,4.420498669840433603e-02,-6.270901373002550454e-03 +-1.121809040062193563e-01,5.665078868673791013e-02,1.349039533970924215e-02 +-1.482715766485480716e-02,-1.905711809259252182e-02,-7.739704094822968082e-03 +9.464011246821826817e-02,-1.796870811424100892e-02,9.980986170804850843e-02 +1.645355613668559314e-01,-1.220310326902465797e-01,-6.830139373461883989e-02 +1.643527799338310447e-01,1.245302687837171636e-02,2.858357395624706171e-02 +3.121355679169792244e-02,-1.316397789775589078e-02,9.443641250703622980e-02 +-1.925964149194116237e-02,7.327223737134336105e-03,1.157120511398410144e-03 +-5.299671411779244105e-03,2.678048321733587922e-02,-5.128340586042271637e-02 +4.053027967108122076e-02,-1.101735565332946296e-02,-3.451643137061712052e-02 +-2.621003381999292489e-02,-4.026552680715226457e-02,-1.600241685093825583e-02 +7.762492559864456187e-02,4.223336985691430318e-02,-1.236954130628143550e-02 +8.115927287076481200e-02,-1.330041714460336311e-01,-6.982011757955600140e-02 +9.936025073518793549e-02,7.349136646665116457e-02,-6.442848662286490558e-02 +-8.281328328544212969e-02,2.194843258545833842e-02,-3.692396480822472682e-03 +-9.540422423527381013e-02,-5.379951906508984721e-02,-5.007375722482455133e-02 +1.211025594366298835e-01,3.196049331619213712e-03,-9.418940768385344886e-02 +5.859040910654640666e-02,5.751895498016821456e-02,-5.566642008461712005e-02 +2.165471457280088770e-03,1.826998174187043633e-01,8.055876847359623449e-02 +-7.413523297924012878e-02,-6.120493312316144241e-02,-4.441976133150374317e-02 +-2.310392671493511491e-02,5.791749736974263069e-02,6.762667597843707856e-02 +3.289979158052280112e-02,2.770915974769590229e-02,-3.740693466618032897e-02 +-1.535259004873317304e-02,4.727109645438901803e-02,1.144751358830183897e-02 +4.467608760561500580e-02,-7.839741172751031606e-02,-1.607958455606026682e-01 +-3.619456274725559031e-02,1.549506493960391973e-01,-1.571299330426621137e-03 +5.989248616401308262e-02,-7.407008747415180783e-02,-1.397502501614332308e-02 +1.539143787768307292e-01,-3.358557121724763811e-02,-1.116548589839023442e-01 +-3.915142992364552266e-02,1.021799024916181381e-01,-7.592375814678962997e-02 +-1.262432729958137545e-01,-1.340545639039646686e-01,-6.386762207932004942e-02 +-3.556943527923077386e-02,1.749321671829178748e-01,9.421429420658049281e-02 +1.304753792806492840e-01,3.401141397336941707e-02,1.981009260906116311e-03 +5.356250792625855128e-02,-7.028138319818864888e-02,-4.134827415380239873e-02 +-1.313778171952707102e-02,9.941040872803516559e-02,3.636893134520046561e-02 +9.910603844294636755e-02,7.992926893574689440e-02,1.219854949364750779e-02 +2.482086681799682004e-02,-8.288385504786006941e-02,-6.178777127799910812e-02 +2.630405167329437702e-02,9.245137213677349919e-02,6.663978027390193848e-02 +1.077046256884360738e-02,-7.617809389420092392e-02,8.784058890392501887e-03 +-2.324042602907755092e-03,-1.314483247103340191e-02,-2.204370764867915125e-02 +-5.104449736496564222e-02,-2.167876333576293155e-02,7.701135472956374683e-02 +1.894279546962029936e-02,1.832318078568118125e-02,6.200838254013681106e-02 +-1.624963024249796162e-01,-1.820171749724805790e-02,-1.306643971485882683e-01 +3.362149175263708101e-02,-6.904957990742184581e-02,1.741028002415372783e-02 +-3.493115518263405217e-02,1.330718261876957451e-03,-4.749242797941333888e-02 +1.784801980406124046e-03,8.383714613132274562e-02,4.614463898382113738e-02 +-4.798790742447975322e-02,1.849656270805783223e-02,9.922148978073265166e-03 +-1.412031283103436230e-01,1.841951106739390638e-03,-1.013358454793825136e-01 +7.713850739225339322e-03,1.440305036810010098e-01,6.188737747708556586e-02 +3.306552271698676160e-02,5.380440070640010036e-02,-9.183766952412125706e-02 +-4.982458662064582350e-02,5.238642219706202835e-02,1.449805317988330519e-03 +-2.350250886016872973e-02,-7.125042766230318958e-02,-7.054347318528121635e-02 +8.133713520325316915e-02,6.265207245957096771e-02,-4.674052123894489874e-02 +-1.346375251729841488e-02,-1.548940318948013040e-01,-6.188656352626611956e-02 +8.709726934055528336e-02,-1.260819065930434378e-02,-1.094628073701191945e-01 +1.086903879028181148e-02,-8.900935115617954196e-02,-4.570341845917592384e-03 +-2.717778530793114183e-02,8.436320364943655781e-03,-7.578562938272148664e-02 +-1.445331114806376084e-02,5.443757663384583140e-02,1.413690450170831600e-03 +6.315631299833937562e-02,1.250365400896973900e-01,-1.897456722151342340e-02 +3.301247955501768888e-02,8.086111745942298201e-02,1.541189932858292588e-01 +5.096095619039420557e-03,1.955921469104309612e-02,1.304845413024355583e-01 +3.103015375880799342e-02,1.180617802896055668e-01,1.313285743502863034e-01 +-6.452743489723283994e-03,1.929418626101993273e-02,-1.311528090604189428e-02 +4.973212564222290188e-02,-4.638595013768646858e-02,-2.838159175808688262e-02 +-1.143893652427883101e-01,-4.555590474741538082e-02,6.480117092740561580e-02 +-3.352629383641867605e-02,-6.909795424601938851e-02,-1.031763991838682559e-01 +-2.537954779898507138e-02,-1.222717496487377153e-02,3.980436232194720092e-02 +6.341429439913198740e-02,-1.072691264778999481e-01,-7.726809691644871692e-02 +3.777637468748985816e-02,6.440963415902169198e-02,-6.589203412504136825e-02 +-5.640151107878745018e-02,3.808467267336766021e-02,6.710422894709755504e-02 +7.079769749453727889e-02,2.834544190154679455e-02,4.676282813627767598e-02 +-6.709422280945655237e-03,9.095328694905994993e-02,-9.132799567532384408e-03 +-3.881586806199022188e-02,-1.085809554425891665e-01,7.783022186146336396e-02 +1.188228236698451318e-02,-1.461068818896736447e-02,7.520601610366377254e-02 +1.587577835127012282e-01,-9.379457470532311103e-02,9.540921695128741411e-04 +4.197720132911215984e-02,-3.803402166978374355e-02,-1.418629663038001310e-01 +-9.990369197731044371e-02,-4.183513457646775846e-02,1.070042572722065127e-02 +-7.355164145399649411e-02,7.427889940251337919e-02,1.414893350474888123e-01 +1.166457215769516470e-01,-3.931593006609943042e-02,7.429976332008049467e-02 +-4.679542046073095762e-02,-1.315486698478800232e-02,1.735423369358882889e-02 +-1.210619623698484804e-01,-1.433625427419756571e-01,-7.118761916987577376e-02 +-1.179375336922520584e-01,-8.180809769502815632e-02,-2.078575817128379757e-02 +1.309612350892064292e-01,1.382137149667042320e-01,4.552640337327686082e-02 +5.186193276536065627e-02,-4.761436413932980394e-02,-1.478109840661364673e-02 +-2.527970731938481222e-02,-2.319165141216864706e-02,-6.383694276891187236e-02 diff --git a/tests/test_data/pls_loadings_q.csv b/tests/test_data/pls_loadings_q.csv new file mode 100644 index 0000000..02f1e7d --- /dev/null +++ b/tests/test_data/pls_loadings_q.csv @@ -0,0 +1 @@ +3.991342639508557721e-01,-1.295725609923081834e-01,7.162784330944188538e-02 diff --git a/tests/test_data/pls_scores_t.csv b/tests/test_data/pls_scores_t.csv new file mode 100644 index 0000000..5e92a92 --- /dev/null +++ b/tests/test_data/pls_scores_t.csv @@ -0,0 +1,50 @@ +1.011329566555039916e+00,-3.669789809268610981e-01,-6.376638350302648028e-01 +-2.000690896165061794e+00,-2.166679975195800467e-01,1.761514246744909862e+00 +3.551138784885355726e+00,-3.427477089286286915e+00,8.685353712918558733e-02 +1.679382057249887428e+00,-1.891880508204164535e+00,1.213025304299351292e+00 +-1.839507625785058220e+00,3.938822054681853757e+00,7.363075237112959304e-01 +-2.153911695503043511e+00,-1.804803861029697920e+00,5.361802225601405958e+00 +-9.045926410987831234e-01,7.643186020213781351e-01,-6.950385619864445363e-01 +4.759170203423399137e+00,2.742186641043574680e-01,-2.702421079378309887e+00 +-1.485730196042912565e+00,-4.234097011873641514e-01,2.068571764025657345e+00 +-2.425456817742470239e+00,1.141228820514480713e+00,-1.561563880849621055e+00 +8.936432617796312705e-01,-2.753577859690026219e-01,7.672452258493120958e-01 +8.637344188828686153e-01,-3.193342356313159325e+00,1.765001074828712824e+00 +2.194602044532769192e+00,1.619540616633838026e-01,9.898197454900456993e-01 +-2.165154463569163856e-01,-1.456081091768706148e+00,-2.925658246886301939e+00 +-2.309810989741895693e+00,-9.300417857054310566e-02,5.357154154318954919e-02 +3.154055974857623845e-02,-3.533337318242185443e+00,2.227831637327238878e-01 +1.301292647606810737e+00,6.379944693071581963e-01,-3.410014461457780977e-01 +1.285336036488829325e+00,1.629312833223380164e+00,2.049503556430533280e+00 +1.729196284413374141e+00,5.626588985851464386e+00,2.560336718969399961e+00 +6.119285970173256040e-01,2.687639409600836249e+00,-2.520746595558975289e-01 +3.942863152250998260e-01,-2.679742634273473145e-01,-1.111565600778093188e+00 +3.584944889112208488e-02,4.432349938463182148e+00,-1.149208559066060148e-01 +-4.000808528003844344e+00,-1.620912327876732562e+00,-2.268542209210293592e-01 +-1.424798661811524925e+00,-2.095803891308373745e-01,3.877499012016014102e-01 +3.632678330448580351e+00,-1.547812432056308918e+00,-8.339814617453271683e-01 +-9.097092058241605939e-01,-7.067944392999954140e-01,2.198753530737024064e+00 +-1.986535166935052166e+00,-9.561391068246283265e-01,7.364851605767818166e-01 +-7.983654995635971474e-01,-9.944810191735726779e-01,-2.508786079508363631e+00 +3.048733967989021298e-01,-1.094036000256310759e+00,-3.781616111899742005e+00 +1.456344508910062396e-01,1.507645381381693461e+00,1.751854042481358065e-01 +3.528817591266664611e+00,6.704522345197522215e-02,-1.364547148475401039e+00 +2.613978750697262043e+00,8.545290212225858939e-01,-3.571814668953269267e-01 +-2.536938406142258406e-01,-2.875635145423712125e+00,1.302927631183101509e+00 +-5.727257672050461323e+00,-2.456344458630524752e+00,3.030191687423076541e+00 +-3.219493365934903206e+00,4.462547699514346711e+00,-1.842409577829513090e+00 +-1.094052664037198142e+00,-2.034231873275589741e+00,-1.243605497808630389e+00 +-1.066746396929022289e+00,-3.014467735939165838e+00,-2.851547378073005845e+00 +2.103498094553400311e+00,5.272463673926996108e+00,-6.232248315745106959e-01 +2.509509478668253912e+00,2.000562815751983636e-01,2.085826333945217215e+00 +5.339700057503618424e+00,7.251844507253832894e-01,3.211503281830718204e-01 +-3.756833359300421726e+00,1.728598308327472965e+00,-2.267719342954214179e-01 +-8.646751912795777040e-01,-2.625728659846236823e+00,-3.533938712398341675e+00 +-4.114078416371444114e+00,-5.710296604031418477e-01,-3.134904559862016882e+00 +1.698660027973156739e-01,2.218661103555813696e+00,-3.016757923703364264e-01 +1.258302741824126159e+00,-2.399916638458758023e+00,-2.508864646079091543e+00 +-1.408561431033064970e+00,-1.178997091901940353e+00,1.202130326094278612e+00 +-4.098026792661868534e-01,2.420908857166508277e+00,-1.271294467639266124e+00 +4.566724098735230442e+00,-2.477758247795647684e+00,3.584758191498156776e+00 +-1.748813014218716655e-01,4.768410073183978470e-01,2.099136628958631956e+00 +-1.969503532071750884e+00,2.485271511140148881e+00,1.924813014878352657e-01 diff --git a/tests/test_data/pls_scores_t_mc.csv b/tests/test_data/pls_scores_t_mc.csv new file mode 100644 index 0000000..908bafc --- /dev/null +++ b/tests/test_data/pls_scores_t_mc.csv @@ -0,0 +1,50 @@ +1.003097044162079676e+00,5.469647234824303039e-01,-9.615321546406300213e-01 +-2.129306425081281429e+00,6.425803950064670200e-01,1.609416517669843616e+00 +3.555480901530872373e+00,3.685821902173445963e+00,-5.191861043090023609e-01 +1.652066791658564293e+00,1.430870757056072140e+00,1.436989211218600904e+00 +-2.035594346826290035e+00,-3.115815684429083188e+00,8.435275236125389098e-01 +-2.580546673415290648e+00,2.486310850515743187e+00,5.216412972625115607e+00 +-9.155379080391090607e-01,-2.849387989675116195e-01,-1.201409641110239956e+00 +4.852079129094727605e+00,-3.667278255688408706e-01,-1.950751451725418306e+00 +-1.202528034615381269e+00,-6.809897742239803264e-01,2.305158474913292288e+00 +-2.536113358324444178e+00,-4.234379815668600777e-01,-2.153867562015155279e+00 +8.619068759103432065e-01,1.160154763815585799e+00,-7.783838805902871805e-01 +7.533004060043826389e-01,3.425501878482952733e+00,1.285611729589371421e+00 +2.431291519385118782e+00,-1.070518908081204312e+00,8.003178712284174656e-01 +-1.634007761858478625e-01,2.072941361729407461e+00,-4.099573316553732028e+00 +-2.035004284542692776e+00,-6.364749464490330189e-01,-1.127600478598399514e-01 +-3.076666969807631546e-01,4.189970794428434786e+00,3.486814745345724331e-01 +1.312170258950697610e+00,-3.862645604113090214e-01,-4.418672156811475071e-01 +1.534105565297855467e+00,-2.050106808845657547e+00,1.802627865801752050e+00 +1.792994353372033389e+00,-5.200974952409243457e+00,2.667366410022083745e+00 +5.536918805422800238e-01,-2.174406345303419918e+00,-9.235336223935821653e-01 +3.682841202171726613e-01,4.718127365404711782e-01,-9.738366428575310207e-01 +1.141021725258884872e-01,-4.879975416960732559e+00,6.328848227568552032e-01 +-3.568533122826608395e+00,7.686671635637282174e-01,-1.134200076587180916e+00 +-1.514358508892910349e+00,-5.024854476823464866e-03,1.145869570381892411e+00 +3.241875279826579526e+00,2.150880943526610078e+00,-3.266863026871917319e-01 +-1.305796325758210585e+00,1.574733956462678997e+00,2.134310959289718923e+00 +-1.967428526767352803e+00,1.062400711834452061e+00,-5.533100295452730855e-01 +-4.661305651498280911e-01,-2.215489675625403332e-01,-1.542778910066176179e+00 +5.239071560174454190e-01,7.799428952241763691e-01,-3.954920676484404485e+00 +4.345703802402622884e-01,-1.789818977678074186e+00,-7.584410538164010340e-01 +3.671221100726643094e+00,-5.274894544597317214e-01,-1.762106680263327840e+00 +2.371751277161735949e+00,-4.794457725672080506e-01,6.462783726376830629e-02 +-6.196345699191435630e-01,2.704521745110001429e+00,3.092853713773468627e+00 +-5.526249322992770274e+00,1.856025493848030949e+00,2.376958620868382610e+00 +-3.099413244560197178e+00,-4.184777824730578466e+00,-2.056969933665969918e+00 +-1.054782763705141679e+00,1.807200041088361742e+00,-6.654897785863411741e-01 +-1.235452375981760387e+00,2.986648326555489064e+00,-1.571480061398866868e+00 +1.842282766279215833e+00,-3.870262924487541945e+00,-1.261874766320333130e+00 +2.395549441448606487e+00,-5.868923407619255350e-01,3.094031810935861770e+00 +5.345042061375237630e+00,-4.869969001188942381e-01,-3.653365883771031997e-01 +-3.765764630044770911e+00,-1.094994848443399116e+00,-8.124384800670082507e-01 +-1.232550842267862379e+00,3.226811698764341152e+00,-2.476384986239681840e+00 +-3.948465576078318495e+00,-2.897463087692812023e-01,-1.912642802250255514e+00 +2.740403453220522367e-01,-2.682366097464909505e+00,7.437850976113066226e-01 +8.863583657290798890e-01,2.993824752465640948e+00,-2.117729331294587070e+00 +-1.203051645109733503e+00,5.215530787110089772e-01,7.960821618427097457e-01 +-1.022778097459343671e-01,-3.052235351083766091e+00,-9.038435128034634225e-01 +4.581182461615738610e+00,2.134051890682603592e+00,3.515722643258283320e+00 +-2.459711446710144411e-03,-1.280154088962208281e+00,2.176781746260656902e+00 +-1.834303609136260116e+00,-2.857806146284373572e+00,2.033165747316387217e-01 diff --git a/tests/test_data/pls_scores_t_par.csv b/tests/test_data/pls_scores_t_par.csv new file mode 100644 index 0000000..85dbc73 --- /dev/null +++ b/tests/test_data/pls_scores_t_par.csv @@ -0,0 +1,50 @@ +1.001050506062373113e+00,4.589335327989976232e-01,-7.976429316964538385e-01 +-2.072589050872927885e+00,5.279733395422812059e-01,1.641614687368744274e+00 +3.553324788122830480e+00,3.529638199962391809e+00,-2.520120954161809146e-01 +1.657406730949424478e+00,1.661908194130184313e+00,1.344238591202923994e+00 +-1.935535933582966717e+00,-3.505713194599011207e+00,8.371782175003430471e-01 +-2.376499334183429735e+00,2.229735327680033574e+00,5.328954104470736475e+00 +-9.089015883943368790e-01,-4.926173205411252809e-01,-1.041030254936256227e+00 +4.790110806315968084e+00,-3.125100083321878386e-01,-2.400722507082455159e+00 +-1.337588632831684832e+00,-1.739485662431817237e-01,2.252703529083321499e+00 +-2.472750407338767609e+00,-7.518300588512126792e-01,-1.922960945451990478e+00 +8.788715477653459285e-01,7.209704747228751209e-01,-8.693721471376297805e-02 +8.080408388603477210e-01,3.301346076803534313e+00,1.561260378310763253e+00 +2.301615574810234932e+00,-6.433534596308603248e-01,9.297872886877138754e-01 +-1.854112641524765515e-01,1.771004067878989785e+00,-3.651828073185370727e+00 +-2.160650624573880574e+00,-3.287358375438162450e-01,1.132942557401495076e-02 +-1.394225851686888840e-01,3.909234944895022323e+00,2.452490426435374737e-01 +1.304117266771794181e+00,-5.187942379945778004e-01,-3.706543695966156848e-01 +1.403014918229378072e+00,-1.851969079954438158e+00,1.957322070287273119e+00 +1.766359983719714144e+00,-5.461021547502642903e+00,2.650375435650287326e+00 +5.924960461390967881e-01,-2.444132665611485233e+00,-6.596254945494047783e-01 +3.771246035889735948e-01,3.799085060339826847e-01,-1.019405657646698771e+00 +6.872811611870779935e-02,-4.651928956441309992e+00,3.498332329469729940e-01 +-3.769387841756500990e+00,1.194414811714794800e+00,-7.740803262252259342e-01 +-1.459981160160353397e+00,9.561589795556807436e-02,8.050478723568161854e-01 +3.419514190551960375e+00,1.895467407565850415e+00,-6.478499379432154370e-01 +-1.113225525622676404e+00,1.205897300263999217e+00,2.127099061901478905e+00 +-1.971974092614387164e+00,9.864498811887090213e-01,1.307063455393513429e-01 +-6.329616230696241130e-01,3.609048619644691369e-01,-1.955485436899764506e+00 +4.226135015068924194e-01,8.986914181399949797e-01,-3.903921838318978210e+00 +2.896041596658426309e-01,-1.679000014299882659e+00,-3.021441284332594956e-01 +3.598037484409662312e+00,-3.599326735633785468e-01,-1.537673462758059051e+00 +2.486096260374859757e+00,-6.701505538377227067e-01,-1.220452389536174076e-01 +-4.375493162078262777e-01,2.813867706784189959e+00,2.245025213077418424e+00 +-5.615807723835434473e+00,2.183663175343432350e+00,2.695841712457746731e+00 +-3.153313490859131374e+00,-4.324814176840963142e+00,-1.923933394439334199e+00 +-1.078853651354291454e+00,1.958815346772483590e+00,-9.960795926122389954e-01 +-1.151899383575016866e+00,3.025757268464168703e+00,-2.189298787760845855e+00 +1.963072205348215915e+00,-4.541658629673776204e+00,-1.026181983756734972e+00 +2.444271303644745874e+00,-4.194744221573839527e-01,2.694215529540626264e+00 +5.337313943980404041e+00,-6.660819098469201727e-01,-9.171444648768803387e-03 +-3.743053936358601508e+00,-1.438042776254957467e+00,-4.834373836646297384e-01 +-1.042883635325752900e+00,2.965731895625247638e+00,-3.106430462983024388e+00 +-4.023686292533890985e+00,1.369113008095093065e-01,-2.511060959288327066e+00 +2.173368821365546655e-01,-2.461814340024146119e+00,2.921973015259699546e-01 +1.065760502755694228e+00,2.752434308090657034e+00,-2.386238522657580408e+00 +-1.298007240452533573e+00,8.185763558957949160e-01,1.041404940639254040e+00 +-2.469681742007045211e-01,-2.779903903279543176e+00,-1.065164092162202092e+00 +4.565739262059418380e+00,2.284023226907522020e+00,3.573236136424792875e+00 +-8.791848550280323416e-02,-8.853692942324780102e-01,2.158990758176322799e+00 +-1.894800429359751126e+00,-2.705077200677677318e+00,2.694056624145923506e-01 diff --git a/tests/test_data/pls_scores_u.csv b/tests/test_data/pls_scores_u.csv new file mode 100644 index 0000000..57d9c4b --- /dev/null +++ b/tests/test_data/pls_scores_u.csv @@ -0,0 +1,50 @@ +9.955668755617853583e-01,4.855526524516971115e-02,-7.516886446505769426e-01 +-1.574201572930125304e+00,-1.313754245564228595e+00,1.984595210754439787e+00 +4.723215261750169702e+00,-3.610454854830882354e+00,3.310011385354403313e-01 +2.531167824642293063e+00,-2.623833956111778054e+00,1.324081228619621742e+00 +-3.262802848363484109e+00,4.384307037678547125e+00,-8.058686044912312108e-01 +-4.003439770534351627e-01,-5.401675750106649687e+00,6.506630392534899165e+00 +-1.402877933421416534e+00,1.534913965315060969e+00,-1.393983262617636276e+00 +3.836035167922740463e+00,2.843617661795502016e+00,-4.647963598507871552e+00 +-9.620785497484275473e-01,-1.613052275958413606e+00,2.152026753236742973e+00 +-3.148439809448775772e+00,2.227070932562751793e+00,-1.964254915278805802e+00 +1.093820274877522980e+00,-6.166236444724650934e-01,6.173394202936091091e-01 +2.233043452810669738e+00,-4.218008420860605234e+00,1.853589330782223987e+00 +2.327659218417708065e+00,-4.098682371887272247e-01,1.034408915185224709e+00 +-2.272244378138768214e-02,-5.969583903369914957e-01,-1.554126488916127258e+00 +-2.421004662121175599e+00,3.425200848174260737e-01,-7.878499697062488760e-01 +1.209825413312538345e+00,-3.629579087964557083e+00,1.740983952774673993e-01 +8.074856248593187402e-01,1.521119140107015655e+00,-1.597545311767648801e+00 +8.523956927165804442e-01,1.333625916805218026e+00,5.348885187943311914e-01 +3.687460986545239572e-01,4.190719696949556372e+00,2.597443290445965225e+00 +1.457843808063154778e-01,1.435906855644960567e+00,2.264345611982507833e+00 +2.413830549836606942e-01,4.710019603284357204e-01,-1.336785213688543639e+00 +-1.269733821241242566e+00,4.021708095912119418e+00,7.428384372830557636e-01 +-3.479573389670817196e+00,-1.605608484470915753e+00,-2.768418106001422144e-02 +-1.304840453805681699e+00,-3.695182891393034019e-01,2.893227318642009882e-01 +4.072574714203973656e+00,-1.355053245843271359e+00,-3.486954270634050612e-01 +-4.139110322053634050e-01,-1.527252665070535365e+00,1.484183644075749875e+00 +-1.508396674104498736e+00,-1.472853927876159874e+00,9.347211862443953745e-01 +-8.682524486083151860e-01,2.152791899234775541e-01,-2.188418933711385961e+00 +1.547602339715312657e-02,8.914573173318306454e-01,-3.591696219046950134e+00 +1.460956374309383419e-03,4.441108609295802423e-01,1.923901169596452521e+00 +3.002573951703205068e+00,1.621036630961160574e+00,-2.811122562508656220e+00 +2.361497418800685200e+00,7.777414430656672817e-01,1.389063623094932698e-01 +9.527970844980407916e-01,-3.716464841554361964e+00,1.521035006112925858e+00 +-4.688289655360470931e+00,-3.200428635771558117e+00,1.346025343936455121e+00 +-4.901342521557150000e+00,5.180754471971139807e+00,-1.299213916398620272e+00 +-5.060947315852337702e-01,-1.811140837273508053e+00,-4.035648085108056726e-01 +-9.281736413213256265e-01,-4.268583903069041452e-01,-4.680905556694407998e+00 +1.847966093526845766e-01,5.910352463300179160e+00,-1.153921160383050371e+00 +2.760312507407759242e+00,-7.725716116588163818e-01,1.759453882681290215e+00 +5.041677516621145827e+00,9.180262131497963773e-01,-3.488448048848027394e-01 +-4.764547582243204182e+00,3.104154703486586619e+00,-2.488339124495449806e+00 +-5.345352072477649319e-01,-1.016960524034923541e+00,-2.910211975800413686e+00 +-4.248356711856222212e+00,4.136297702418191835e-01,-1.781218563048339032e+00 +-4.252436756826875053e-01,1.833171017621909149e+00,6.973396847342571148e-01 +1.667696282012034681e+00,-1.261092534389561814e+00,-2.060097705951247971e+00 +-9.401470558563080893e-01,-1.442899834875327691e+00,4.773919286140115847e-01 +-1.507600710350950557e+00,3.381648134049977550e+00,-1.737947742107710969e+00 +6.287048347507809609e+00,-5.299272836255922492e+00,5.104032932061835837e+00 +5.818647351939167794e-02,-7.179400799785621290e-01,2.161322164028281811e+00 +-2.288715117148555134e+00,9.832967727000436753e-01,2.717026011305059718e+00 diff --git a/tests/test_data/pls_vip.csv b/tests/test_data/pls_vip.csv new file mode 100644 index 0000000..d41add4 --- /dev/null +++ b/tests/test_data/pls_vip.csv @@ -0,0 +1,200 @@ +5.750425261768675744e-01 +1.490848871164302647e+00 +4.546942353415627247e-01 +5.819648839146123187e-01 +6.390354491803724724e-01 +1.536312362783053942e+00 +1.623643692131508109e-01 +1.419449630936481910e+00 +8.376046534537529009e-01 +6.095597858087786758e-01 +1.385161956352654877e-01 +5.107408836089355475e-01 +4.852439835817803915e-01 +1.150958326319003078e+00 +4.239098075359954421e-01 +1.053921827223106344e+00 +5.094096242053384183e-01 +9.234937381195384987e-01 +1.170892725208347418e+00 +1.379062076286560190e+00 +3.400216094230863462e-01 +6.117317808758778730e-01 +1.699134232182628601e+00 +5.947497309500889839e-01 +8.366474916055621769e-01 +8.578099132524248382e-01 +4.248647529793826427e-01 +5.754294886431902123e-01 +9.565167435503323379e-01 +6.635064047482929217e-01 +1.248432481386336779e+00 +1.045318439211193162e+00 +5.958646604549366899e-01 +7.047535195086144233e-01 +7.388156005064920873e-01 +4.520206473693395566e-01 +1.973804980825417665e+00 +8.133007745154663404e-01 +2.905534247322680397e+00 +3.644716698901713792e-01 +8.127185873081587131e-01 +5.724522990527534105e-01 +7.572696896945109168e-01 +5.637114528792681600e-01 +6.511905494025606034e-01 +1.933422258740118416e-01 +2.946929765760276654e-01 +1.097633330025223897e+00 +9.630382076585517481e-01 +3.023621945573684577e-01 +8.827960675361314902e-01 +6.094957976879409323e-01 +1.005268975270235510e+00 +2.845275387711195259e-01 +1.212616552170017403e+00 +1.631601744200564807e+00 +7.457218240359523298e-01 +3.603862671610075785e-01 +3.674477086052200803e-01 +1.096143427516912849e+00 +8.287446784085031881e-01 +7.005518585338937898e-01 +5.900144778621863040e-01 +7.257052407474690048e-02 +9.862577062194981536e-01 +3.592753033447916300e-01 +6.567315411962980631e-01 +5.504860290488486907e-01 +1.876590218798690701e+00 +1.493849638172624061e-01 +9.022671037788058124e-01 +1.087885108178639371e+00 +2.262881746354604151e-01 +5.404695893220398117e-01 +5.775809751605072151e-01 +1.198625330078038731e+00 +9.513542818772363630e-01 +8.297774973561662382e-01 +2.079546902117708651e+00 +1.408711364786477516e+00 +8.234022412143665592e-01 +8.788892364085655329e-01 +5.712468109511742442e-01 +8.758346447458705830e-01 +1.112265596445130678e+00 +5.234392275475273637e-01 +3.056580545697974993e-01 +8.098342074584801153e-01 +3.626519997260781447e-01 +6.530126913927537524e-01 +8.306763864958722765e-01 +7.732633883467068259e-01 +1.668028839622798243e+00 +2.003135957872942630e+00 +5.523764052995175922e-01 +4.534489410387161912e-01 +5.771442235144146338e-01 +1.620524246526436007e+00 +5.905079085879940681e-01 +5.579640969090133851e-01 +5.897926834487293712e-01 +6.863697973957944010e-01 +1.517363731728410270e-01 +1.266394160797959190e+00 +1.577232199007428504e+00 +3.165733239612221750e-01 +1.301309224113545771e+00 +2.051993407437619599e+00 +9.730127570611890597e-01 +4.906230686245927619e-01 +1.570587367579580063e+00 +5.137637264735569476e-01 +5.559542507141496115e-01 +7.813928283150508580e-01 +1.299236281336149323e+00 +8.325167236604487098e-01 +1.514754293478953739e+00 +5.228346587534241641e-01 +1.569644287232777380e+00 +1.638294995676081167e-01 +1.386699057916350730e+00 +2.493063433911881344e+00 +2.049499354739134027e+00 +6.384848170402924739e-01 +4.031445705512562983e-01 +4.376262089927067667e-01 +4.971184293895524187e-01 +3.663181923639938775e-01 +8.431401900442118125e-01 +1.556200025856773639e+00 +1.066943205261712713e+00 +1.125796099020348828e+00 +1.101367708027533476e+00 +1.489136388298038849e+00 +6.271546169800630288e-01 +1.083241426071204216e+00 +8.192374722278104038e-01 +4.672130497728936294e-01 +3.562772357585491378e-01 +3.565809525469325059e-01 +7.672460081016432287e-01 +1.246859100083853811e+00 +1.215702088135475423e+00 +1.947517872506953296e+00 +1.497314948724544736e+00 +1.352230644582482766e+00 +1.280132462911683477e+00 +1.483569665348723143e+00 +9.941018222001986038e-01 +6.417627040587148279e-01 +1.062139009742971929e+00 +6.599811587620626474e-01 +4.415925709437253932e-01 +7.612616222919481590e-01 +6.033150763104597192e-02 +5.707902342318942335e-01 +2.243452400768695121e-01 +2.134677735205352977e+00 +8.474246060358782140e-01 +5.126726274705821762e-01 +4.484900958901832935e-01 +6.469788734060032409e-01 +1.969683135890363479e+00 +7.912114039683809663e-01 +5.582313652841360829e-01 +8.411493626405879276e-01 +4.135925727981902833e-01 +8.891835104329466333e-01 +8.936287048011416490e-01 +1.042803239410915461e+00 +7.035118330595763192e-01 +4.108724042926136799e-01 +4.346305969295636284e-01 +7.969320851779252424e-01 +4.916217795320073636e-01 +5.479743643621851623e-01 +5.668779543039319524e-01 +2.085626614109960530e-01 +7.102431665634365565e-01 +1.260346139988623104e+00 +5.298382923962765556e-01 +3.508982136049034195e-01 +1.212703991674092485e+00 +6.415505213747544344e-01 +7.763557164382870468e-01 +9.152972951846516381e-01 +6.425552791689566057e-01 +8.262043086519098578e-01 +2.400862843268833091e-01 +2.428925378493616449e+00 +6.027265684761664577e-01 +1.105183257004165753e+00 +1.086834789136150947e+00 +1.684000971704229244e+00 +5.455849994291064320e-01 +1.305812524694551335e+00 +1.276293979266136969e+00 +1.399715520086469489e+00 +8.041466628062057254e-01 +2.835957387164984578e-01 diff --git a/tests/test_data/pls_vip_mc.csv b/tests/test_data/pls_vip_mc.csv new file mode 100644 index 0000000..9123510 --- /dev/null +++ b/tests/test_data/pls_vip_mc.csv @@ -0,0 +1,200 @@ +6.371798895351868941e-01 +1.377059868082354255e+00 +4.573663546810367020e-01 +4.624942807445807658e-01 +6.801211278237282443e-01 +1.353172089858375449e+00 +2.317640445557411222e-01 +1.303067930135078045e+00 +7.840968715510343579e-01 +6.596057323986195264e-01 +2.151300981435146920e-01 +4.135018222953033007e-01 +5.256048757981335307e-01 +1.244405298993398912e+00 +3.680933075274016586e-01 +9.599161647158139798e-01 +4.292208529690712537e-01 +7.930038553730112127e-01 +1.421993514371333811e+00 +1.370738684591926271e+00 +2.880847800962240135e-01 +6.178993497482558883e-01 +1.618711911790567060e+00 +4.504876125029630973e-01 +1.022974220493443775e+00 +7.111132041511869506e-01 +3.690403987322054546e-01 +8.262379508884237778e-01 +8.683759423527218635e-01 +8.419952319173573674e-01 +1.235456069888477559e+00 +8.915294516615488440e-01 +5.184197466376007091e-01 +6.383114693779242677e-01 +6.411098093589573388e-01 +5.800999207145213221e-01 +2.078366192687599145e+00 +6.133810009211100311e-01 +3.047762207736431250e+00 +4.367534814624919326e-01 +8.209528763287872177e-01 +5.975441250103549207e-01 +7.099448658275052670e-01 +6.323004290507056036e-01 +6.701857601521646890e-01 +1.483774551522560325e-01 +2.913456233597182532e-01 +1.154651437894942401e+00 +1.048727352209106511e+00 +4.613507172961011649e-01 +8.134560349313325611e-01 +5.710489973350576509e-01 +1.099192340752338515e+00 +2.847845521861038232e-01 +1.255632170216205212e+00 +1.708093183723232267e+00 +5.444116340340422466e-01 +2.932101222856418055e-01 +3.647619877025510271e-01 +1.293860739789469250e+00 +8.979577128768120309e-01 +6.723607321228531886e-01 +4.755665804175682743e-01 +1.379979639269784675e-01 +9.157041957351355066e-01 +4.171167526411470039e-01 +6.747898251344770504e-01 +5.513537503368951542e-01 +1.887549449147233327e+00 +2.079419423047531579e-01 +1.016195661618046753e+00 +1.039269270981554971e+00 +3.186392953604545997e-01 +5.469703749934270443e-01 +5.753355552614399793e-01 +1.239752064029269851e+00 +8.996520737141662227e-01 +8.388977471020053756e-01 +2.259630706124101884e+00 +1.210806973760641947e+00 +8.049972669577157847e-01 +8.704563890342369437e-01 +4.752945388782541247e-01 +8.630212815570500462e-01 +1.074548612630758626e+00 +4.923561284731416965e-01 +3.606120988951446726e-01 +8.551244366923707041e-01 +3.645900992430090026e-01 +8.560981188379582774e-01 +9.490773620828966139e-01 +6.335330873441706867e-01 +1.622487415353606410e+00 +1.830019111953114619e+00 +5.237281352286818903e-01 +4.066558996740697318e-01 +4.944119633991799767e-01 +1.659690344050273492e+00 +7.522813592541771621e-01 +5.286408185796441783e-01 +4.792735202703065078e-01 +6.409849860712625302e-01 +1.268935335346033366e-01 +1.197258579324169236e+00 +1.596053548664907007e+00 +3.371161281108822627e-01 +1.158863106416633704e+00 +2.191601716651328857e+00 +1.207915756386402029e+00 +4.576423612892288606e-01 +1.817103432531348428e+00 +4.948091523103742007e-01 +4.604447335905614835e-01 +6.891453615162592694e-01 +1.249563127622343561e+00 +6.848244803037263351e-01 +1.273538765273054318e+00 +4.037955541077607458e-01 +1.649224594238388963e+00 +1.705294878098590483e-01 +1.274862204805701449e+00 +1.963594699502697383e+00 +1.822485380182363279e+00 +6.985549096086266507e-01 +4.719698886443491892e-01 +4.758162059169450675e-01 +5.118919322853049403e-01 +3.142373498654590924e-01 +9.278808387713060046e-01 +1.464556619009994565e+00 +1.199442053149140319e+00 +1.212809156164083246e+00 +1.115381192189575543e+00 +1.544922796480492577e+00 +4.911800444542577249e-01 +8.988243997696747645e-01 +8.565541486215179079e-01 +5.256180529818094138e-01 +3.343007587278380432e-01 +4.464457849633604036e-01 +8.827273968813216243e-01 +1.198510904389579190e+00 +1.094370785974028371e+00 +2.305240191122203353e+00 +1.479674086262695587e+00 +1.524559802768500338e+00 +1.374156249518633244e+00 +1.569068324697452388e+00 +1.011864002801957430e+00 +7.371798813450612942e-01 +1.058663230375688435e+00 +5.917960582877753728e-01 +7.352797516907325637e-01 +6.737320288564659920e-01 +2.904393055899630316e-02 +5.164440035314206146e-01 +1.899566211261565218e-01 +2.138271306455151510e+00 +8.314278951779010551e-01 +5.031317189247903610e-01 +4.494030267990369309e-01 +7.253604918913039157e-01 +1.848733317857318204e+00 +8.988389923178113916e-01 +4.711879772305703762e-01 +7.731773031567025223e-01 +3.195620957534641149e-01 +8.743545832639696425e-01 +1.090300857369010057e+00 +1.005045931061225861e+00 +7.110228117796241198e-01 +4.198496284786673027e-01 +3.879758830035415218e-01 +6.408737778563236009e-01 +4.409151097578681289e-01 +5.473310412578540340e-01 +6.280203811238789235e-01 +2.231859372354867421e-01 +7.187009584482411118e-01 +1.185018059191945916e+00 +3.390044212944502422e-01 +4.422749895165870027e-01 +1.208465116531225014e+00 +5.803485408010903290e-01 +6.725746423396395945e-01 +8.596898701614617000e-01 +5.901169015392633277e-01 +9.169957514811205579e-01 +2.439845832077909560e-01 +2.367906610556585356e+00 +5.622471929598436002e-01 +7.901570863778580867e-01 +1.044943860837542315e+00 +1.844776230567550357e+00 +7.540250272203822268e-01 +1.549690495255880984e+00 +1.329674134721154477e+00 +1.400401669340039623e+00 +8.302473609490200745e-01 +2.546910055780576831e-01 diff --git a/tests/test_data/pls_vip_par.csv b/tests/test_data/pls_vip_par.csv new file mode 100644 index 0000000..c0a9292 --- /dev/null +++ b/tests/test_data/pls_vip_par.csv @@ -0,0 +1,200 @@ +6.068280202229494602e-01 +1.436702477120425314e+00 +4.481371128277472637e-01 +5.268330140792488736e-01 +6.680369854875722879e-01 +1.443182888543296682e+00 +1.836027476579820128e-01 +1.364447811681173794e+00 +8.129267522410605906e-01 +6.358364722223939225e-01 +1.685617141013835973e-01 +4.642541072875670527e-01 +5.049992685297542971e-01 +1.198573119557579947e+00 +3.878864622340752466e-01 +1.009817578721187825e+00 +4.720255041495524662e-01 +8.536984839462901098e-01 +1.300891634764392846e+00 +1.381447627478776585e+00 +3.194288314775700077e-01 +6.156205850108803501e-01 +1.658858204534214842e+00 +5.207224442670014275e-01 +9.364987721826404377e-01 +7.889297842615909939e-01 +3.999767708944618194e-01 +7.027163495911963320e-01 +9.124402467028156494e-01 +7.505896163105029162e-01 +1.244796964202464107e+00 +9.693420266836437760e-01 +5.482987603112545738e-01 +6.717503177644633672e-01 +6.889036392452204671e-01 +5.155239750534660326e-01 +2.034530048953448578e+00 +7.068605217536705343e-01 +2.989106106991129330e+00 +3.963321705402511053e-01 +8.183436128831156342e-01 +5.858819094388445503e-01 +7.365715009428925875e-01 +5.978922505921069330e-01 +6.644494891696759442e-01 +1.714465756000899677e-01 +2.974055796023833409e-01 +1.136451896380894722e+00 +1.012401669204839427e+00 +3.746243233154629704e-01 +8.509514392946515571e-01 +5.951569405161410975e-01 +1.050592438945079365e+00 +2.848922476717509200e-01 +1.242192006931853721e+00 +1.677180767219349500e+00 +6.360165670677430105e-01 +3.298591075928301586e-01 +3.674387388956458222e-01 +1.196888328504578380e+00 +8.653877796454103599e-01 +6.878959483483477744e-01 +5.351472423148573299e-01 +9.872282957387060187e-02 +9.534807317957227912e-01 +3.935348347449477147e-01 +6.645679883947314126e-01 +5.467466982986777246e-01 +1.890713270794822209e+00 +1.360398373182414022e-01 +9.638261036125985726e-01 +1.065125209404213180e+00 +2.598377095957764560e-01 +5.467252589557777265e-01 +5.790811287557638964e-01 +1.222273758194069693e+00 +9.280054551825460685e-01 +8.361168037471620185e-01 +2.171723777714574588e+00 +1.311169567803354585e+00 +8.174256953418865823e-01 +8.776432248301664352e-01 +5.268185018404949460e-01 +8.724418742729598275e-01 +1.099946286701645848e+00 +5.062228083970794490e-01 +3.439967479653094906e-01 +8.356927284564883429e-01 +3.644260782050398051e-01 +7.572749354148384793e-01 +8.903596824169767165e-01 +6.975312070852437429e-01 +1.651063408588539172e+00 +1.919897598725114340e+00 +5.394827194738415210e-01 +4.303784419966975028e-01 +5.349670859608298690e-01 +1.645808211741577098e+00 +6.865184974120186467e-01 +5.440182289534516435e-01 +5.315411874418199956e-01 +6.657412927539730907e-01 +1.317901210856042005e-01 +1.244585537157019361e+00 +1.590316262219665600e+00 +3.235583509080119935e-01 +1.222331713876070536e+00 +2.126601744487691903e+00 +1.092173113231667658e+00 +4.698166687262433361e-01 +1.694844630655638396e+00 +5.076956271441784851e-01 +5.106335365696500483e-01 +7.339044306064993473e-01 +1.278712818619148539e+00 +7.587274805005362888e-01 +1.392172128111812013e+00 +4.612392926288169659e-01 +1.613944470277011600e+00 +1.665713118429999751e-01 +1.332015226490765647e+00 +2.217742726335131476e+00 +1.935781410536427716e+00 +6.680965452260331228e-01 +4.314560457490712042e-01 +4.609242269069911968e-01 +5.056690897481843638e-01 +3.389171203375627717e-01 +8.868785224082667007e-01 +1.515083204160304176e+00 +1.134970126466420037e+00 +1.171948646719209508e+00 +1.112186003316403049e+00 +1.520869640254645327e+00 +5.363447782615637927e-01 +9.885489214877937192e-01 +8.419850523655563190e-01 +5.001994938797418300e-01 +3.395717794301335024e-01 +4.002553993181576231e-01 +8.278847231886672375e-01 +1.225460131017739318e+00 +1.157563426690325858e+00 +2.122039295186334051e+00 +1.493275293317771313e+00 +1.446837126268762264e+00 +1.327985487999138181e+00 +1.531561154781025724e+00 +1.005732849789762184e+00 +6.917839235844238654e-01 +1.063070485111432095e+00 +6.219545905710394118e-01 +5.799567206867473068e-01 +7.141738010680623860e-01 +3.866291609574101784e-02 +5.436338767682059592e-01 +2.031617698215591739e-01 +2.143610151925893881e+00 +8.382159631911177966e-01 +5.049854373565704213e-01 +4.525516591845904490e-01 +6.839235292048974069e-01 +1.914763437714622096e+00 +8.468903743925215721e-01 +5.179360391004734776e-01 +8.076978989071479376e-01 +3.623793423735987562e-01 +8.835100546848347891e-01 +9.831579395121251563e-01 +1.028752317055812382e+00 +7.070803825250748798e-01 +4.133196749703174078e-01 +4.110040499642922951e-01 +7.181404733098425419e-01 +4.691986387425420291e-01 +5.544619144518471154e-01 +5.985148922149471362e-01 +1.900873050491839467e-01 +7.168939497739140743e-01 +1.223424493455495421e+00 +4.214612535164475871e-01 +3.983045327893945386e-01 +1.214578952594219885e+00 +6.137849718239345442e-01 +7.224130787483454830e-01 +8.901957138782962131e-01 +6.165919130748680477e-01 +8.812222949844595865e-01 +2.378898828811900623e-01 +2.404546844836417119e+00 +5.852569754485753561e-01 +9.314987166839922006e-01 +1.069063173772474284e+00 +1.765618857527030183e+00 +6.390322429943139371e-01 +1.426955758325990864e+00 +1.306965088206456294e+00 +1.411373924743234198e+00 +8.108958790070386335e-01 +2.690643404359293611e-01 diff --git a/tests/test_data/pls_weights_c.csv b/tests/test_data/pls_weights_c.csv new file mode 100644 index 0000000..02f1e7d --- /dev/null +++ b/tests/test_data/pls_weights_c.csv @@ -0,0 +1 @@ +3.991342639508557721e-01,-1.295725609923081834e-01,7.162784330944188538e-02 diff --git a/tests/test_data/pls_weights_w.csv b/tests/test_data/pls_weights_w.csv new file mode 100644 index 0000000..84bd8c4 --- /dev/null +++ b/tests/test_data/pls_weights_w.csv @@ -0,0 +1,200 @@ +-4.481015222498072048e-02,-2.100575251160895912e-02,-1.627888675555517854e-03 +1.137763171651607619e-01,-7.300806456363259644e-02,2.251270361390889443e-02 +-1.084767178331744013e-02,-6.397400787521538568e-02,7.492100998347103746e-02 +-6.425728009721705337e-04,5.440187439422081161e-02,1.708101825576869570e-01 +-1.887879173612575998e-02,8.600737993904164491e-02,1.079303660236350937e-01 +1.121513778533719252e-01,-1.049003175878766569e-01,-1.147908748734628032e-02 +1.093986433929471265e-02,-1.427249422189663663e-03,3.050655713584258730e-02 +-1.074904095845841540e-01,7.401510126143111268e-02,-3.428042507030332892e-02 +-6.635860428932459365e-02,-2.185528871173234629e-03,-3.540487282316469309e-02 +4.164631010868764804e-02,5.328024436827249327e-02,2.892559695081666112e-03 +-3.004992599071280596e-03,-1.303989510169190590e-02,3.830335540051855309e-02 +1.207930011545195297e-02,-2.139081696245940384e-02,1.659355318860963047e-01 +2.787221128250480864e-02,5.698973718373380459e-02,7.177132057146064052e-05 +8.625283856277224381e-02,-4.402423275201278879e-02,-1.050873145605626391e-01 +-2.544472967359828058e-02,-4.660322079750506968e-02,1.636247211927172387e-02 +-8.328792850122521130e-02,-2.136587021455475105e-02,-2.673436580918235259e-02 +-1.246896783072528291e-02,-7.495930336622212697e-02,6.931348145922655579e-02 +-6.588990385050805254e-02,-6.984209062434833248e-02,-9.932148859631114574e-03 +-1.267412088709973968e-02,-1.961869542852459070e-01,9.323330545629969490e-03 +9.892492067370224629e-02,9.971350390967578803e-02,-4.725030167047421931e-02 +2.447310304049201898e-03,-5.722696590638850361e-02,-5.305468168002342756e-03 +4.220434621146159498e-02,3.659240360867557079e-02,7.699364690321591764e-02 +1.339773762583723882e-01,-4.397166238226548479e-02,-1.357578339731126821e-02 +3.715635014134650860e-02,-5.271726983952267770e-02,7.032241967815473782e-02 +-2.512004662508692324e-02,-1.311056531451471330e-01,5.317307686850786599e-03 +-4.765083305820065618e-02,-1.011001324132189544e-01,-5.244676241755184820e-02 +6.179512481999685459e-04,3.493715378355496948e-02,1.307429245625788272e-01 +-1.091417275753833564e-02,-9.180521270928178323e-02,4.709822923545316925e-02 +-7.487712802270643508e-02,6.565372271206034935e-03,6.420233457695199986e-02 +-1.007752857237777288e-03,-1.037089585452035112e-01,8.925020201835988376e-02 +9.626031341803276131e-02,-4.139071302332487240e-02,7.389321008362395582e-02 +7.311785141670107402e-02,-5.831251232302968324e-02,1.291921035207527768e-01 +4.150868643696691701e-02,3.486360386103468101e-02,7.225470847294808430e-02 +-2.020004770533375196e-02,-1.091107152473242553e-01,-4.534316433891374259e-02 +3.532385713636967961e-02,9.229655438435473147e-02,-8.051657521307238607e-02 +3.475312445868312949e-02,9.232478338972815654e-03,-3.814910634636816539e-02 +1.468316969734774768e-01,1.209241731750100024e-01,5.117259643851813748e-03 +-3.513665973844662394e-02,-1.075657661562399725e-01,-8.860881903223266631e-02 +2.234154627004619198e-01,1.161604816176344673e-01,1.291219292377036310e-01 +2.595053941753392227e-02,2.422849427135839208e-03,5.777875488491995143e-02 +-6.247729792112797359e-02,-2.630028342772425601e-02,5.403083250745223387e-02 +4.478031072595151096e-02,1.458731981342546204e-02,2.600743884189336830e-02 +5.810041781940230438e-02,2.278396213792037786e-02,-5.609327023331802525e-02 +-4.382365653315639653e-02,-1.041032480628623427e-02,3.934297841224126263e-02 +-4.833514758064073186e-02,-1.181390175742283270e-02,-8.061915606264576095e-02 +9.443889169035206421e-03,1.761296065473939073e-03,-5.372934602011996547e-02 +-1.472099990214788615e-02,6.956016438092000806e-03,-7.964295233870416491e-02 +3.690013691066560547e-02,1.681872141224956541e-01,-1.762019192167610035e-02 +2.709930011795470481e-02,-1.313488810581368016e-01,-1.611089355892348085e-01 +-1.588157462655559807e-02,3.211564654926512413e-02,-4.424583709100482487e-02 +-3.258276742413239446e-02,-1.322756310514248967e-01,-1.222614297260353998e-02 +-2.893676413602084413e-02,5.643360611162075158e-02,-1.263713643357980421e-01 +7.897439704385973702e-02,-2.312582013951908211e-02,3.972678696094437967e-02 +-2.256310506726648749e-02,-5.309941482718659629e-03,2.409268919303557757e-03 +-8.332541043082096477e-02,-9.744968337432581562e-02,-7.760924602455536447e-02 +-1.076153702717996402e-01,-1.469841581304683065e-01,1.050672154466424368e-01 +3.761528807896555304e-02,9.682330175339116940e-02,-2.807849751690830523e-02 +1.022099018874239465e-03,4.548769684341868146e-03,-1.264977567051563945e-01 +-2.595215102011269592e-02,2.797091460457718642e-03,-5.998750147381583936e-02 +-7.933499655175088594e-02,-1.294821151228555539e-02,-1.604611034142645054e-01 +-6.287752325614051618e-02,-4.060620354572409829e-02,3.249798257900120974e-02 +5.066199220208326276e-02,-4.962283163788952511e-02,-1.484807535579583601e-02 +1.230761456787392641e-02,-5.726083497627999092e-02,1.613084899451254217e-01 +5.692932448595573389e-03,-6.557248660202259077e-04,4.502462535723538925e-03 +-1.201364562971803975e-02,1.646304273647765104e-01,-1.890834083810553901e-02 +1.533937592778015016e-02,4.549445985519348645e-02,-4.957102519168973820e-02 +4.138356308522903731e-02,-6.605017727270112715e-02,-3.517258754992606123e-02 +-3.079031119555135365e-02,2.559128997631070126e-03,1.382043176672609897e-01 +1.441749126077830068e-01,8.167141667772369329e-02,-5.589368963477977376e-02 +1.024740439640414898e-02,1.243917915087452454e-02,-7.242350765905459543e-03 +6.556505125645316345e-02,5.920386574014836756e-02,4.554287021264678131e-02 +8.015357854538618376e-02,-6.394150122445564632e-02,-6.300753651667134747e-02 +1.242851875885273710e-02,1.800534550449018820e-02,-4.402864270676664499e-02 +-4.018745439718363066e-02,-3.288992322258448009e-02,9.687316962201290502e-03 +-4.569301880429487567e-02,-4.094375614413370799e-03,-2.548911634326047476e-02 +-9.465031890403322046e-02,-2.754002525385838493e-02,-2.157731896951211106e-02 +7.558391393916857881e-02,-8.771210207824337371e-03,2.612224045787057969e-02 +-6.178289220359074047e-02,4.174935167704012240e-02,-5.931291174856578863e-02 +-1.569805304151499215e-01,7.867305262646144548e-02,1.723573668174349371e-01 +1.095085884604144189e-01,2.589860945187597366e-02,9.859105163607129185e-02 +6.464332387201073005e-02,2.502087017240943456e-02,3.152303619295462531e-03 +6.165864619926510193e-02,1.340107202500398671e-02,-1.449290152196764103e-01 +1.047588958509890894e-02,8.753834160152043631e-02,-7.157727143675378378e-02 +-6.289554957588959494e-02,-4.683827280409626204e-02,9.277374361075943487e-02 +-8.189638575330236703e-02,-6.493716093218887542e-02,6.758461926123657260e-02 +-3.952803998591802870e-02,-2.794075800528874470e-02,1.323105123788453213e-02 +-8.452489699194898690e-03,1.597496250557680492e-02,9.535245007134504625e-02 +6.171291218591648531e-02,3.321098324819102970e-02,4.903684776866513301e-02 +1.202436292652209714e-02,4.412284944380195223e-02,-7.112808312195408045e-02 +6.233948433700760641e-03,-1.093779172796058297e-01,-1.666921389668042652e-02 +3.207619426391904172e-02,-1.229055749262133179e-01,8.634702191963139137e-03 +6.056654884168786307e-02,2.345657647986310046e-02,-1.867825524739361032e-02 +1.266900311618771036e-01,6.103692729821858648e-02,-1.281306685646420307e-01 +1.509271130944475348e-01,-9.873876539670406460e-02,1.089696829549569312e-01 +-8.439352584763115325e-03,-8.346116647846413272e-02,-7.915617884415224181e-02 +3.301408059261604772e-02,2.162448801847626639e-02,4.746847599944246932e-02 +-1.863392562225278442e-03,9.657143418184242767e-02,2.869361667069866492e-02 +1.282300459770612799e-01,-1.307462887208556135e-02,-6.929622432475053551e-02 +1.791631072326385632e-02,-7.163039902383781798e-02,-1.214989805531224570e-01 +-3.776850183986667914e-02,4.331199418454238087e-02,-5.203123104756895295e-02 +2.302960896966162879e-02,-8.517519670677993482e-02,3.704321305027975797e-02 +-5.391658739102922482e-02,-4.422615148193317393e-03,-4.173899243581741941e-02 +1.016732408611786126e-02,1.386583786661271540e-03,-2.888932996230486605e-02 +-2.161169755193141639e-02,2.070885370337854636e-01,-6.272959676345694902e-02 +-1.173852137806671442e-01,8.228970267206450750e-02,1.043489904711983052e-01 +2.513091628247368300e-02,-5.228561805101430461e-03,-3.740458026332941360e-03 +-1.028459812462138023e-01,-1.701137436535066910e-02,-5.311102296370479037e-02 +1.630191923379450125e-01,-3.300320250439157943e-02,-7.891064535569839930e-03 +-6.590888376700169971e-02,-8.463134873822866777e-02,-4.238030081869893079e-02 +-3.203114126520271304e-02,-3.124254750791289476e-02,7.515109650587249723e-02 +1.192919766630908401e-01,-1.148443438961313859e-02,1.681948948354917706e-01 +-2.299672440236539411e-02,7.193716549071635380e-02,-3.165754287950928517e-03 +-1.427674336062244309e-02,-7.917264454912445459e-02,8.484561760942579967e-02 +-5.796602392451447039e-02,2.865480821466673614e-02,-8.213135427291194668e-02 +-9.537941543733381711e-02,-8.547937568489834270e-02,-2.355932956494476149e-02 +6.486182614277392899e-02,2.288715058192439776e-03,-6.342297047338510407e-02 +1.070011983597442817e-01,1.123463685828224035e-01,8.331090917786500294e-02 +3.469892424468176001e-02,4.881029119850970044e-02,-1.155663963324749660e-02 +-1.235112640736066719e-01,3.888286454872514480e-02,4.458717035739883511e-02 +-8.955742447420823524e-03,-2.014917807121827803e-02,2.740436301352333452e-03 +1.076097809742004446e-01,-4.450854701533395880e-02,6.659958187289413689e-02 +1.930530146402360814e-01,-9.786452207243268031e-02,-6.064390625999552253e-02 +1.634774506730106991e-01,3.003903572489032350e-03,2.371181164974178399e-02 +4.366950455070807424e-02,-4.274559031302411355e-02,7.423266679669801582e-02 +-2.721274743174679003e-02,2.729300208995294810e-02,-5.010250797000288109e-02 +-2.041852316395531552e-02,5.188398791528180121e-02,-6.299521721507439498e-02 +3.677124031477993493e-02,1.290005059460506802e-02,-6.001879896607012488e-02 +-1.010596425157897840e-02,-5.526500058142216204e-02,3.763996780096039163e-02 +6.212458617317440784e-02,5.319315491787301314e-02,-2.750269529505630986e-02 +1.124557789623360227e-01,-1.074015123940817024e-01,-6.424780474549321441e-02 +7.725395728844959564e-02,7.586308013617228119e-02,-5.951623870099368059e-03 +-8.924497545246362629e-02,2.207190361665711809e-02,-3.098405789838612630e-04 +-8.569608912597199979e-02,-3.331580816766981784e-02,-5.140221785284610628e-02 +1.187560936320312677e-01,8.052463602726368103e-03,-1.218677931929619020e-02 +4.048125726139880504e-02,6.214592423359174833e-02,-1.161100558165229814e-02 +-4.311231908772836935e-02,1.553816636326074141e-01,6.855270020567269529e-02 +-6.119517087454121734e-02,-4.440694550540586621e-02,-4.215319300986799383e-02 +-2.874645284554699226e-02,1.936368993962736887e-02,9.674766542565613192e-02 +2.256894506011715776e-02,3.545279263302578837e-02,-1.943202120638813646e-02 +-2.257652644015765986e-02,2.479068083854226237e-02,5.641278705284898803e-02 +5.137001038896624183e-02,-2.297181125195156548e-02,-1.390860671944124105e-01 +-7.557118063850677692e-02,1.351303657382773304e-01,4.973740078560683064e-02 +8.644218120977291420e-02,-9.111168490096190065e-02,4.276451214724596994e-02 +1.543579669542195221e-01,-1.522279867033519279e-03,-8.046023961754732168e-02 +-8.603811280811693440e-02,1.609029659157435732e-01,-1.473607840996028207e-01 +-9.246533252275530856e-02,-1.159171532358616030e-01,-4.551436695807857535e-02 +-7.583619542851864626e-02,1.381851036850403336e-01,9.221378747383997265e-02 +1.154456296694848089e-01,5.157821241835559845e-02,-4.408246167738821136e-02 +7.287964653356594769e-02,-6.629142229105514095e-02,-1.001248459324076932e-02 +-3.463368435310139326e-02,7.376837677556562223e-02,6.434660785885687462e-02 +7.629634861935745416e-02,7.827695453049712815e-02,4.146349528431497906e-03 +4.241651506450032361e-02,-6.038371272816654006e-02,-5.646228962265820162e-02 +1.069937554108166614e-02,5.355121150315392958e-02,9.761681081194467646e-02 +3.878821829466541637e-02,-9.614968936266131416e-02,5.011710555180769189e-02 +1.847939523749022933e-04,-8.609678013210763162e-03,-1.138060376875699511e-02 +-3.771881912776699902e-02,-4.573028031194456555e-02,6.035533900533757851e-02 +1.651775116278656266e-02,8.322124693872645293e-03,2.509684239169892098e-02 +-1.686148401602619862e-01,2.099723862104129965e-02,-9.836661394446090390e-02 +5.642463559427131348e-02,-7.825449041389649640e-02,2.309897935678035738e-02 +-3.944521846454859815e-02,1.549109738006154875e-02,-3.553432754235436725e-02 +-1.636073771756772419e-02,6.227079793083068610e-02,5.411900871104625976e-02 +-5.119716024281695949e-02,1.101332542795292919e-02,1.877857946945244577e-02 +-1.539886632446984815e-01,4.387664823348817050e-02,-1.054826769381755763e-01 +-2.642756760170813721e-02,1.171645152454527661e-01,6.741802778372694982e-02 +8.334288604192274796e-03,8.487119742103088615e-02,-7.795961682493118827e-02 +-6.336339670187038364e-02,4.646169366271134249e-02,1.486762766604092512e-02 +-3.220955680775497779e-03,-6.960104360513530430e-02,-4.138996056629184669e-03 +5.565895365730087752e-02,8.812087603311813400e-02,-6.391190523508645527e-02 +2.692305036879621277e-02,-1.385970593022982367e-01,-4.089593627525837938e-02 +7.617229454902740837e-02,3.749168715651997330e-02,-1.257215963839017903e-01 +3.696876181426871771e-02,-8.956749733152413739e-02,1.400622740795065069e-03 +-3.170576099001960746e-02,1.553884113827328460e-02,-1.782320214942294603e-02 +-2.720518882477501385e-02,4.376114523250165117e-02,2.679164217514815038e-02 +2.787393177103167710e-02,1.210800047005235469e-01,9.928605955985542533e-03 +2.348390169953751272e-02,3.269961412462415312e-02,1.208574022028259670e-01 +1.731012648091375186e-02,-4.191539410677503491e-02,1.542655649490707048e-01 +5.354504555936468249e-03,8.811218568679088370e-02,7.515608837128248676e-02 +-1.288634985843228192e-02,2.207847266163803779e-02,-6.986941811764904413e-03 +5.241594708433037347e-02,-9.210180875610252810e-03,-9.328958995887140504e-02 +-9.039347534166825016e-02,-8.234768632260375254e-02,9.232600387659049834e-02 +-2.877371988441983219e-02,-1.630960429627192551e-02,-1.324681000331321690e-01 +-1.382519825371628097e-02,-3.965153848997704511e-02,6.881922496624162666e-02 +8.747858400290296765e-02,-8.258241640686708740e-02,-6.194930476689688298e-02 +9.055158599970358768e-03,9.856378333642804024e-02,-8.570707843844672935e-02 +-5.989026932932726283e-02,1.197251576226987871e-02,6.552634846652735656e-02 +7.110843256931863310e-02,-1.066362388432820583e-03,7.380654702313849125e-02 +-3.158513963338049901e-02,8.536702652117281187e-02,1.401826929382965319e-02 +7.663443362488730039e-04,-1.358359128982640773e-01,6.839411411938578489e-02 +1.709810848736055544e-02,-1.789936589323667254e-02,8.252671044285325025e-03 +1.879628711835738542e-01,-1.002243054312781240e-01,1.613488987253302101e-02 +3.864171808575817685e-02,1.144651559037168816e-02,-1.241674112888755954e-01 +-8.415026606373236795e-02,-5.406168227072722515e-02,3.068153379609044745e-02 +-8.151791119552402598e-02,2.733817685194261590e-02,1.177939514376932090e-01 +1.319030582859322120e-01,-5.235923246050725594e-02,3.273111373986173356e-02 +-4.313746261112285513e-02,-1.255316501376230881e-02,-1.509922491683154608e-03 +-8.742274795993855430e-02,-1.154410812760385124e-01,-7.006665209391894911e-02 +-9.457054712837303923e-02,-8.018945276861712268e-02,-4.061858691056965780e-03 +9.480381191172536359e-02,1.240829222972004986e-01,3.546008273933978078e-02 +6.167454683850853714e-02,-3.367435294252771327e-02,-3.498133204464357049e-02 +-2.099720045323187623e-02,-1.469645566559703645e-02,-2.131800749652465465e-02 diff --git a/tests/test_pca.py b/tests/test_pca.py index f4165db..61a7a33 100644 --- a/tests/test_pca.py +++ b/tests/test_pca.py @@ -35,10 +35,28 @@ def setUp(self): 'S0': 0.9803124001345157, 'VarExp': np.array([9.44045066, 8.79710591, 8.11561924]), 'VarExpRatio': np.array([0.04625821, 0.04310582, 0.03976653])} + self.expected_cvParameters = {'Q2': -0.10571035538454221, 'Mean_VarExp_Test': -0.0090083829247783621, + 'Stdev_VarExp_Test': 0.0037778709253728452, + 'Mean_VarExpRatio_Training': np.array([0.05108043, 0.04669199, 0.04380617]), + 'Stdev_VarExpRatio_Training': np.array([0.00130025, 0.00094489, 0.00044059])} self.expected_scores = np.loadtxt('./test_data/pca_scores.csv', delimiter=',') self.expected_loadings = np.loadtxt('./test_data/pca_loadings.csv', delimiter=',') + self.expected_scores_mc = np.loadtxt('./test_data/pca_scores_mc.csv', delimiter=',') + self.expected_loadings_mc = np.loadtxt('./test_data/pca_loadings_mc.csv', delimiter=',') + + self.expected_scores_par = np.loadtxt('./test_data/pca_scores_par.csv', delimiter=',') + self.expected_loadings_par = np.loadtxt('./test_data/pca_loadings_par.csv', delimiter=',') + + self.expected_dmodx = np.loadtxt('./test_data/pca_dmodx.csv', delimiter=',') + cvloadings = np.loadtxt('./test_data/pca_cvloads.csv', delimiter=',') + self.expected_cv_meanloadings = cvloadings[0:3, :] + self.expected_cv_stdevloadings = cvloadings[3::, :] + + self.expected_t2 = np.array([ 9.00313686, 8.69095296, 8.34753638]) + self.expected_outlier_dmodx = np.array([]) + self.expected_outlier_t2 = np.array([14]) self.x_scaler = ChemometricsScaler(1) self.pcamodel = ChemometricsPCA(ncomps=3, scaler=self.x_scaler) @@ -65,25 +83,45 @@ def test_cv(self): np.random.seed(0) self.pcamodel.cross_validation(self.xmat, cv_method=KFold(7, True)) - assert_allclose(self.pcamodel.cvParameters['Q2X'], self.expectedcvParams['Q2X']) - assert_allclose(self.pcamodel.cvParameters['Mean_R2XTrain'], self.expectedcvParams['Mean_T2XTrain']) - assert_allclose(self.pcamodel.cvParameters['Stdev_R2XTrain'], self.expectedcvParams['Stdev_R2XTrain']) - assert_allclose(self.pcamodel.cvParameters['Mean_R2XTest'], self.expectedcvParams['Mean_R2XTest']) - assert_allclose(self.pcamodel.cvParameters['Stdev_R2XTest'], self.expectedcvParams['Stdev_R2XTest']) + assert_allclose(self.pcamodel.cvParameters['Q2'], self.expected_cvParameters['Q2'], rtol=1e-5) + assert_allclose(self.pcamodel.cvParameters['Mean_VarExpRatio_Training'], self.expected_cvParameters['Mean_VarExpRatio_Training'], rtol=1e-5) + assert_allclose(self.pcamodel.cvParameters['Stdev_VarExpRatio_Training'], self.expected_cvParameters['Stdev_VarExpRatio_Training'], rtol=1e-5) + assert_allclose(self.pcamodel.cvParameters['Mean_VarExp_Test'], self.expected_cvParameters['Mean_VarExp_Test'], rtol=1e-5) + assert_allclose(self.pcamodel.cvParameters['Stdev_VarExp_Test'], self.expected_cvParameters['Stdev_VarExp_Test'], rtol=1e-5) - def HotellingT2(self): - pass + assert_allclose(np.array(self.pcamodel.cvParameters['Mean_Loadings']), self.expected_cv_meanloadings) + assert_allclose(np.array(self.pcamodel.cvParameters['Stdev_Loadings']), self.expected_cv_stdevloadings) + + def test_hotellingT2(self): + self.pcamodel.fit(self.xmat) + assert_allclose(self.pcamodel.hotelling_T2(None, 0.05), self.expected_t2, rtol=1e-05) def test_dmodx(self): - pass + self.pcamodel.fit(self.xmat) + assert_allclose(self.pcamodel.dmodx(self.xmat), self.expected_dmodx) def test_scalers(self): - pass + x_scaler_par = ChemometricsScaler(1 / 2) + x_scaler_mc = ChemometricsScaler(0) + + pareto_model = ChemometricsPCA(ncomps=3, scaler=x_scaler_par) + mc_model = ChemometricsPCA(ncomps=3, scaler=x_scaler_mc) + + pareto_model.fit(self.xmat) + mc_model.fit(self.xmat) + + assert_allclose(pareto_model.loadings, self.expected_loadings_par) + assert_allclose(pareto_model.scores, self.expected_scores_par) + + assert_allclose(mc_model.loadings, self.expected_loadings_mc) + assert_allclose(mc_model.scores, self.expected_scores_mc) def test_outliers(self): - outliers_t2 = self.pcamodel.outlier() - outliers_dmodx = self.pcamodel.outlier(self.xmat) - self.assertAlmostEqual(self.pcamodel.cvParameters, self.outliers) + self.pcamodel.fit(self.xmat) + outliers_t2 = self.pcamodel.outlier(self.xmat) + outliers_dmodx = self.pcamodel.outlier(self.xmat, measure='DmodX') + assert_allclose(outliers_t2, self.expected_outlier_t2) + assert_allclose(outliers_dmodx, self.expected_outlier_dmodx) return None diff --git a/tests/test_pls_da.py b/tests/test_pls_da.py index bf7dcd3..4f46a57 100644 --- a/tests/test_pls_da.py +++ b/tests/test_pls_da.py @@ -32,38 +32,8 @@ def setUp(self): finally: # Load expected values for a PLS da with 2 classes - self.expected_loadings_p = pds.read_csv('./test_data/pls_da_loadings_p.csv') - self.expected_weights_w = pds.read_csv('./test_data/pls_da_weights_w.csv') - self.expected_scores_t = pds.read_csv('./test_data/pls_da_scores_t.csv') - self.expected_scores_u = pds.read_csv('./test_data/pls_da_scores_u.csv') - self.expected_weights_c = pds.read_csv('./test_data/pls_da_weights_c.csv') - self.expected_loadings_q = pds.read_csv('./test_data/pls_da_loadings_q.csv') - self.expected_betacoefs = pds.read_csv('./test_data/pls_da_betacoefs.csv') - self.expected_vipsw = pds.read_csv('./test_data/pls_da_vipsw.csv') self.expected_cvParams = pds.read_csv('./test_data/pls_da_cvoarams.csv') - # Make a single file out of this - self.expected_t2 = pds.read_csv('./test_data/pls_da_cvParams.csv') - self.expected_dmodx = pds.read_csv('./test_data/pls_da_cvParams.csv') - self.expected_outliers_dmodx = pds.read_csv('./test_data/pls_da_cvParams.csv') - self.expected_outliers_t2 = pds.read_csv('./test_data/pls_da_cvparams.csv') - - # Load expected values for a PLS da model with multiple classes - self.expected_loadings_p_multiclass = pds.read_csv('./test_data/pls_da_multi_loadings_p.csv') - self.expected_weights_w_multiclass = pds.read_csv('./test_data/pls_da_multi_weights_w.csv') - self.expected_scores_t_multiclass = pds.read_csv('./test_data/pls_da_multi_scores_t.csv') - self.expected_scores_u_multiclass = pds.read_csv('./test_data/pls_da_multi_scores_u.csv') - self.expected_weights_c_multiclass = pds.read_csv('./test_data/pls_da_multi_weights_c.csv') - self.expected_loadings_q_multiclass = pds.read_csv('./test_data/pls_da_multi_loadings_q.csv') - self.expected_betacoefs_multiclass = pds.read_csv('./test_data/pls_da_multi_betacoefs.csv') - self.expected_vipsw_multiclass = pds.read_csv('./test_data/pls_da_multi_vipsw.csv') - - # Make a single file out of this - self.expected_t2_multi = pds.read_csv('./test_data/pls_da_multi_cvParams.csv') - self.expected_dmodx_multi = pds.read_csv('./test_data/pls_da_multi_cvParams.csv') - self.expected_outliers_dmodx_multi = pds.read_csv('./test_data/pls_da_multi_cvParams.csv') - self.expected_outliers_t2_multi = pds.read_csv('./test_data/pls_da_multi_cvParams.csv') - # check this self.da_mat = multiclass['Class_Vector'].values self.da = two_class['Class'].values @@ -97,58 +67,6 @@ def test_multi_y(self): self.assertAlmostEqual(self.plsda_multiy.beta_coeffs, self.expected_betacoefs_yblock) self.assertAlmostEqual(self.plsda_multiy.VIP(), self.expected_vipsw_yblock) - def test_scalers(self): - x_scaler_par = ChemometricsScaler(1 / 2) - y_scaler_par = ChemometricsScaler(1 / 2) - x_scaler_mc = ChemometricsScaler(0) - y_scaler_mc = ChemometricsScaler(0) - - pareto_model = ChemometricsPLSDA(n_comps=3, xscaler=x_scaler_par, y_scaler=y_scaler_par) - pareto_model_multiy = ChemometricsPLSDA(n_comps=3, xscaler=x_scaler_par, y_scaler=y_scaler_par) - mc_model = ChemometricsPLSDA(n_comps=3, xscaler=x_scaler_mc, yscaler=y_scaler_mc) - mc_model_multiy = ChemometricsPLSDA(n_comps=3, xscaler=x_scaler_mc, yscaler=y_scaler_mc) - - pareto_model.fit(self.xmat, self.da) - pareto_model_multiy.fit(self.xmat_multi, self.da_mat) - mc_model.fit(self.xmat, self.da) - mc_model_multiy.fit(self.xmat_multi, self.da_mat) - - self.assertAlmostEqual(pareto_model.loadings_p, self.expected_loadings_p_par) - self.assertAlmostEqual(pareto_model.loadings_q, self.expected_loadings_q_par) - self.assertAlmostEqual(pareto_model.weights_w, self.expected_weights_w_par) - self.assertAlmostEqual(pareto_model.weights_c, self.expected_weights_c_par) - self.assertAlmostEqual(pareto_model.scores_t, self.expected_scores_t_par) - self.assertAlmostEqual(pareto_model.scores_u, self.expected_scores_u_par) - self.assertAlmostEqual(pareto_model.beta_coeffs, self.expected_betacoefs_par) - self.assertAlmostEqual(pareto_model.VIP(), self.expected_vipsw_par) - - self.assertAlmostEqual(pareto_model_multiy.loadings_p, self.expected_loadings_p_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.loadings_q, self.expected_loadings_q_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.weights_w, self.expected_weights_w_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.weights_c, self.expected_weights_c_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.scores_t, self.expected_scores_t_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.scores_u, self.expected_scores_u_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.beta_coeffs, self.expected_betacoefs_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.VIP(), self.expected_vipsw_yblock_par) - - self.assertAlmostEqual(mc_model.loadings_p, self.expected_loadings_p_mc) - self.assertAlmostEqual(mc_model.loadings_q, self.expected_loadings_q_mc) - self.assertAlmostEqual(mc_model.weights_w, self.expected_weights_w_mc) - self.assertAlmostEqual(mc_model.weights_c, self.expected_weights_c_mc) - self.assertAlmostEqual(mc_model.scores_t, self.expected_scores_t_mc) - self.assertAlmostEqual(mc_model.scores_u, self.expected_scores_mc) - self.assertAlmostEqual(mc_model.beta_coeffs, self.expected_betacoefs_mc) - self.assertAlmostEqual(mc_model.VIP(), self.expected_vipsw_mc) - - self.assertAlmostEqual(mc_model_multiy.loadings_p, self.expected_loadings_p_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.loadings_q, self.expected_loadings_q_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.weights_w, self.expected_weights_w_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.weights_c, self.expected_weights_c_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.scores_t, self.expected_scores_t_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.scores_u, self.expected_scores_u_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.beta_coeffs, self.expected_betacoefs_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.VIP(), self.expected_vipsw_yblock_mc) - def test_cv(self): # Fix the seed for the permutation test and cross_validation np.random.seed(0) @@ -164,29 +82,6 @@ def test_permutation(self): permutation_results = self.plsda.permutation_test(self.xmat, self.da, nperms=5) self.assertAlmostEqual() - def hotellingt2(self): - t2 = self.plsda.hotelling_T2(comps=None) - t2_multi = self.plsda_multiy.hotelling_T2(comps=None) - self.assertAlmostEqual(t2, self.expected_t2) - self.assertAlmostEqual(t2_multi, self.expected_t2_multi) - - def Dmodx(self): - dmodx = self.plsda.dmodx(self.xmat) - dmodx_multi = self.plsda_multiy.dmodx(self.xmat_multi) - self.assertAlmostEqual(dmodx, self.expected_dmodx) - self.assertAlmostEqual(dmodx_multi, self.expected_dmodx_multi) - - def test_outliers(self): - outliers_t2 = self.pcamodel.outlier(self.xmat) - outliers_dmodx = self.pcamodel.outlier(self.xmat) - self.assertAlmostEqual(outliers_t2, self.expected_outliers_t2) - self.assertAlmostEqual(outliers_dmodx, self.expected_outliers_dmodx) - - outliers_t2_multi = self.plsda_multiy.outlier(self.xmat_multi) - outliers_dmodx_multi = self.plsda_multiy.outlier(self.xmat_multi) - self.assertAlmostEqual(outliers_dmodx_multi, self.expected_outliers_dmodx_multi) - self.assertAlmostEqual(outliers_t2_multi, self.expected_outliers_t2_multi) - if __name__ == '__main__': unittest.main() \ No newline at end of file diff --git a/tests/test_pls_regression.py b/tests/test_pls_regression.py index 579985a..25a3e5b 100644 --- a/tests/test_pls_regression.py +++ b/tests/test_pls_regression.py @@ -2,6 +2,7 @@ import unittest import pandas as pds import numpy as np +from numpy.testing import assert_allclose from pyChemometrics import ChemometricsScaler, ChemometricsPLS @@ -31,66 +32,94 @@ def setUp(self): multiblock_regression_problem = pds.read_csv('./test_data/regression_multiblock.csv') finally: # Load expected values for a PLS regression against a Y vector - self.expected_loadings_p = pds.read_csv('./test_data/pls_reg_loadings_p.csv') - self.expected_weights_w = pds.read_csv('./test_data/pls_reg_weights_w.csv') - self.expected_scores_t = pds.read_csv('./test_data/pls_reg_scores_t.csv') - self.expected_scores_u = pds.read_csv('./test_data/pls_reg_scores_u.csv') - self.expected_weights_c = pds.read_csv('./test_data/pls_reg_weights_c.csv') - self.expected_loadings_q = pds.read_csv('./test_data/pls_reg_loadings_q.csv') - self.expected_betacoefs = pds.read_csv('./test_data/pls_reg_betacoefs.csv') - self.expected_vipsw = pds.read_csv('./test_data/pls_reg_vipsw.csv') - self.expected_cvParams = pds.read_csv('./test_data/pls_reg_cvparams.csv') - self.expected_permutation = pds.read_csv('./test_data/pls_reg_permutation.csv') + self.expected_loadings_p = np.loadtxt('./test_data/pls_loadings_p.csv', delimiter=',') + self.expected_loadings_q = np.loadtxt('./test_data/pls_loadings_q.csv', delimiter=',')[np.newaxis, :] + self.expected_weights_w = np.loadtxt('./test_data/pls_weights_w.csv', delimiter=',') + self.expected_weights_c = np.loadtxt('./test_data/pls_weights_c.csv', delimiter=',')[np.newaxis, :] + self.expected_scores_t = np.loadtxt('./test_data/pls_scores_t.csv', delimiter=',') + self.expected_scores_u = np.loadtxt('./test_data/pls_scores_u.csv', delimiter=',') + self.expected_betacoefs = np.loadtxt('./test_data/pls_betas.csv', delimiter=',')[:, np.newaxis] + self.expected_vips = np.loadtxt('./test_data/pls_vip.csv', delimiter=',') + self.expected_dmodx = np.loadtxt('./test_data/pls_dmodx.csv', delimiter=',') # Load expected values for a PLS regression model against a Y matrix - self.expected_loadings_p_yblock = pds.read_csv('./test_data/pls_reg_loadings_p.csv') - self.expected_weights_w_yblock = pds.read_csv('./test_data/pls_reg_weights_w.csv') - self.expected_scores_t_yblock = pds.read_csv('./test_data/pls_reg_scores_t.csv') - self.expected_scores_u_yblock = pds.read_csv('./test_data/pls_reg_scores_u.csv') - self.expected_weights_c_yblock = pds.read_csv('./test_data/pls_reg_weights_c.csv') - self.expected_loadings_q_yblock = pds.read_csv('./test_data/pls_reg_loadings_q.csv') - self.expected_betacoefs_yblock = pds.read_csv('./test_data/pls_reg_betacoefs.csv') - self.expected_vipsw_yblock = pds.read_csv('./test_data/pls_reg_vipsw.csv') - - self.expected_scores_t_par + #self.expected_loadings_p_yblock = np.loadtxt('./test_data/pls_reg_yblock_loadings_p.csv', delimiter=',') + #self.expected_weights_w_yblock = np.loadtxt('./test_data/pls_reg_yblock_weights_w.csv', delimiter=',') + #self.expected_scores_t_yblock = np.loadtxt('./test_data/pls_reg_yblock_scores_t.csv', delimiter=',') + #self.expected_scores_u_yblock = np.loadtxt('./test_data/pls_reg_yblock_scores_u.csv', delimiter=',') + #self.expected_weights_c_yblock = np.loadtxt('./test_data/pls_reg_yblock_weights_c.csv', delimiter=',') + #self.expected_loadings_q_yblock = np.loadtxt('./test_data/pls_reg_yblock_loadings_q.csv', delimiter=',') + #self.expected_betacoefs_yblock = np.loadtxt('./test_data/pls_reg_yblock_betacoefs.csv', delimiter=',') + + self.expected_modelParameters = {'R2Y': 0.99442967438303576, 'R2X': 0.022903901163376705, + 'SSYcomp': np.array([5.42418672, 1.20742786, 0.27851628]), + 'SSXcomp': np.array([9750.59475071, 9779.57249348, 9770.96098837])} + + self.expected_cvParameters = {'Q2Y': 0.069284226071602006, 'Q2X': -0.12391667143436425, + 'MeanR2X_Training': 0.025896665665079883, + 'MeanR2Y_Training': 0.99636477396947942, + 'StdevR2Y_Training': 0.00091660538957527582, + 'StdevR2X_Training': 0.0010098198504153058, + 'StdevR2X_Test': 0.02386260538832127, + 'StdevR2Y_Test': 0.25034195769401973, + 'MeanR2X_Test': -0.022542842216950101, + 'MeanR2Y_Test': 0.096991536519031446} + + self.expected_t2 = np.array([7.00212848, 6.63400492, 5.6325462]) + self.expected_outliers_t2 = np.array([5, 33]) + self.expected_outliers_dmodx = np.array([]) + + self.expected_scores_t_par = np.loadtxt('./test_data/pls_scores_t_par.csv', delimiter=',') + self.expected_betas_par = np.loadtxt('./test_data/pls_betas_par.csv', delimiter=',')[:, np.newaxis] + self.expected_scores_t_mc = np.loadtxt('./test_data/pls_scores_t_mc.csv', delimiter=',') + self.expected_betas_mc = np.loadtxt('./test_data/pls_betas_mc.csv', delimiter=',')[:, np.newaxis] + + self.expected_vip_mc = np.loadtxt('./test_data/pls_vip_mc.csv', delimiter=',') + self.expected_vip_par = np.loadtxt('./test_data/pls_vip_par.csv', delimiter=',') # check this - self.y = regression_problem.values + self.y = regression_problem.iloc[:, 0].values self.ymat = multiblock_regression_problem.values - self.xmat = regression_problem.values + self.xmat = regression_problem.iloc[:, 1::].values self.xmat_multiy = multiblock_regression_problem.values + self.expected_permutation = {} + x_scaler = ChemometricsScaler(1) y_scaler = ChemometricsScaler(1) - self.plsreg = ChemometricsPLS(n_comps=3, xscaler=x_scaler, y_scaler=y_scaler) - self.plsreg_multiblock = ChemometricsPLS(n_comps=3, xscaler=x_scaler, y_scaler=y_scaler) + self.plsreg = ChemometricsPLS(ncomps=3, xscaler=x_scaler, yscaler=y_scaler) + self.plsreg_multiblock = ChemometricsPLS(ncomps=3, xscaler=x_scaler, yscaler=y_scaler) def test_single_y(self): self.plsreg.fit(self.xmat, self.y) # Test model coefficients , scores and goodness of fit - self.assertAlmostEqual(self.plsreg.loadings_p, self.expected_loadings_p) - self.assertAlmostEqual(self.plsreg.loadings_q, self.expected_loadings_q) - self.assertAlmostEqual(self.plsreg.weights_w, self.expected_weights_w) - self.assertAlmostEqual(self.plsreg.weights_c, self.expected_weights_c) - self.assertAlmostEqual(self.plsreg.scores_t, self.expected_scores_t) - self.assertAlmostEqual(self.plsreg.scores_u, self.expected_scores_u) - self.assertAlmostEqual(self.plsreg.beta_coeffs, self.expected_betacoefs) - self.assertAlmostEqual(self.plsreg.modelParameters, self.expected_modelParameters) + assert_allclose(self.plsreg.loadings_p, self.expected_loadings_p) + assert_allclose(self.plsreg.loadings_q, self.expected_loadings_q) + assert_allclose(self.plsreg.weights_w, self.expected_weights_w) + assert_allclose(self.plsreg.weights_c, self.expected_weights_c) + assert_allclose(self.plsreg.scores_t, self.expected_scores_t) + assert_allclose(self.plsreg.scores_u, self.expected_scores_u) + assert_allclose(self.plsreg.beta_coeffs, self.expected_betacoefs) + assert_allclose(self.plsreg.modelParameters['R2Y'], self.expected_modelParameters['R2Y']) + assert_allclose(self.plsreg.modelParameters['R2X'], self.expected_modelParameters['R2X']) + assert_allclose(self.plsreg.modelParameters['SSXcomp'], self.expected_modelParameters['SSXcomp']) + assert_allclose(self.plsreg.modelParameters['SSYcomp'], self.expected_modelParameters['SSYcomp']) + assert_allclose(self.plsreg.VIP(), self.expected_vips) def test_multi_y(self): self.plsreg_multiblock.fit(self.xmat_multiy, self.ymat) # Assert equality of main model parameters - self.assertAlmostEqual(self.plsreg_multiblock.loadings_p, self.expected_loadings_p_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.loadings_q, self.expected_loadings_q_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.weights_w, self.expected_weights_w_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.weights_c, self.expected_weights_c_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.scores_t, self.expected_scores_t_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.scores_u, self.expected_scores_u_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.beta_coeffs, self.expected_betacoefs_yblock) - self.assertAlmostEqual(self.plsreg_multiblock.VIP(), self.expected_vipsw_yblock) - self.assertAlmostEqual(self.plsreg.modelParameters, self.expected_modelParameters) + assert_allclose(self.plsreg_multiblock.loadings_p, self.expected_loadings_p_yblock) + assert_allclose(self.plsreg_multiblock.loadings_q, self.expected_loadings_q_yblock) + assert_allclose(self.plsreg_multiblock.weights_w, self.expected_weights_w_yblock) + assert_allclose(self.plsreg_multiblock.weights_c, self.expected_weights_c_yblock) + assert_allclose(self.plsreg_multiblock.scores_t, self.expected_scores_t_yblock) + assert_allclose(self.plsreg_multiblock.scores_u, self.expected_scores_u_yblock) + assert_allclose(self.plsreg_multiblock.beta_coeffs, self.expected_betacoefs_yblock) + assert_allclose(self.plsreg_multiblock.VIP(), self.expected_vipsw_yblock) + assert_allclose(self.plsreg.modelParameters, self.expected_modelParameters) def test_scalers(self): @@ -99,93 +128,76 @@ def test_scalers(self): x_scaler_mc = ChemometricsScaler(0) y_scaler_mc = ChemometricsScaler(0) - pareto_model = ChemometricsPLS(n_comps=3, xscaler=x_scaler_par, y_scaler=y_scaler_par) - pareto_model_multiy = ChemometricsPLS(n_comps=3, xscaler=x_scaler_par, y_scaler=y_scaler_par) - mc_model = ChemometricsPLS(n_comps=3, xscaler=x_scaler_mc, yscaler=y_scaler_mc) - mc_model_multiy = ChemometricsPLS(n_comps=3, xscaler=x_scaler_mc, yscaler=y_scaler_mc) + pareto_model = ChemometricsPLS(ncomps=3, xscaler=x_scaler_par, yscaler=y_scaler_par) + pareto_model_multiy = ChemometricsPLS(ncomps=3, xscaler=x_scaler_par, yscaler=y_scaler_par) + mc_model = ChemometricsPLS(ncomps=3, xscaler=x_scaler_mc, yscaler=y_scaler_mc) + mc_model_multiy = ChemometricsPLS(ncomps=3, xscaler=x_scaler_mc, yscaler=y_scaler_mc) pareto_model.fit(self.xmat, self.y) - pareto_model_multiy.fit(self.xmat_multi, self.ymat) + pareto_model_multiy.fit(self.xmat_multiy, self.ymat) mc_model.fit(self.xmat, self.y) - mc_model_multiy.fit(self.xmat_multi, self.ymat) - - self.assertAlmostEqual(pareto_model.loadings_p, self.expected_loadings_p_par) - self.assertAlmostEqual(pareto_model.loadings_q, self.expected_loadings_q_par) - self.assertAlmostEqual(pareto_model.weights_w, self.expected_weights_w_par) - self.assertAlmostEqual(pareto_model.weights_c, self.expected_weights_c_par) - self.assertAlmostEqual(pareto_model.scores_t, self.expected_scores_t_par) - self.assertAlmostEqual(pareto_model.scores_u, self.expected_scores_u_par) - self.assertAlmostEqual(pareto_model.beta_coeffs, self.expected_betacoefs_par) - self.assertAlmostEqual(pareto_model.VIP(), self.expected_vipsw_par) - - self.assertAlmostEqual(pareto_model_multiy.loadings_p, self.expected_loadings_p_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.loadings_q, self.expected_loadings_q_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.weights_w, self.expected_weights_w_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.weights_c, self.expected_weights_c_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.scores_t, self.expected_scores_t_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.scores_u, self.expected_scores_u_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.beta_coeffs, self.expected_betacoefs_yblock_par) - self.assertAlmostEqual(pareto_model_multiy.VIP(), self.expected_vipsw_yblock_par) - - self.assertAlmostEqual(mc_model.loadings_p, self.expected_loadings_p_mc) - self.assertAlmostEqual(mc_model.loadings_q, self.expected_loadings_q_mc) - self.assertAlmostEqual(mc_model.weights_w, self.expected_weights_w_mc) - self.assertAlmostEqual(mc_model.weights_c, self.expected_weights_c_mc) - self.assertAlmostEqual(mc_model.scores_t, self.expected_scores_t_mc) - self.assertAlmostEqual(mc_model.scores_u, self.expected_scores_mc) - self.assertAlmostEqual(mc_model.beta_coeffs, self.expected_betacoefs_mc) - self.assertAlmostEqual(mc_model.VIP(), self.expected_vipsw_mc) - - self.assertAlmostEqual(mc_model_multiy.loadings_p, self.expected_loadings_p_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.loadings_q, self.expected_loadings_q_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.weights_w, self.expected_weights_w_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.weights_c, self.expected_weights_c_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.scores_t, self.expected_scores_t_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.scores_u, self.expected_scores_u_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.beta_coeffs, self.expected_betacoefs_yblock_mc) - self.assertAlmostEqual(mc_model_multiy.VIP(), self.expected_vipsw_yblock_mc) - - def test_cv(self): + mc_model_multiy.fit(self.xmat_multiy, self.ymat) + + assert_allclose(pareto_model.scores_t, self.expected_scores_t_par) + assert_allclose(pareto_model.beta_coeffs, self.expected_betas_par) + assert_allclose(pareto_model.VIP(), self.expected_vip_par) + + #assert_allclose(pareto_model_multiy.scores_t, self.expected_scores_t_yblock_par) + #assert_allclose(pareto_model_multiy.beta_coeffs, self.expected_betacoefs_yblock_par) + + assert_allclose(mc_model.scores_t, self.expected_scores_t_mc) + assert_allclose(mc_model.beta_coeffs, self.expected_betas_mc) + assert_allclose(mc_model.VIP(), self.expected_vip_mc) + + #assert_allclose(mc_model_multiy.scores_t, self.expected_scores_t_yblock_mc) + #assert_allclose(mc_model_multiy.beta_coeffs, self.expected_betacoefs_yblock_mc) + + def test_cv_single_y(self): # Fix the seed for the permutation test and cross_validation np.random.seed(0) - self.plsda.cross_validation(self.xmat, self.da) - self.plsda_multiy.cross_validation(self.xmat_multi, self.da_mat) - self.assertAlmostEqual(self.plsreg.cvParameters, self.expected_cvParams) - self.assertAlmostEqual(self.plsreg_multiblock.cvParameters, self.expected_cvParams_multi) + self.plsreg.cross_validation(self.xmat, self.y) + + assert_allclose(self.plsreg.cvParameters['Q2Y'], self.expected_cvParameters['Q2Y']) + assert_allclose(self.plsreg.cvParameters['Q2X'], self.expected_cvParameters['Q2X']) + assert_allclose(self.plsreg.cvParameters['MeanR2X_Training'], self.expected_cvParameters['MeanR2X_Training']) + assert_allclose(self.plsreg.cvParameters['MeanR2Y_Training'], self.expected_cvParameters['MeanR2Y_Training']) + assert_allclose(self.plsreg.cvParameters['MeanR2X_Test'], self.expected_cvParameters['MeanR2X_Test']) + assert_allclose(self.plsreg.cvParameters['MeanR2Y_Test'], self.expected_cvParameters['MeanR2Y_Test']) + assert_allclose(self.plsreg.cvParameters['StdevR2X_Training'], self.expected_cvParameters['StdevR2X_Training']) + assert_allclose(self.plsreg.cvParameters['StdevR2Y_Training'], self.expected_cvParameters['StdevR2Y_Training']) + assert_allclose(self.plsreg.cvParameters['StdevR2X_Test'], self.expected_cvParameters['StdevR2X_Test']) + assert_allclose(self.plsreg.cvParameters['StdevR2Y_Test'], self.expected_cvParameters['StdevR2Y_Test']) + + def test_cv_multi_y(self): + # Fix the seed for the permutation test and cross_validation + np.random.seed(0) + self.plsreg_multiy.cross_validation(self.xmat_multi, self.da_mat) + assert_allclose(self.plsreg_multiblock.cvParameters, self.expected_cvParams_multi) def test_permutation(self): + self.plsreg.fit(self.xmat, self.y) # Fix the seed for the permutation test and cross_validation np.random.seed(0) self.plsreg.cross_validation(self.xmat, self.y) permutation_results = self.plsreg.permutation_test(self.xmat, self.da, nperms=5) - self.assertAlmostEqual(permutation_results[0], self.permutation_results) - - def test_VIP(self): - - pass + assert_allclose(permutation_results[0], self.permutation_results) def test_hotellingt2(self): - t2 = self.plsda.hotelling_T2(comps=None) - t2_multi = self.plsda_multiy.hotelling_T2(comps=None) - self.assertAlmostEqual(t2, self.expected_t2) - self.assertAlmostEqual(t2_multi, self.expected_t2_multi) + self.plsreg.fit(self.xmat, self.y) + t2 = self.plsreg.hotelling_T2(comps=None) + assert_allclose(t2, self.expected_t2) def test_dmodx(self): - dmodx = self.plsda.dmodx(self.xmat) - dmodx_multi = self.plsda_multiy.dmodx(self.xmat_multi) - self.assertAlmostEqual(dmodx, self.expected_dmodx) - self.assertAlmostEqual(dmodx_multi, self.expected_dmodx_multi) + self.plsreg.fit(self.xmat, self.y) + dmodx = self.plsreg.dmodx(self.xmat) + assert_allclose(dmodx, self.expected_dmodx) def test_outliers(self): - outliers_t2 = self.pcamodel.outlier(self.xmat) - outliers_dmodx = self.pcamodel.outlier(self.xmat) - self.assertAlmostEqual(outliers_t2, self.expected_outliers_t2) - self.assertAlmostEqual(outliers_dmodx, self.expected_outliers_dmodx) - - outliers_t2_multi = self.plsda_multiy.outlier(self.xmat_multi) - outliers_dmodx_multi = self.plsda_multiy.outlier(self.xmat_multi) - self.assertAlmostEqual(outliers_dmodx_multi, self.expected_outliers_dmodx_multi) - self.assertAlmostEqual(outliers_t2_multi, self.expected_outliers_t2_multi) + self.plsreg.fit(self.xmat, self.y) + outliers_t2 = self.plsreg.outlier(self.xmat) + outliers_dmodx = self.plsreg.outlier(self.xmat, measure='DmodX') + assert_allclose(outliers_t2, self.expected_outliers_t2) + assert_allclose(outliers_dmodx, self.expected_outliers_dmodx) if __name__ == '__main__':