Skip to content

Commit

Permalink
0.10.0 changes to SklearnPipelinePermuter
Browse files Browse the repository at this point in the history
  • Loading branch information
richrobe committed Nov 29, 2023
1 parent 972e9e3 commit abf0040
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
26 changes: 8 additions & 18 deletions examples/SklearnPipelinePermuter_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@
"metadata": {},
"outputs": [],
"source": [
"pipeline_permuter_regression = SklearnPipelinePermuter(model_dict_reg, params_dict_reg, hyper_search_dict=hyper_search_dict_reg)"
"pipeline_permuter_regression = SklearnPipelinePermuter(\n",
" model_dict_reg, params_dict_reg, hyper_search_dict=hyper_search_dict_reg\n",
")"
]
},
{
Expand Down Expand Up @@ -585,11 +587,7 @@
"outputs": [],
"source": [
"pipeline_permuter.fit_and_save_intermediate(\n",
" X=X, \n",
" y=y, \n",
" outer_cv=outer_cv, \n",
" inner_cv=inner_cv, \n",
" file_path=tmpdir.joinpath(\"test.pkl\")\n",
" X=X, y=y, outer_cv=outer_cv, inner_cv=inner_cv, file_path=tmpdir.joinpath(\"test.pkl\")\n",
")"
]
},
Expand Down Expand Up @@ -661,9 +659,7 @@
" \"KNeighborsClassifier\": {\"n_neighbors\": [2, 4], \"weights\": [\"uniform\", \"distance\"]},\n",
"}\n",
"\n",
"pipeline_permuter_01 = SklearnPipelinePermuter(\n",
" model_dict_01, params_dict_01, random_state=42\n",
")\n",
"pipeline_permuter_01 = SklearnPipelinePermuter(model_dict_01, params_dict_01, random_state=42)\n",
"\n",
"pipeline_permuter_01.fit(X, y, outer_cv=KFold(5), inner_cv=KFold(5), verbose=0)\n",
"pipeline_permuter_01.to_pickle(tmpdir.joinpath(\"permuter_01.pkl\"))"
Expand Down Expand Up @@ -691,9 +687,7 @@
" \"KNeighborsClassifier\": {\"n_neighbors\": [2, 4], \"weights\": [\"uniform\", \"distance\"]},\n",
"}\n",
"\n",
"pipeline_permuter_02 = SklearnPipelinePermuter(\n",
" model_dict_02, params_dict_02, random_state=42\n",
")\n",
"pipeline_permuter_02 = SklearnPipelinePermuter(model_dict_02, params_dict_02, random_state=42)\n",
"\n",
"pipeline_permuter_02.fit(X, y, outer_cv=KFold(5), inner_cv=KFold(5), verbose=0)\n",
"pipeline_permuter_02.to_pickle(tmpdir.joinpath(\"permuter_02.pkl\"))"
Expand Down Expand Up @@ -722,9 +716,7 @@
" \"DecisionTreeClassifier\": {\"criterion\": [\"gini\", \"entropy\"], \"max_depth\": [2, 4]},\n",
"}\n",
"\n",
"pipeline_permuter_03 = SklearnPipelinePermuter(\n",
" model_dict_03, params_dict_03, random_state=42\n",
")\n",
"pipeline_permuter_03 = SklearnPipelinePermuter(model_dict_03, params_dict_03, random_state=42)\n",
"\n",
"pipeline_permuter_03.fit(X, y, outer_cv=KFold(5), inner_cv=KFold(5), verbose=0)\n",
"pipeline_permuter_03.to_pickle(tmpdir.joinpath(\"permuter_03.pkl\"))"
Expand Down Expand Up @@ -845,9 +837,7 @@
" \"KNeighborsClassifier\": {\"n_neighbors\": [2, 4], \"weights\": [\"uniform\", \"distance\"]},\n",
"}\n",
"\n",
"pipeline_permuter_partial = SklearnPipelinePermuter(\n",
" model_dict_partial, params_dict_partial, random_state=42\n",
")\n",
"pipeline_permuter_partial = SklearnPipelinePermuter(model_dict_partial, params_dict_partial, random_state=42)\n",
"\n",
"pipeline_permuter_partial.fit(X, y, outer_cv=KFold(5), inner_cv=KFold(5))\n",
"pipeline_permuter_partial.to_pickle(tmpdir.joinpath(\"permuter_partial.pkl\"))"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "biopsykit"
version = "0.9.0"
version = "0.10.0"
description = "A Python package for the analysis of biopsychological data."
authors = [
"Robert Richer <robert.richer@fau.de>",
Expand Down
2 changes: 1 addition & 1 deletion src/biopsykit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"utils",
]

__version__ = "0.9.0"
__version__ = "0.10.0"


def version() -> None:
Expand Down

0 comments on commit abf0040

Please sign in to comment.