Skip to content
forked from cran/plsdof

fork of R package plsdof, translated the "Lanczos Decomposition" part from R to Python — Degrees of Freedom and Statistical Inference for Partial Least Squares Regression

Notifications You must be signed in to change notification settings

wdwzytc/plsdof_python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Calculate the degrees of freedom for PLSR (partial least square regression) with the "Lanczos" method, with details in section 3.3, Krämer (2011) [10.1198/jasa.2011.tm10107]

This code is just a translation from R code to Python code. Original R code is here: https://github.com/cran/plsdof

With the X and y given in this repository, the python code and the original R code gave the same result, but I am not sure it will be the same in every cases. The rules of matrix calculation has some differences in R and Python. Hope it also works for you.

the code ran well with:

pandas == 1.3.4

numpy == 1.20.3

sklearn == 1.1.1

matplotlib == 3.5.2

About

fork of R package plsdof, translated the "Lanczos Decomposition" part from R to Python — Degrees of Freedom and Statistical Inference for Partial Least Squares Regression

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%