percent_better_than_baseline fails when baseline is 0
See original GitHub issueRepro:
dataset
X = pd.read_csv('/Users/becca.mcbrayer/Desktop/text_datasets/wine_modified.csv')[:100] y = X.pop('points') X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42) automl_no_text = AutoMLSearch(problem_type='binary', objective='precision') automl_no_text.search(X_train, y_train)
Output:
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
For some objectives where baseline was 0, "pct better than ...
@dsherry @rpeck This is expected behavior because the baseline pipeline gets a score of 0 on the objectives with NaN ( F1 ,...
Read more >Percent calcuation causes divide by zero error
I am trying to compare sales by month and i am gettting an error message. Example April Sales 20, May sales 0, i...
Read more >How to calculate relative error when the true value is zero?
The solution to your question is to make sure you are dealing with absolute values when measuring relative error, so that zero is...
Read more >How to calculate percentage when old value is ZERO
When P is actually zero then the concept of percentage change has no meaning. Zero to anything cannot be expressed as a rate...
Read more >A Post Occupancy Evaluation of 22 GSA Buildings
Between 0% and 50 % Under Baseline ... measurement error, a leak, an unintended use, or an increase in the building occupant related...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see, I must have missed that!
that’s true, but if you think about it has a percent improvement or decrease
inf
would make sense too. that being said, it’s a bit weird in cases where the bounds on the metric are something like(-1, 1)
since a zero score would give youinf
, but a slight deviation wouldnt.so, i guess i convinced myself
nan
is right