mini_causal.causality.CausalModelsClassifier

class mini_causal.causality.CausalModelsClassifier(first_model, second_model)

CausalModelClassifier class implementation. The class inherits the CausalModels class

The class is mainly deisgned to implement and include Classification of all kinds. The aim is to measure the imapact that one model has on the predictions compared to the second one .

In other words,A/B Testing using causality to measure impact.

Parameters:
  • first_model – the first trained model

  • second_model – the second trained model

individual_causal_effects

an array of the individual causal effects for the predictions

Type:

np.ndarray

individual_causal_effects_resid

an array of the individual causal effects for the residuals

Type:

np.ndarray

individual_causal_effects_probs

an array of the individual causal effects for the probabilities

Type:

np.ndarray

average_causal_effect

the average causal effect of the first model

Type:

float

average_causal_effect_resid

the average causal effect of the first model on the residuals

Type:

float

average_causal_effect_probs

the average causal effect of the first model on the predicted probabilities

Type:

float

__init__(first_model, second_model)

Methods

__init__(first_model, second_model)

average_causal_effect(X)

The average difference in the predictions for the two models.

average_causal_effect_probs(X)

The average difference in the predicted probabilities for the two models

average_causal_effect_resid(X)

The average difference in the effects of the residuals.

individual_causal_effects(X)

The individual causal effects of the predicted outcomes.

individual_causal_effects_probs(X)

The individual causal effects of the predicted probabilities

individual_causal_effects_resid(X)

The individual causal effects of the residuals.