Skip to content

Commit 8261a87

Browse files
doc: README Rework (#1361)
1 parent 26b67b3 commit 8261a87

1 file changed

Lines changed: 66 additions & 32 deletions

File tree

README.md

Lines changed: 66 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,76 @@
1-
# OpenML-Python
2-
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
4-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
51

6-
A python interface for [OpenML](http://openml.org), an online platform for open science collaboration in machine learning.
7-
It can be used to download or upload OpenML data such as datasets and machine learning experiment results.
82

9-
## General
3+
<div align="center">
104

11-
* [Documentation](https://openml.github.io/openml-python).
12-
* [Contribution guidelines](https://github.com/openml/openml-python/blob/develop/CONTRIBUTING.md).
5+
<div id="user-content-toc">
6+
<ul align="center" style="list-style: none;">
7+
<summary>
8+
<img src="https://github.com/openml/openml.org/blob/master/app/public/static/svg/logo.svg" width="50" alt="OpenML Logo"/>
9+
<h1>OpenML-Python</h1>
10+
<img src="https://github.com/openml/docs/blob/master/docs/img/python.png" width="50" alt="Python Logo"/>
11+
</summary>
12+
</ul>
13+
</div>
1314

15+
## The Python API for a World of Data and More :dizzy:
16+
17+
[![Latest Release](https://img.shields.io/github/v/release/openml/openml-python)](https://github.com/openml/openml-python/releases)
18+
[![Python Versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://pypi.org/project/openml/)
19+
[![Downloads](https://static.pepy.tech/badge/openml)](https://pepy.tech/project/openml)
1420
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
21+
<!-- Add green badges for CI and precommit -->
22+
23+
[Installation](https://openml.github.io/openml-python/main/#how-to-get-openml-for-python) | [Documentation](https://openml.github.io/openml-python) | [Contribution guidelines](https://github.com/openml/openml-python/blob/develop/CONTRIBUTING.md)
24+
</div>
25+
26+
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
1530

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+
```
1739

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
49+
train_indices, test_indices = task.get_train_test_split_indices(fold=0)
50+
```
51+
52+
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:
2074

2175
[Matthias Feurer, Jan N. van Rijn, Arlind Kadra, Pieter Gijsbers, Neeratyoy Mallik, Sahithya Ravi, Andreas Müller, Joaquin Vanschoren, Frank Hutter<br/>
2276
**OpenML-Python: an extensible Python API for OpenML**<br/>
@@ -35,23 +89,3 @@ Bibtex entry:
3589
url = {http://jmlr.org/papers/v22/19-920.html}
3690
}
3791
```
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 -->
44-
<!-- prettier-ignore-start -->
45-
<!-- markdownlint-disable -->
46-
<table>
47-
<tr>
48-
<td align="center"><a href="https://github.com/a-moadel"><img src="https://avatars0.githubusercontent.com/u/46557866?v=4" width="100px;" alt=""/><br /><sub><b>a-moadel</b></sub></a><br /><a href="https://github.com/openml/openml-python/commits?author=a-moadel" title="Documentation">📖</a> <a href="#example-a-moadel" title="Examples">💡</a></td>
49-
<td align="center"><a href="https://github.com/Neeratyoy"><img src="https://avatars2.githubusercontent.com/u/3191233?v=4" width="100px;" alt=""/><br /><sub><b>Neeratyoy Mallik</b></sub></a><br /><a href="https://github.com/openml/openml-python/commits?author=Neeratyoy" title="Code">💻</a> <a href="https://github.com/openml/openml-python/commits?author=Neeratyoy" title="Documentation">📖</a> <a href="#example-Neeratyoy" title="Examples">💡</a></td>
50-
</tr>
51-
</table>
52-
53-
<!-- markdownlint-enable -->
54-
<!-- prettier-ignore-end -->
55-
<!-- ALL-CONTRIBUTORS-LIST:END -->
56-
57-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

0 commit comments

Comments
 (0)