Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion otava/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def setup_analysis_options_parser(parser: argparse.ArgumentParser):
)
parser.add_argument(
"--orig-edivisive",
type=bool,
action="store_true",
default=False,
dest="orig_edivisive",
help="use the original edivisive algorithm with no windowing "
Expand Down
12 changes: 11 additions & 1 deletion otava/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from typing import Any, Dict, Iterable, List, Optional

from otava.analysis import (
TTestSignificanceTester,
TTestStats,
compute_change_points,
compute_change_points_orig,
Expand Down Expand Up @@ -248,7 +249,16 @@ def __compute_change_points(
values,
max_pvalue=options.max_pvalue,
)
result[metric] = change_points
tester = TTestSignificanceTester(options.max_pvalue)
intervals = tester.get_intervals(change_points)
for c in change_points:
cp_ttest = tester.change_point(c.to_candidate(), values, intervals)
result[metric].append(
ChangePoint(
index=cp_ttest.index, qhat=cp_ttest.qhat,
time=series.time[cp_ttest.index], metric=metric, stats=cp_ttest.stats
)
)
else:
change_points, weak_cps = compute_change_points(
values,
Expand Down
5 changes: 2 additions & 3 deletions tests/cli_help_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_otava_analyze_help_output():
[--output {{log,json,regressions_only}}] [--branch [STRING]] [--metrics LIST]
{usage_filter_lines}
[--last COUNT] [-P, --p-value PVALUE] [-M MAGNITUDE] [--window WINDOW]
[--orig-edivisive ORIG_EDIVISIVE]
[--orig-edivisive]
tests [tests ...]

positional arguments:
Expand Down Expand Up @@ -215,8 +215,7 @@ def test_otava_analyze_help_output():
windows are less susceptible to noise; however, a very large window may
cause dismissing short regressions as noise so it is best to keep it short
enough to include not more than a few change points (optimally at most 1)
--orig-edivisive ORIG_EDIVISIVE
use the original edivisive algorithm with no windowing and weak change
--orig-edivisive use the original edivisive algorithm with no windowing and weak change
points analysis improvements

Graphite Options:
Expand Down
Loading