Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, weight_matrix, propensity_matrix, treatment_assignment, treatment_assignment_prediction=None):
super(PropensityEvaluatorPredictions2, self).__init__(weight_matrix, treatment_assignment,
treatment_assignment_prediction)
self.propensity_matrix = propensity_matrix
def _estimator_predict2(self, X, a):
"""Predict on data."""
weight_prediction = super(PropensityEvaluator, self)._estimator_predict2(X, a)
propensity_matrix = self.estimator.compute_propensity_matrix(X)
fold_prediction = PropensityEvaluatorPredictions2(weight_prediction.weight_matrix, propensity_matrix,
a, weight_prediction.treatment_assignment_prediction)
return fold_prediction