Skip to content

Commit bac8fda

Browse files
author
Github Actions
committed
Eddie Bergman: Enable tests to be manually triggered (#1325)
1 parent b7a50d8 commit bac8fda

File tree

75 files changed

+1157
-894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1157
-894
lines changed

development/_downloads/2991959d1e025c5f9f27e3b4d3265a81/example_multilabel_classification.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"outputs": [],
4646
"source": [
47-
"# Using reuters multilabel dataset -- https://www.openml.org/d/40594\nX, y = sklearn.datasets.fetch_openml(data_id=40594, return_X_y=True, as_frame=False)\n\n# fetch openml downloads a numpy array with TRUE/FALSE strings. Re-map it to\n# integer dtype with ones and zeros\n# This is to comply with Scikit-learn requirement:\n# \"Positive classes are indicated with 1 and negative classes with 0 or -1.\"\n# More information on: https://scikit-learn.org/stable/modules/multiclass.html\ny[y == 'TRUE'] = 1\ny[y == 'FALSE'] = 0\ny = y.astype(np.int)\n\n# Using type of target is a good way to make sure your data\n# is properly formatted\nprint(f\"type_of_target={type_of_target(y)}\")\n\nX_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(\n X, y, random_state=1\n)"
47+
"# Using reuters multilabel dataset -- https://www.openml.org/d/40594\nX, y = sklearn.datasets.fetch_openml(data_id=40594, return_X_y=True, as_frame=False)\n\n# fetch openml downloads a numpy array with TRUE/FALSE strings. Re-map it to\n# integer dtype with ones and zeros\n# This is to comply with Scikit-learn requirement:\n# \"Positive classes are indicated with 1 and negative classes with 0 or -1.\"\n# More information on: https://scikit-learn.org/stable/modules/multiclass.html\ny[y == 'TRUE'] = 1\ny[y == 'FALSE'] = 0\ny = y.astype(int)\n\n# Using type of target is a good way to make sure your data\n# is properly formatted\nprint(f\"type_of_target={type_of_target(y)}\")\n\nX_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(\n X, y, random_state=1\n)"
4848
]
4949
},
5050
{

development/_downloads/89647a1665eba015b7197cfe70420e4d/example_multilabel_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# More information on: https://scikit-learn.org/stable/modules/multiclass.html
3131
y[y == 'TRUE'] = 1
3232
y[y == 'FALSE'] = 0
33-
y = y.astype(np.int)
33+
y = y.astype(int)
3434

3535
# Using type of target is a good way to make sure your data
3636
# is properly formatted
-3 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.
-550 Bytes
Loading
23.8 KB
Loading
5.37 KB
Loading
-351 Bytes
Loading
1.18 KB
Loading
4.94 KB
Loading

0 commit comments

Comments
 (0)