from core.explanations.validators.BaseExplanationValidator import BaseExplanationValidator


class InflatedExplanationValidator(BaseExplanationValidator):

    def __init__(self, model, label, sample, epsilon, eta):
        super().__init__(model, label, sample.shape)

        if self.model.classify([sample]) != int(label):
            raise ValueError(f"The sample does not match the label {label}.")

        self.epsilon = epsilon
        self.eta = eta

    def _get_bounds(self, sample, explanation, feature):
        return explanation[feature]
