In [1]:
!pip install .
In [2]:
import fastfsr
In [3]:
%matplotlib inline
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
The fsr_fast function performs Fast FSR (no phony var. generation). It returns uses reg_subset to calculate the p-values and feed into fsr_fast_pv to implement the Fast FSR algorithm. The plot from fsr_fast_pv is carried over and will be displayed if `printout = True'.
In addition, the residual degrees of freedom, fitted values
In [4]:
ncaa = pd.read_csv("http://www4.stat.ncsu.edu/~boos/var.select/ncaa.data2.txt",
delim_whitespace = True)
x = ncaa.ix[:,:-1]
y = ncaa.ix[:,-1]
x.head()
Out[4]:
In [6]:
fastfsr.fsr_fast(x, y, plot = True, printout = True)
Out[6]:
In [ ]: