{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append(\"../\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'id': 'demo1', 'name': 'Breast Cancer Wisconsin', 'descriptions': 'Demo dataset from sklearn. Binary output labels indicate cancer or not. Original input features are min-max transformed to ratio-scaled features.', 'source': 'https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_breast_cancer.html', 'keywords': ['demo dataset', 'binary classification', 'interval-scale features'], 'sample_size': 569, 'sample_train': 398, 'sample_valid': 171, 'output_num': 1, 'output_scale': 'binary', 'output_dtype': 'bool', 'input_num': 30, 'input_scale': 'ratio', 'input_dtype': 'float'}\n"
     ]
    },
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (demo2.py, line 27)",
     "output_type": "error",
     "traceback": [
      "Traceback \u001b[0;36m(most recent call last)\u001b[0m:\n",
      "  File \u001b[1;32m\"/Users/uh/cfs/venv-3.6.2/lib/python3.6/site-packages/IPython/core/interactiveshell.py\"\u001b[0m, line \u001b[1;32m3265\u001b[0m, in \u001b[1;35mrun_code\u001b[0m\n    exec(code_obj, self.user_global_ns, self.user_ns)\n",
      "\u001b[0;36m  File \u001b[0;32m\"<ipython-input-2-314321587851>\"\u001b[0;36m, line \u001b[0;32m4\u001b[0;36m, in \u001b[0;35m<module>\u001b[0;36m\u001b[0m\n\u001b[0;31m    tmp = __import__(\"datasets.\"+s, fromlist=['meta'])\u001b[0m\n",
      "\u001b[0;36m  File \u001b[0;32m\"../datasets/demo2.py\"\u001b[0;36m, line \u001b[0;32m27\u001b[0m\n\u001b[0;31m    \"source\": \"https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_diabetes.html,\u001b[0m\n\u001b[0m           ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "ids = ['demo1', 'demo2']\n",
    "\n",
    "for s in ids:\n",
    "    tmp = __import__(\"datasets.\"+s, fromlist=['meta'])\n",
    "    print(tmp.meta)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_diabetes\n",
    "tmp = load_diabetes()\n",
    "tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_wine.html\n",
    "# single nominal output, multi input ratio-scale (ordinal?)\n",
    "from sklearn.datasets import load_wine\n",
    "tmp = load_wine()\n",
    "#tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_iris.html\n",
    "# single nominal output, multi input ratio-scale (ordinal?)\n",
    "from sklearn.datasets import load_iris\n",
    "tmp = load_iris()\n",
    "#tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Boston House Prices\n",
    "# https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_boston.html\n",
    "# single ratio-scale output, multi input ratio-scale (ordinal?)\n",
    "from sklearn.datasets import load_boston\n",
    "tmp = load_boston()\n",
    "#tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_digits.html\n",
    "# single nominal output, image input\n",
    "from sklearn.datasets import load_digits\n",
    "tmp = load_digits()\n",
    "#tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RidgeClassifier(alpha=1.0, class_weight=None, copy_X=True, fit_intercept=True,\n",
       "        max_iter=None, normalize=False, random_state=None, solver='auto',\n",
       "        tol=0.001)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import RidgeClassifier\n",
    "RidgeClassifier()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "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.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
