Skip to content

Commit

Permalink
Adding nonessential code for MLOpsPython BYOC Azure doc (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjcmit authored Jan 30, 2020
1 parent 06c4ac7 commit ff95f0d
Showing 1 changed file with 216 additions and 2 deletions.
218 changes: 216 additions & 2 deletions experimentation/Diabetes Ridge Regression Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -36,13 +36,227 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"X, y = load_diabetes(return_X_y=True)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(442, 10)\n"
]
}
],
"source": [
"print(X.shape)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(442,)\n"
]
}
],
"source": [
"print(y.shape)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>0</th>\n",
" <th>1</th>\n",
" <th>2</th>\n",
" <th>3</th>\n",
" <th>4</th>\n",
" <th>5</th>\n",
" <th>6</th>\n",
" <th>7</th>\n",
" <th>8</th>\n",
" <th>9</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <td>count</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" <td>4.420000e+02</td>\n",
" </tr>\n",
" <tr>\n",
" <td>mean</td>\n",
" <td>-3.639623e-16</td>\n",
" <td>1.309912e-16</td>\n",
" <td>-8.013951e-16</td>\n",
" <td>1.289818e-16</td>\n",
" <td>-9.042540e-17</td>\n",
" <td>1.301121e-16</td>\n",
" <td>-4.563971e-16</td>\n",
" <td>3.863174e-16</td>\n",
" <td>-3.848103e-16</td>\n",
" <td>-3.398488e-16</td>\n",
" </tr>\n",
" <tr>\n",
" <td>std</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" <td>4.761905e-02</td>\n",
" </tr>\n",
" <tr>\n",
" <td>min</td>\n",
" <td>-1.072256e-01</td>\n",
" <td>-4.464164e-02</td>\n",
" <td>-9.027530e-02</td>\n",
" <td>-1.123996e-01</td>\n",
" <td>-1.267807e-01</td>\n",
" <td>-1.156131e-01</td>\n",
" <td>-1.023071e-01</td>\n",
" <td>-7.639450e-02</td>\n",
" <td>-1.260974e-01</td>\n",
" <td>-1.377672e-01</td>\n",
" </tr>\n",
" <tr>\n",
" <td>25%</td>\n",
" <td>-3.729927e-02</td>\n",
" <td>-4.464164e-02</td>\n",
" <td>-3.422907e-02</td>\n",
" <td>-3.665645e-02</td>\n",
" <td>-3.424784e-02</td>\n",
" <td>-3.035840e-02</td>\n",
" <td>-3.511716e-02</td>\n",
" <td>-3.949338e-02</td>\n",
" <td>-3.324879e-02</td>\n",
" <td>-3.317903e-02</td>\n",
" </tr>\n",
" <tr>\n",
" <td>50%</td>\n",
" <td>5.383060e-03</td>\n",
" <td>-4.464164e-02</td>\n",
" <td>-7.283766e-03</td>\n",
" <td>-5.670611e-03</td>\n",
" <td>-4.320866e-03</td>\n",
" <td>-3.819065e-03</td>\n",
" <td>-6.584468e-03</td>\n",
" <td>-2.592262e-03</td>\n",
" <td>-1.947634e-03</td>\n",
" <td>-1.077698e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <td>75%</td>\n",
" <td>3.807591e-02</td>\n",
" <td>5.068012e-02</td>\n",
" <td>3.124802e-02</td>\n",
" <td>3.564384e-02</td>\n",
" <td>2.835801e-02</td>\n",
" <td>2.984439e-02</td>\n",
" <td>2.931150e-02</td>\n",
" <td>3.430886e-02</td>\n",
" <td>3.243323e-02</td>\n",
" <td>2.791705e-02</td>\n",
" </tr>\n",
" <tr>\n",
" <td>max</td>\n",
" <td>1.107267e-01</td>\n",
" <td>5.068012e-02</td>\n",
" <td>1.705552e-01</td>\n",
" <td>1.320442e-01</td>\n",
" <td>1.539137e-01</td>\n",
" <td>1.987880e-01</td>\n",
" <td>1.811791e-01</td>\n",
" <td>1.852344e-01</td>\n",
" <td>1.335990e-01</td>\n",
" <td>1.356118e-01</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0 1 2 3 4 \\\n",
"count 4.420000e+02 4.420000e+02 4.420000e+02 4.420000e+02 4.420000e+02 \n",
"mean -3.639623e-16 1.309912e-16 -8.013951e-16 1.289818e-16 -9.042540e-17 \n",
"std 4.761905e-02 4.761905e-02 4.761905e-02 4.761905e-02 4.761905e-02 \n",
"min -1.072256e-01 -4.464164e-02 -9.027530e-02 -1.123996e-01 -1.267807e-01 \n",
"25% -3.729927e-02 -4.464164e-02 -3.422907e-02 -3.665645e-02 -3.424784e-02 \n",
"50% 5.383060e-03 -4.464164e-02 -7.283766e-03 -5.670611e-03 -4.320866e-03 \n",
"75% 3.807591e-02 5.068012e-02 3.124802e-02 3.564384e-02 2.835801e-02 \n",
"max 1.107267e-01 5.068012e-02 1.705552e-01 1.320442e-01 1.539137e-01 \n",
"\n",
" 5 6 7 8 9 \n",
"count 4.420000e+02 4.420000e+02 4.420000e+02 4.420000e+02 4.420000e+02 \n",
"mean 1.301121e-16 -4.563971e-16 3.863174e-16 -3.848103e-16 -3.398488e-16 \n",
"std 4.761905e-02 4.761905e-02 4.761905e-02 4.761905e-02 4.761905e-02 \n",
"min -1.156131e-01 -1.023071e-01 -7.639450e-02 -1.260974e-01 -1.377672e-01 \n",
"25% -3.035840e-02 -3.511716e-02 -3.949338e-02 -3.324879e-02 -3.317903e-02 \n",
"50% -3.819065e-03 -6.584468e-03 -2.592262e-03 -1.947634e-03 -1.077698e-03 \n",
"75% 2.984439e-02 2.931150e-02 3.430886e-02 3.243323e-02 2.791705e-02 \n",
"max 1.987880e-01 1.811791e-01 1.852344e-01 1.335990e-01 1.356118e-01 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"features = pd.DataFrame(X)\n",
"features.describe()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit ff95f0d

Please sign in to comment.