True Positive and Negative rates in multiclosure weighted fits#2258
Conversation
a3aed71 to
a569fd6
Compare
93b23f0 to
b46f020
Compare
scarlehoff
left a comment
There was a problem hiding this comment.
I think it is mostly ok. The only thing is that, if possible, I'd try to trim down the helpers since some of the functionality is already in results.py (or, the one that is not, would be better suited as enhancements there).
|
|
||
| @property | ||
| def reduced(self): | ||
| return self.value / self.ndata |
There was a problem hiding this comment.
There's already Chi2Data in results... I wonder whether it'd be better to extend that one? Or maybe use a different name here?
The difference is that this one holds the dataset only while the other holds a whole result object.
(in any case docstr needed)
There was a problem hiding this comment.
What name would you go for? Would DatasetChi2 work for you?
There was a problem hiding this comment.
Yes. But also, I think it should be in results?
Btw, this is a case (and the one below) where there a clashes with other parts of the code generated by the import *.
There was a problem hiding this comment.
The one below yes, but CentralChi2Data is only defined in multiclosure to my knowledge
There was a problem hiding this comment.
ah, right, the function there is central_chi2 instead
|
|
||
| value = calc_chi2(sqrt_covmat, diff) | ||
| ndata = len(central_predictions) | ||
| return CentralChi2Data(value=value, ndata=ndata, dataset=dataset) |
There was a problem hiding this comment.
Test it because I'm not 100% sure (maybe you are doing something in the multiclosure that will break this) but in principle this function could just depend on abs_chi2_data which would automatically get the predictions, the data and the compute the chi2.
6d31329 to
13c6ec9
Compare
|
Hi @scarlehoff, thank you very much for your review comments. I should have addressed most of them now. If you prefer I can also move the |
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
Module for computation of True Positive and Negative rates for flagging a dataset as inconsistent.
When the fit is weighted TPR and TNR are computed taking into account whether adding the weight has deteriorated the overall fit quality.