-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #863 from openml/develop
Release OpenML 0.10.1
- Loading branch information
Showing
76 changed files
with
3,154 additions
and
1,059 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | ||
|
||
A python interface for [OpenML](http://openml.org). You can find the documentation on the [openml-python website](https://openml.github.io/openml-python). | ||
|
||
Please commit to the right branches following the gitflow pattern: | ||
http://nvie.com/posts/a-successful-git-branching-model/ | ||
A python interface for [OpenML](http://openml.org), an online platform for open science collaboration in machine learning. | ||
It can be used to download or upload OpenML data such as datasets and machine learning experiment results. | ||
You can find the documentation on the [openml-python website](https://openml.github.io/openml-python). | ||
If you wish to contribute to the package, please see our [contribution guidelines](https://github.com/openml/openml-python/blob/develop/CONTRIBUTING.md). | ||
|
||
Master branch: | ||
|
||
[![Build Status](https://travis-ci.org/openml/openml-python.svg?branch=master)](https://travis-ci.org/openml/openml-python) | ||
[![Code Health](https://landscape.io/github/openml/openml-python/master/landscape.svg)](https://landscape.io/github/openml/openml-python/master) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/blna1eip00kdyr25?svg=true)](https://ci.appveyor.com/project/OpenML/openml-python) | ||
[![Coverage Status](https://coveralls.io/repos/github/openml/openml-python/badge.svg?branch=master)](https://coveralls.io/github/openml/openml-python?branch=master) | ||
|
||
Development branch: | ||
|
||
[![Build Status](https://travis-ci.org/openml/openml-python.svg?branch=develop)](https://travis-ci.org/openml/openml-python) | ||
[![Code Health](https://landscape.io/github/openml/openml-python/master/landscape.svg)](https://landscape.io/github/openml/openml-python/master) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/blna1eip00kdyr25/branch/develop?svg=true)](https://ci.appveyor.com/project/OpenML/openml-python/branch/develop) | ||
[![Coverage Status](https://coveralls.io/repos/github/openml/openml-python/badge.svg?branch=develop)](https://coveralls.io/github/openml/openml-python?branch=develop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Introductory Examples | ||
===================== | ||
|
||
Introductory examples to the usage of the OpenML python connector. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
""" | ||
======== | ||
Datasets | ||
======== | ||
A basic tutorial on how to list, load and visualize datasets. | ||
""" | ||
############################################################################ | ||
# In general, we recommend working with tasks, so that the results can | ||
# be easily reproduced. Furthermore, the results can be compared to existing results | ||
# at OpenML. However, for the purposes of this tutorial, we are going to work with | ||
# the datasets directly. | ||
|
||
import openml | ||
############################################################################ | ||
# List datasets | ||
# ============= | ||
|
||
datasets_df = openml.datasets.list_datasets(output_format='dataframe') | ||
print(datasets_df.head(n=10)) | ||
|
||
############################################################################ | ||
# Download a dataset | ||
# ================== | ||
|
||
# Iris dataset https://www.openml.org/d/61 | ||
dataset = openml.datasets.get_dataset(61) | ||
|
||
# Print a summary | ||
print(f"This is dataset '{dataset.name}', the target feature is " | ||
f"'{dataset.default_target_attribute}'") | ||
print(f"URL: {dataset.url}") | ||
print(dataset.description[:500]) | ||
|
||
############################################################################ | ||
# Load a dataset | ||
# ============== | ||
|
||
# X - An array/dataframe where each row represents one example with | ||
# the corresponding feature values. | ||
# y - the classes for each example | ||
# categorical_indicator - an array that indicates which feature is categorical | ||
# attribute_names - the names of the features for the examples (X) and | ||
# target feature (y) | ||
X, y, categorical_indicator, attribute_names = dataset.get_data( | ||
dataset_format='dataframe', | ||
target=dataset.default_target_attribute | ||
) | ||
############################################################################ | ||
# Visualize the dataset | ||
# ===================== | ||
|
||
import pandas as pd | ||
import seaborn as sns | ||
import matplotlib.pyplot as plt | ||
sns.set_style("darkgrid") | ||
|
||
|
||
def hide_current_axis(*args, **kwds): | ||
plt.gca().set_visible(False) | ||
|
||
|
||
# We combine all the data so that we can map the different | ||
# examples to different colors according to the classes. | ||
combined_data = pd.concat([X, y], axis=1) | ||
iris_plot = sns.pairplot(combined_data, hue="class") | ||
iris_plot.map_upper(hide_current_axis) | ||
plt.show() |
Oops, something went wrong.