Skip to content
Snippets Groups Projects
Commit 085544eb authored by Fabian Pedregosa's avatar Fabian Pedregosa
Browse files

Use original diabetes data as shipped by the R package lars.

This also gets rid of stupid customizations in example.
parent 4384f2d8
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,6 @@ diabetes = datasets.load_diabetes()
X = diabetes.data
y = diabetes.target
X[:,6] *= -1 # To reproduce wikipedia LASSO page
print "Computing regularization path using the LARS ..."
_, _, coefs_ = linear_model.lars_path(X, y, method='lasso', verbose=True)
......
......@@ -203,10 +203,8 @@ def load_digits():
DESCR=fdescr.read())
def load_diabetes():
data = np.loadtxt(os.path.join(os.path.dirname(__file__) +
'/data/diabetes.csv'))
target = data[:, -1]
data = data[:, :-1]
base_dir = os.path.join(os.path.dirname(__file__), 'data/')
data = np.loadtxt(base_dir + 'diabetes_data.csv.gz')
target = np.loadtxt(base_dir + 'diabetes_target.csv.gz')
return Bunch (data=data, target=target)
This diff is collapsed.
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment