-
Notifications
You must be signed in to change notification settings - Fork 216
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
integrated_brier_score() - ValueError: expected estimate with ... columns, but got ... #317
Comments
The error indicates that the number of time points does not match the number predictions (where needs to be one for each time point). I don't think it as anything to do with the data type. |
I checked the metrics.py, it looks like it is related to the type of data. So, if your data points are not integers but float, printing time_points in the metrics.py will results in a shorter array so the dimension will change. I fixed this by making the input integers, or it can be floats which if converted to integers will result in the same length. |
Could you please provide a minimal working example to reproduce the problem (e.g. using randomly generated predictions)? |
I have just updated the issue with the minimum working example and attached a data file. Thank you. |
You are correct. scikit-survival/sksurv/metrics.py Line 66 in 7fd87e7
This is not intended. |
If `times` is a float array and survival times are ints, a downcast of float to int can result in loss of information. Keep the original dtype instead. Closes #317
data.csv
Describe the bug
integrated_brier_score() function cannot input floats and it looks like inputs must be integers only. This is not described in the documentation, I was wondering if you could add that, please?
If you input times as float, your module converts that to integers and the length of 'times' floats may not be equal to the length of 'times' of integers, because of rounding methods.
Code Sample to Reproduce the Bug
Expected Results
ibs
Actual Results
Versions
Please execute the following snippet and paste the output below.
The text was updated successfully, but these errors were encountered: