You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenML-Python provides an easy-to-use and straightforward Python interface for [OpenML](http://openml.org), an online platform for open science collaboration in machine learning.
27
+
It can download or upload data from OpenML, such as datasets and machine learning experiment results.
28
+
29
+
## :joystick: Minimal Example
15
30
16
-
## Citing OpenML-Python
31
+
Use the following code to get the [credit-g](https://www.openml.org/search?type=data&sort=runs&status=active&id=31)[dataset](https://docs.openml.org/concepts/data/):
32
+
33
+
```python
34
+
import openml
35
+
36
+
dataset = openml.datasets.get_dataset("credit-g") # or by ID get_dataset(31)
37
+
X, y, categorical_indicator, attribute_names = dataset.get_data(target="class")
38
+
```
17
39
18
-
If you use OpenML-Python in a scientific publication, we would appreciate a reference to the
19
-
following paper:
40
+
Get a [task](https://docs.openml.org/concepts/tasks/) for [supervised classification on credit-g](https://www.openml.org/search?type=task&id=31&source_data.data_id=31):
41
+
42
+
```python
43
+
import openml
44
+
45
+
task = openml.tasks.get_task(31)
46
+
dataset = task.get_dataset()
47
+
X, y, categorical_indicator, attribute_names = dataset.get_data(target=task.target_name)
48
+
# get splits for the first fold of 10-fold cross-validation
Use an [OpenML benchmarking suite](https://docs.openml.org/concepts/benchmarking/) to get a curated list of machine-learning tasks:
53
+
```python
54
+
import openml
55
+
56
+
suite = openml.study.get_suite("amlb-classification-all") # Get a curated list of tasks for classification
57
+
for task_id in suite.tasks:
58
+
task = openml.tasks.get_task(task_id)
59
+
```
60
+
61
+
## :magic_wand: Installation
62
+
63
+
OpenML-Python is supported on Python 3.8 - 3.13 and is available on Linux, MacOS, and Windows.
64
+
65
+
You can install OpenML-Python with:
66
+
67
+
```bash
68
+
pip install openml
69
+
```
70
+
71
+
## :page_facing_up: Citing OpenML-Python
72
+
73
+
If you use OpenML-Python in a scientific publication, we would appreciate a reference to the following paper:
20
74
21
75
[Matthias Feurer, Jan N. van Rijn, Arlind Kadra, Pieter Gijsbers, Neeratyoy Mallik, Sahithya Ravi, Andreas Müller, Joaquin Vanschoren, Frank Hutter<br/>
22
76
**OpenML-Python: an extensible Python API for OpenML**<br/>
@@ -35,23 +89,3 @@ Bibtex entry:
35
89
url = {http://jmlr.org/papers/v22/19-920.html}
36
90
}
37
91
```
38
-
39
-
## Contributors ✨
40
-
41
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
42
-
43
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
0 commit comments