SkillAgentSearch skills...

Pykliep

A density ratio estimator package for python using the KLIEP algorithm.

Install / Use

/learn @srome/Pykliep
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pykliep

A density ratio estimator package for python using the KLIEP algorithm.

The DensityRatioEstimator class implements the Kullback-Leibler Importance Estimation Procedure by Sugiyama et al. Estimator uses likelihood cross validation (LCV) to tune the num_params and sigma parameters.

Usage

from pykliep import DensityRatioEstimator 

kliep = DensityRatioEstimator()
kliep.fit(X_train, X_test) # keyword arguments are X_train and X_test
weights = kliep.predict(X_train)

rf = RandomForestRegressor()
rf.fit(X_train, y_train, sample_weight=weights) # Train using the sample weights!

View on GitHub
GitHub Stars110
CategoryDevelopment
Updated1mo ago
Forks22

Languages

Python

Security Score

95/100

Audited on Mar 4, 2026

No findings