Skip to content

Commit 521e186

Browse files
committed
Apply changes to example that follow from change to the dataset.
Age is now also a feature, but we're not using it here.
1 parent 4292cf2 commit 521e186

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/plot_als_classification.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
X = afqdata.X
5656
y = afqdata.y.astype(float) # SGL expects float targets
57+
is_als = y[:, 0]
5758
groups = afqdata.groups
5859
feature_names = afqdata.feature_names
5960
group_names = afqdata.group_names
@@ -117,7 +118,7 @@
117118
# scikit-learn functions
118119

119120
scores = cross_validate(
120-
pipe, X, y, cv=5, return_train_score=True, return_estimator=True
121+
pipe, X, is_als, cv=5, return_train_score=True, return_estimator=True
121122
)
122123

123124
# Display results

0 commit comments

Comments
 (0)