question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input for ProbClassificationPerformanceAnalyzer

See original GitHub issue

I posted same question at discord first, but this maybe a more appropriate place. We’ll see 😉

I’m writing some tests for dashboards and profiles but stumbled upon a probable bug in ProbClassificationPerformanceAnalyzer. https://github.com/burkovae/evidently/blob/ab-fix-classification-bugs/evidently/analyzers/test_classification_analyzers.py

Since I’m not sure, how a correct input would look like, I hope that someone can post ist here. I will be happy with a very basic data for an analysis of a single dataframe. Hence, I hope to get some correct input, so that I can narrow down what’s happening and what components fails.

Especially I would like know, what the ProbClassificationPerformanceAnalyzer computes exactly (@emeli-dral it seems you wrote this piece). I would be happy with few inputs and expected outputs.

If you already know the fix to

Error
Traceback (most recent call last):
  File "...\evidently\evidently\analyzers\test_classification_analyzers.py", line 21, in test_single_dataset_with_two_classes
    blubb = analyzer.calculate(df, None, ColumnMapping())
  File "...\evidently\analyzers\prob_classification_performance_analyzer.py", line 32, in calculate
    prediction_labels = [prediction_column[x] for x in prediction_ids]
TypeError: 'numpy.intc' object is not iterable

then I urge you to write the tests with inputs and expected outputs first, please. It helps down the line and improves robustness and safeguard against unwanted changes.

If you can point me in the right direction, I will fix any issues along the road. I just need to know what you compute specifically with some explicit examples.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Liraimcommented, Dec 5, 2021

Probably my previous answer was misleading:

You are totally right that good tests can be good documentation, and we definitely will write this kind of tests. But it is time-consuming to write proper tests, so I mentioned documentation.

And I didn’t mean that documentation will be substitution for tests in any way, docs that I meant is some kind of high-level description about how given component work, and how you can use it (maybe with code snippets). And it is definitely not a way to test our code.

In short:

  • tests is our priority for code-quality
  • documentation also our priority but for usability
0reactions
burkovaecommented, Dec 5, 2021

thb, 4 years ago, I though writing proper tests would be time consuming as well until a co-worker introduced me to test driven development. Since then I cannot help myself but to write tests first 😃 We all have our journey and the community is here to help. Because I believe in evidently’s approach ❤, I will contribute to tests whenever I can.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Comprehensive Guide on How to Monitor Your Models in ...
Using metrics to evaluate model performance is a big part of monitoring your model in production. Different metrics can be used here, such...
Read more >
How Text Classification works—ArcGIS Pro | Documentation
This tool uses a machine learning approach and trains the model by providing it with training samples consisting of pairs of input text...
Read more >
A Visualization System for Performance Analysis of Image Clas
We herein present an interactive visual analytics system to provide a wide range of performance evaluation methods of different machine learning models for ......
Read more >
Effects of data set features on the performances of ... - OSF
As the need to analyze big data sets grows dramatically, the role that classification algorithms play in data mining techniques also increases.
Read more >
Use Performance Analyzer to examine report element ...
In Power BI Desktop you can find out how each of your report elements, such as visuals and DAX formulas, are performing. Using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found