-
Notifications
You must be signed in to change notification settings - Fork 40
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
Evaluate metrics over time #68
Comments
I'm not sure, but is this something that can be done with popmon? |
Have you thought about how a potential API would look like (pseudo code)? |
I think this could be done by extending When you split the data into train and test you take into account time column:
The first option seems easiest to implement reusing most of the existing code. For the remaining two it would be more difficult. I suppose the first one would be a good starting point. In all cases, you would need to consider a new plotting method, that would be similar for all time-based metric volatility. You could also make another base class Regarding use of popmon, we could try to use it for plotting, however, i think this is a minor part of the feature, and we could get a more efficient implementation if we do it ourselves. |
My thoughts were to start simple: Having something like
I had in mind to have a fitted model as argument so that hyperparmeters optimization is done outside the class |
Possible improvements:
What would the What would be use case for using this code? Could you provide example what this analysis tells you about the model/data? |
Good points Mateusz.
The benefit of the new code is that the user sees (for example) the AUC over time and can easily spot performance degradation. For example specific months (say Covid, summer holidays, ....). This helps you to either assess the impact of unexpected changes (like for example Covid, crisis, bad publicity) but also understanding the reason may reveal some weaknesses of the model. For example the model starts deteriorate once the mortgage production increased. Then you would try to mitigate this by adding features related to mortgages. |
So to summarize:
Is that correct? I like the approach for the simplicity. It provides you information for which periods of time to be cautious, and possible data drifts. It is similar to another issue #72 but it focuses on how the performance of target prediction changes over time. The limitation I see is that when you compute the probabilities for X using CV, the model is trained on the data from the entire time span. Imagine you have a sample in the middle of the dataset, the model has seen samples before and after that. Let's also ask others what do they think? @timvink @anilkumarpanda @operte |
You understood it correctly. I am not sure the limitation you raise on the cross-section would have a large impact. |
Indeed probably low impact 👍 However, I would reach out to a couple of users and see if they would find it useful for their projects. |
Is this still a feature that we want to work on @gverbock @anilkumarpanda ? |
Problem Description
It would be great if Probatus would give the metric (including volatility) over time so that eventual drops in model performance can be spotted easily. The time aggregation level (day, month, quarter) would be chosen by the user.
Desired Outcome
The output would be a dataframe containing the following columns: dates, metric1, metric2. The input could then be used for a plot like the following:
Also possibility to evaluate for out-of-time would be required.
Solution Outline
Maybe incorporate it in the metric_volatility class. Passing a series with the date to aggregate and using groupby before computing the metrics.
The text was updated successfully, but these errors were encountered: