-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix plot() for change_in_mean and sbs, wbs. (#119)
* Fix plotting of change_in_mean. * Fix plotting for sbs, wbs. * 0.7.2. * Add matplotlib to dependencies. * Correct red line. * Install matplotlib in pyproject.toml * Also install matplotlib for python tests.
- Loading branch information
1 parent
f391f46
commit b5ea904
Showing
11 changed files
with
51 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "changeforest" | |
description = "Classifier based non-parametric change point detection." | ||
authors = ["Malte Londschien <[email protected]>"] | ||
repository = "https://github.com/mlondschien/changeforest/" | ||
version = "0.7.1" | ||
version = "0.7.2" | ||
edition = "2021" | ||
readme = "README.md" | ||
license = "BSD-3-Clause" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "changeforest_py" | ||
version = "0.7.1" | ||
version = "0.7.2" | ||
edition = "2021" | ||
|
||
[lib] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ dependencies: | |
- python >=3.7 | ||
- maturin | ||
- pytest | ||
- numpy >=1.19.0 | ||
- numpy >=1.19.0 | ||
- matplotlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "changeforest" | ||
description = "Classifier based non-parametric change point detection" | ||
readme = "README.md" | ||
version = "0.7.1" | ||
version = "0.7.2" | ||
requires-python = ">=3.7" | ||
author = "Malte Londschien <[email protected]>" | ||
urls = {homepage = "https://github.com/mlondschien/changeforest/"} | ||
|
@@ -25,7 +25,7 @@ skip_glob = '\.eggs/*,\.git/*,\.venv/*,build/*,dist/*' | |
default_section = 'THIRDPARTY' | ||
|
||
[tool.cibuildwheel] | ||
test-requires = "numpy pytest" | ||
test-requires = "numpy matplotlib pytest" | ||
test-command = "pytest {project}/changeforest-py/tests" | ||
|
||
# macos arm64 wheels can be built on X86_64, but cannot be tested. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import pytest | ||
|
||
from changeforest import Control, changeforest | ||
|
||
|
||
@pytest.mark.parametrize("method", ["knn", "change_in_mean", "random_forest"]) | ||
@pytest.mark.parametrize("segmentation_type", ["bs", "sbs", "wbs"]) | ||
def test_plot_binary_segmentation_result(iris_dataset, method, segmentation_type): | ||
result = changeforest( | ||
iris_dataset, | ||
method, | ||
segmentation_type, | ||
control=Control(minimal_relative_segment_length=0.1), | ||
) | ||
result.plot().show() | ||
|
||
|
||
@pytest.mark.parametrize("method", ["knn", "change_in_mean", "random_forest"]) | ||
@pytest.mark.parametrize("segmentation_type", ["bs", "sbs", "wbs"]) | ||
def test_plot_optimizer_result(iris_dataset, method, segmentation_type): | ||
result = changeforest( | ||
iris_dataset, | ||
method, | ||
segmentation_type, | ||
control=Control(minimal_relative_segment_length=0.1), | ||
) | ||
result.optimizer_result.plot().show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: changeforest | ||
Type: Package | ||
Title: Classifier Based Non-Parametric Change Point Detection | ||
Version: 0.7.1 | ||
Version: 0.7.2 | ||
Author: Malte Londschien | ||
Maintainer: Malte Londschien <[email protected]> | ||
Description: Perform classifier based multivariate, non-parametric change point detection. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = 'changeforestr' | ||
version = '0.7.1' | ||
version = '0.7.2' | ||
edition = '2021' | ||
|
||
[lib] | ||
|