Skip to content

Conversation

@jan-elastic
Copy link
Contributor

@jan-elastic jan-elastic commented Oct 8, 2024

The main change is moving change detection to a separate class (out of the aggregator), and creating a single entrypoint for change point detection (ChangePointAggregator::getChangeType), where an ES|QL implementation can hook into. Futhermore, I refactored a bit to make change detection and spike-and-dip detection more uniform.

@jan-elastic jan-elastic added >non-issue :ml Machine learning Team:ML Meta label for the ML team v8.16.0 v9.0.0 labels Oct 8, 2024
@jan-elastic jan-elastic requested a review from tveasey October 8, 2024 09:24
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

Copy link
Contributor

@tveasey tveasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. I think maybe even a little more should move to ChangeDetector than you currently have, as per comments, but happy for you to merge without another review from me.

@jan-elastic jan-elastic force-pushed the refactor-changepointdetection branch from 87ff70e to 07d1dbd Compare October 9, 2024 11:09
Copy link
Contributor

@tveasey tveasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have one suggestion on the naming

* ChangeDetector and SpikeAndDipDetector on it. This is the main entrypoint
* of change point detection.
*/
public class ChangePointDetector {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is in keeping with the aggregation name, but I think we can do better on the naming. For me something like point of interest is better.

Suggested change
public class ChangePointDetector {
public class PointOfInterestDetector {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if "point of interest" is that much better. E.g. it doesn't capture (non-)stationary that well.

Given that the agg is called "Change Point Aggregation" right now, I'd rather keep it like this. If we decide the ES|QL variant will be called differently (suggestions are welcome!), we can always rename it then.

@jan-elastic jan-elastic merged commit 3152e41 into main Oct 10, 2024
16 of 18 checks passed
@jan-elastic jan-elastic deleted the refactor-changepointdetection branch October 10, 2024 08:24
matthewabbott pushed a commit to matthewabbott/elasticsearch that referenced this pull request Oct 10, 2024
* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file
davidkyle pushed a commit to davidkyle/elasticsearch that referenced this pull request Oct 13, 2024
* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file
jan-elastic added a commit that referenced this pull request Jan 7, 2025
* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file
elasticsearchmachine pushed a commit that referenced this pull request Jan 7, 2025
* Refactor change point detection (#114289)

* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file

* Fix change point detection for uncertain non-stationary distributions. (#119578)

* Fix change point detection for uncertain non-stationary distributions.

* Replace -1 by ChangeType.NO_CHANGE_POINT
elasticsearchmachine pushed a commit that referenced this pull request Jan 7, 2025
* Refactor change point detection (#114289)

* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file

* Fix change point detection for uncertain non-stationary distributions. (#119578)

* Fix change point detection for uncertain non-stationary distributions.

* Replace -1 by ChangeType.NO_CHANGE_POINT
elasticsearchmachine pushed a commit that referenced this pull request Jan 7, 2025
* Refactor change point detection (#114289)

* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file

* Fix change point detection for uncertain non-stationary distributions. (#119578)

* Fix change point detection for uncertain non-stationary distributions.

* Replace -1 by ChangeType.NO_CHANGE_POINT
sarog pushed a commit to portsbuild/elasticsearch that referenced this pull request Jan 22, 2025
* Refactor change point detection (elastic#114289)

* Move change detection code to separate class

* Uniformize ChangeDetector and SkipeAndDipDetector

* Separate ChangeDetectorTests and ChangePointAggregatorTests.

* Public entrypoint for change point detection

* Move p-value computation to ChangeDetector

* Move main entrypoint to a separate file

* Fix change point detection for uncertain non-stationary distributions. (elastic#119578)

* Fix change point detection for uncertain non-stationary distributions.

* Replace -1 by ChangeType.NO_CHANGE_POINT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml Machine learning >non-issue Team:ML Meta label for the ML team v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants