Skip to content

Commit 5a8956d

Browse files
AbhishekAbhishek
authored andcommitted
Address review: fix run_model_on_task example, remove unwanted files
- Use HistGradientBoostingClassifier instead of DecisionTreeClassifier (fixes ValueError with missing values in task 1) - Remove .DS_Store - Remove tests/files/misc/features_with_whitespaces.xml.pkl
1 parent 2e455d1 commit 5a8956d

5 files changed

Lines changed: 33 additions & 2 deletions

File tree

.DS_Store

-8 KB
Binary file not shown.

openml/runs/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def run_model_on_task( # noqa: PLR0913
109109
--------
110110
>>> import openml
111111
>>> import openml_sklearn # doctest: +SKIP
112-
>>> from sklearn.tree import DecisionTreeClassifier # doctest: +SKIP
113-
>>> clf = DecisionTreeClassifier() # doctest: +SKIP
112+
>>> from sklearn.ensemble import HistGradientBoostingClassifier # doctest: +SKIP
113+
>>> clf = HistGradientBoostingClassifier() # doctest: +SKIP
114114
>>> task = openml.tasks.get_task(1) # doctest: +SKIP
115115
>>> run = openml.runs.run_model_on_task(clf, task) # doctest: +SKIP
116116
"""

tests/files/localhost_8000 2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org/openml/test
-253 Bytes
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<oml:data_set_description xmlns:oml="http://openml.org/openml">
2+
<oml:id>125</oml:id>
3+
<oml:name>longley</oml:name>
4+
<oml:version>1</oml:version>
5+
<oml:description>**Author**:
6+
**Source**: Unknown -
7+
**Please cite**:
8+
9+
Data from StatLib (ftp stat.cmu.edu/datasets)
10+
11+
The infamous Longley data, &quot;An appraisal of least-squares programs from
12+
the point of view of the user&quot;, JASA, 62(1967) p819-841.
13+
14+
Variables are: Number of people employed (usually the y variable)
15+
GNP implicit price deflator
16+
GNP
17+
Unemployed
18+
Armed forces
19+
Non-institutionalized population &gt;=14 years of age
20+
Year
21+
22+
Employment is being treated as the class
23+
attribute.</oml:description>
24+
<oml:description_version>1</oml:description_version>
25+
<oml:format>ARFF</oml:format>
26+
<oml:upload_date>2014-04-23T13:17:28</oml:upload_date>
27+
<oml:licence>Public</oml:licence> <oml:url>https://test.openml.org/data/v1/download/125/longley.arff</oml:url>
28+
<oml:file_id>125</oml:file_id> <oml:default_target_attribute>employed</oml:default_target_attribute> <oml:version_label>1</oml:version_label> <oml:tag>test_tag_OpenMLDatasetTestOnTestServer_176950496348898</oml:tag><oml:tag>test_tag_OpenMLDatasetTestOnTestServer_17695084341374717</oml:tag><oml:tag>test_tag_OpenMLDatasetTestOnTestServer_17695087605457149</oml:tag><oml:tag>test_tag_OpenMLDatasetTestOnTestServer_1769508973937027</oml:tag><oml:tag>test_tag_OpenMLDatasetTestOnTestServer_17695955071197827</oml:tag><oml:tag>test_tag_OpenMLDatasetTestOnTestServer_17703991724470294</oml:tag> <oml:visibility>public</oml:visibility> <oml:status>active</oml:status>
29+
<oml:processing_date>2026-01-20 10:46:42</oml:processing_date> <oml:md5_checksum>a6d46686d199b6cb82dbdf0e34377b8a</oml:md5_checksum>
30+
</oml:data_set_description>

0 commit comments

Comments
 (0)