Implementation of local prediction rigidity
agoscinski opened this issue · 2 comments
For discussions about how to implement it the best.
Probably https://github.com/lab-cosmo/scikit-matter/tree/main/src/skmatter/metrics is the best place to put it in.
What would be the user interface? Seems like a similar interface like the directional convex hull which uses the score function to output the directional convex hull distance.
class LPR(BaseEstimator):
def __init__(self, estimator):
self._estimatior = estimator.clone()
def fit(self, X):
self.estimator_.fit(X)
return self
def score(self, X):
# LPR computation
lpr_score = ... # using self.estimator_.coef_
return lpr_score
AFAIK, the way to compute LPR depends on the choice of estimator. I would be surprised if we can make the proposed LPR class generic over the estimator. We might need instead to have separate LinearLPR
, KernelLPR
, … classes
Really late to a follow-up here, my apologies.
I did have a few discussions with @agoscinski regarding where would be the best place to implement the LPR, and how it could be implemented. Thing is, computing the LPR requires more of the actual model training detail than how it seems on the surface. To me, offering it as a "bonus" of some solver package could be another viable option.
Between the two of us, decision was made to have it implemented in both a solver and scikit-matter, and first here. A bare bones implementation and an accompanying tutorial will be provided, hopefully soon. Thanks everyone!