Binary Class Transformation¶
The Binary Class Transformation Approach (Influential Marketing, Response Transformation Approach).
- Based on
Kuchumov, A. pyuplift: Lightweight uplift modeling framework for Python. (2019). URL: https://github.com/duketemon/pyuplift. License: https://github.com/duketemon/pyuplift/blob/master/LICENSE.
Lai, L.Y.-T. (2006). “Influential marketing: A new direct marketing strategy addressing the existence of voluntary buyers”. Master of Science thesis, Simon Fraser University School of Computing Science, Burnaby, BC,Canada. URL: https://summit.sfu.ca/item/6629
Shaar, A., Abdessalem, T., and Segard, O. (2016). “Pessimistic Uplift Modeling”. ACM SIGKDD, August 2016, San Francisco, California USA, arXiv:1603.09738v1. URL:https://pdfs.semanticscholar.org/a67e/401715014c7a9d6a6679df70175be01daf7c.pdf.
Devriendt, F. et al. (2018). A Literature Survey and Experimental Evaluation of the State-of-the-Art in Uplift Modeling: A Stepping Stone Toward the Development of Prescriptive Analytics. Big Data, Vol. 6, No. 1, March 1, 2018, pp. 1-29. Codes found at: data-lab.be/downloads.php.
- Contents
- BinaryTransformation Class
_binary_transformation, _binary_regularization, fit, predict (Not available at this time), predict_proba
- class causeinfer.standard_algorithms.binary_transformation.BinaryTransformation(model=None, regularize=False)[source]¶
- _binary_transformation(y, w)[source]¶
Derives which of the unknown Affected Positive or Affected Negative classes the unit could fall into based known outcomes.
- Parameters:
- ynumpy.ndarray(num_units,)int, float
Vector of unit responses.
- wnumpy.ndarray(num_units,)int, float
Vector of original treatment allocations across units.
- Returns:
- np.array(y_transformed)numpy.ndarrayan array of transformed unit classes.
- _binary_regularization(y=None, w=None)[source]¶
Regularization of binary classes is based on the positive and negative binary affectual classes.
- Parameters:
- ynumpy.ndarray(num_units,)int, float
Vector of unit responses.
- wnumpy.ndarray(num_units,)int, float
Vector of original treatment allocations across units.
- Returns:
- fav_ratio, unfav_ratiofloat
Regularized ratios of favorable and unfavorable classes.
- fit(X, y, w)[source]¶
Trains a model given covariates, responses and assignments.
- Parameters:
- Xnumpy.ndarray(num_units, num_features)int, float
Matrix of covariates.
- ynumpy.ndarray(num_units,)int, float
Vector of unit responses.
- wnumpy.ndarray(num_units,)int, float
Vector of original treatment allocations across units.
- Returns:
- selfcauseinfer.standard_algorithms.BinaryTransformation
A trained model.
- predict_proba(X)[source]¶
Predicts the probability that a subject will be a given class given covariates.
- Parameters:
- Xnumpy.ndarray(num_units, num_features)int, float
New data on which to make predictions.
- Returns:
- probasnumpy.ndarray(num_units, 2)float
Predicted probabilities for being a favorable class and unfavorable class.