diff --git a/CHANGELOG.md b/CHANGELOG.md index 6caf2f4..5927c3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,18 @@ # Changelog +## 0.6.1 - (2022-04-06) + +**Bug fixes:** + +- Fixed a bug in the Python package when passing `random_forest_max_features='sqrt'` to `Control`. + ## 0.6.0 - (2022-03-17) **Breaking changes:** - The default value for `model_selection_n_permutations` is now 199. -- The default value for `model_selection_alpha` is now 0.02 +- The default value for `model_selection_alpha` is now 0.02. - The default value for `minimal_gain_to_split`, use in the `change_in_mean` setup, is now `log(n) * (d + 1)`, motivated by the BIC and [1]. - The value for `minimal_gain_to_split` no longer gets automatically multiplied by `n`. diff --git a/Cargo.toml b/Cargo.toml index d5ea2d9..37c5d8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "changeforest" description = "Classifier based non-parametric change point detection." authors = ["Malte Londschien "] repository = "https://github.com/mlondschien/changeforest/" -version = "0.6.0" +version = "0.6.1" edition = "2021" readme = "README.md" license = "BSD-3-Clause" diff --git a/changeforest-py/Cargo.toml b/changeforest-py/Cargo.toml index 76b84da..ae1fb05 100644 --- a/changeforest-py/Cargo.toml +++ b/changeforest-py/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "changeforest_py" -version = "0.6.0" +version = "0.6.1" edition = "2021" [lib] diff --git a/changeforest-py/changeforest/control.py b/changeforest-py/changeforest/control.py index c0cf71b..c46f227 100644 --- a/changeforest-py/changeforest/control.py +++ b/changeforest-py/changeforest/control.py @@ -37,8 +37,8 @@ def __init__( def _to_float(value): if value is None: return None - if value == "default": - return "default" + elif isinstance(value, str): + return value else: return float(value) @@ -46,7 +46,7 @@ def _to_float(value): def _to_int(value): if value is None: return None - if value == "default": - return "default" + elif isinstance(value, str): + return value else: return int(value) diff --git a/changeforest-py/pyproject.toml b/changeforest-py/pyproject.toml index 649e602..fa12a01 100644 --- a/changeforest-py/pyproject.toml +++ b/changeforest-py/pyproject.toml @@ -2,7 +2,7 @@ name = "changeforest" description = "Classifier based non-parametric change point detection" readme = "README.md" -version = "0.6.0" +version = "0.6.1" requires-python = ">=3.7" author = "Malte Londschien " urls = {homepage = "https://github.com/mlondschien/changeforest/"} diff --git a/changeforest-py/tests/test_control.py b/changeforest-py/tests/test_control.py index 82d3d6d..07971de 100644 --- a/changeforest-py/tests/test_control.py +++ b/changeforest-py/tests/test_control.py @@ -41,6 +41,13 @@ ("X_test", "bs", "random_forest", {"random_forest_n_estimators": 100}, [5]), ("X_correlated", "bs", "random_forest", {"random_forest_max_depth": 1}, []), ("X_correlated", "bs", "random_forest", {"random_forest_max_depth": 2}, [49]), + ( + "X_correlated", + "bs", + "random_forest", + {"random_forest_max_features": "sqrt"}, + [49], + ), ("iris", "bs", "random_forest", {"model_selection_n_permutations": 10}, []), ], ) diff --git a/changeforest-r/DESCRIPTION b/changeforest-r/DESCRIPTION index 4a5aec4..3824a94 100644 --- a/changeforest-r/DESCRIPTION +++ b/changeforest-r/DESCRIPTION @@ -1,7 +1,7 @@ Package: changeforest Type: Package Title: Classifier Based Non-Parametric Change Point Detection -Version: 0.6.0 +Version: 0.6.1 Author: Malte Londschien Maintainer: Malte Londschien Description: Perform classifier based multivariate, non-parametric change point detection. diff --git a/changeforest-r/src/rust/Cargo.toml b/changeforest-r/src/rust/Cargo.toml index 05beb2d..8af09a6 100644 --- a/changeforest-r/src/rust/Cargo.toml +++ b/changeforest-r/src/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'changeforestr' -version = '0.6.0' +version = '0.6.1' edition = '2021' [lib]