Skip to content

Commit

Permalink
normalize in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
fkiraly committed Dec 12, 2022
1 parent d9925a7 commit 0f9cfd8
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions examples/rocket.ipynb
Expand Up @@ -149,15 +149,20 @@
"outputs": [
{
"data": {
"text/plain": "RidgeClassifierCV(alphas=array([1.00000000e-03, 4.64158883e-03, 2.15443469e-02, 1.00000000e-01,\n 4.64158883e-01, 2.15443469e+00, 1.00000000e+01, 4.64158883e+01,\n 2.15443469e+02, 1.00000000e+03]),\n normalize=True)"
"text/plain": [
"RidgeClassifierCV(alphas=array([1.00000000e-03, 4.64158883e-03, 2.15443469e-02, 1.00000000e-01,\n",
" 4.64158883e-01, 2.15443469e+00, 1.00000000e+01, 4.64158883e+01,\n",
" 2.15443469e+02, 1.00000000e+03]),\n",
" normalize=True)"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"classifier = RidgeClassifierCV(alphas=np.logspace(-3, 3, 10), normalize=True)\n",
"classifier = RidgeClassifierCV(alphas=np.logspace(-3, 3, 10))\n",
"classifier.fit(X_train_transform, y_train)"
]
},
Expand Down Expand Up @@ -207,7 +212,9 @@
"outputs": [
{
"data": {
"text/plain": "0.8171428571428572"
"text/plain": [
"0.8171428571428572"
]
},
"execution_count": 7,
"metadata": {},
Expand Down Expand Up @@ -293,15 +300,20 @@
"outputs": [
{
"data": {
"text/plain": "RidgeClassifierCV(alphas=array([1.00000000e-03, 4.64158883e-03, 2.15443469e-02, 1.00000000e-01,\n 4.64158883e-01, 2.15443469e+00, 1.00000000e+01, 4.64158883e+01,\n 2.15443469e+02, 1.00000000e+03]),\n normalize=True)"
"text/plain": [
"RidgeClassifierCV(alphas=array([1.00000000e-03, 4.64158883e-03, 2.15443469e-02, 1.00000000e-01,\n",
" 4.64158883e-01, 2.15443469e+00, 1.00000000e+01, 4.64158883e+01,\n",
" 2.15443469e+02, 1.00000000e+03]),\n",
" normalize=True)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"classifier = RidgeClassifierCV(alphas=np.logspace(-3, 3, 10), normalize=True)\n",
"classifier = RidgeClassifierCV(alphas=np.logspace(-3, 3, 10))\n",
"classifier.fit(X_train_transform, y_train)"
]
},
Expand Down Expand Up @@ -351,7 +363,9 @@
"outputs": [
{
"data": {
"text/plain": "1.0"
"text/plain": [
"1.0"
]
},
"execution_count": 12,
"metadata": {},
Expand Down Expand Up @@ -389,7 +403,7 @@
"outputs": [],
"source": [
"rocket_pipeline = make_pipeline(\n",
" Rocket(), RidgeClassifierCV(alphas=np.logspace(-3, 3, 10), normalize=True)\n",
" Rocket(), RidgeClassifierCV(alphas=np.logspace(-3, 3, 10))\n",
")"
]
},
Expand All @@ -414,7 +428,14 @@
"outputs": [
{
"data": {
"text/plain": "Pipeline(steps=[('rocket', Rocket()),\n ('ridgeclassifiercv',\n RidgeClassifierCV(alphas=array([1.00000000e-03, 4.64158883e-03, 2.15443469e-02, 1.00000000e-01,\n 4.64158883e-01, 2.15443469e+00, 1.00000000e+01, 4.64158883e+01,\n 2.15443469e+02, 1.00000000e+03]),\n normalize=True))])"
"text/plain": [
"Pipeline(steps=[('rocket', Rocket()),\n",
" ('ridgeclassifiercv',\n",
" RidgeClassifierCV(alphas=array([1.00000000e-03, 4.64158883e-03, 2.15443469e-02, 1.00000000e-01,\n",
" 4.64158883e-01, 2.15443469e+00, 1.00000000e+01, 4.64158883e+01,\n",
" 2.15443469e+02, 1.00000000e+03]),\n",
" normalize=True))])"
]
},
"execution_count": 14,
"metadata": {},
Expand Down Expand Up @@ -450,7 +471,9 @@
"outputs": [
{
"data": {
"text/plain": "0.7942857142857143"
"text/plain": [
"0.7942857142857143"
]
},
"execution_count": 15,
"metadata": {},
Expand Down

0 comments on commit 0f9cfd8

Please sign in to comment.