Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP POC regression indicators #176

Closed
wants to merge 2 commits into from
Closed

Conversation

drewrip
Copy link
Contributor

@drewrip drewrip commented Jan 17, 2024

Some framework to create a number of different regression indicators, and a placeholder for potentially some future indicator that uses polynomial regression. Hoping to use this to discuss more about the design of the Regression portion @kpouget @ccamacho

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2024
Copy link

openshift-ci bot commented Jan 17, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dagrayvid for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment on lines +101 to +107
if abs(z_score) > self.threshold:
if z_score < 0:
return -1
else:
return 1
else:
return 0
Copy link
Contributor

Choose a reason for hiding this comment

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

        if abs(z_score) <= self.threshold:
            status = 0 # in comment: what 0 means?
        elif z_score < 0:
             status = -1 # in comment: what -1 means?
        else:
              status = 1 # in comment: what -1 means?

        return status

maybe an enum could be useful here? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

hum, the enum is already there, at the top :D

return 0


if __name__ == '__main__':
Copy link
Contributor

Choose a reason for hiding this comment

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

when ready for merging, can you move this out of this file?

Comment on lines +9 to +14
regression_return_codes = {
"POS_REG": 1,
"NEG_REG": -1,
"NONE": 0,
"UNDEF": 2,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can you turn this into a Python enum, and make sure that the string ends up in the final JSON (not the int)
and if you can use full words instead of abbreviations :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kpouget Thanks for the feedback! I actually thought I closed this PR, this was a precursor to the matbench PR. This is all old code and has been adapted into matrix-benchmarking :)

Comment on lines +27 to +28
x_var="_source.@timestamp",
y_var="_source.value",
Copy link
Contributor

@kpouget kpouget Jan 29, 2024

Choose a reason for hiding this comment

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

I'm not sure to understand how (nor where) this is used? 🤔
_source.... should be internal OpenSearch, this module should not receive OpenSearch values

@drewrip drewrip closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants