{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "anaconda-cloud": {}, "celltoolbar": "Slideshow", "colabVersion": "0.1", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" }, "colab": { "provenance": [] } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "8TQSYrLRbPuc" }, "source": [ "# OpenML Datasets" ] }, { "cell_type": "code", "metadata": { "id": "ZYILdzb6ZK6J" }, "source": [ "!pip install -U pip numpy pandas jupyter" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "a6C76KYQZmQa" }, "source": [ "!pip install -U openml" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "import openml\n", "\n", "# Στα ακόλουθα αντικαταστήστε με το δικό σας dataset ή ID\n", "\n", "# List all datasets and their properties\n", "openml.datasets.list_datasets(output_format=\"dataframe\")\n", "\n", "# Get dataset by ID\n", "dataset = openml.datasets.get_dataset(61)\n", "\n", "# Get dataset by name\n", "dataset = openml.datasets.get_dataset('Fashion-MNIST')\n", "\n", "# Get the data itself as a dataframe (or otherwise)\n", "X, y, _, _ = dataset.get_data(dataset_format=\"dataframe\")" ], "metadata": { "id": "XYj85PhXS_z2" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "iyMvG_4_QBtF" }, "source": [ "## Further information\n", "That's it. You are now an expert in using OpenML. In case you have further questions:\n", "\n", "[OpenML Documentation](https://docs.openml.org) \n", "[Python API Documentation and examples](https://openml.github.io/openml-python)" ] } ] }