libuplift.classifiers.memoized#

A memoized classifier class.

Used to avoid recomputing the same classifier twice e.g. when both T-learner and Response models are computed.

Classes#

MemoizedClassifier

Creates a memoized version of an estimator.

Module Contents#

class libuplift.classifiers.memoized.MemoizedClassifier(estimator, memory=None)[source]#

Bases: sklearn.base.BaseEstimator

Creates a memoized version of an estimator.

Subsequent calls to fit with the same arguments will reuse a prefitted model.

memory is either a path or a joblib.Memory object. If None a default path is used: “libuplift_cache” in systems default temporary directory.

Parameters:
estimatora scikit-klearn

EstimatClassifier to wrap in a regessor interface.

memorya joblib.Memory object, default=None
fit(*args, **kwargs)[source]#
__getattr__(name)[source]#