skada.KLIEPReweight
- skada.KLIEPReweight(base_estimator=None, gamma=1.0, cv=5, n_centers=100, tol=1e-06, max_iter=1000, random_state=None)[source]
KLIEPReweight pipeline adapter and estimator.
see [3] for details.
- Parameters:
- base_estimatorsklearn estimator, default=LogisticRegression()
estimator used for fitting and prediction
- gammafloat or array like
Parameters for the kernels. If array like, compute the likelihood cross validation to choose the best parameters for the RBF kernel. If float, solve the optimization for the given kernel parameter.
- cvint, cross-validation generator or an iterable, default=5
Determines the cross-validation splitting strategy. If it is an int it is the number of folds for the cross validation.
- n_centersint, default=100
Number of kernel centers defining their number.
- tolfloat, default=1e-6
Tolerance for the stopping criterion in the optimization.
- max_iterint, default=1000
Number of maximum iteration before stopping the optimization.
- random_stateint, RandomState instance or None, default=None
Determines random number generation for dataset creation. Pass an int for reproducible output across multiple function calls.
- Returns:
- pipelinesklearn pipeline
Pipeline containing the KLIEPReweight adapter and the base estimator.
References
[3]Masashi Sugiyama et. al. Direct Importance Estimation with Model Selection and Its Application to Covariate Shift Adaptation. In NeurIPS, 2007.
Examples using skada.KLIEPReweight
Comparison of DA classification methods
Reweighting method example on covariate shift dataset