title | theme | revealOptions | ||
---|---|---|---|---|
Kernel Density Estimation |
solarized |
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pop_diff(popA, popB, bin_boundaries=None, num_bins=10): | |
""" | |
Compute difference between two populations using the PSI / IV formula | |
$$\Sigma_{i} (p_i^B - p_i^a)*\ln(\frac{p_i^B}{p_i^A})$$ | |
Note: | |
Counts missing values in a separate bin to test for information and shift. | |
Raises ValueError if popA has no nans but popB does. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.metrics import roc_auc_score | |
def auc(X, y, classifier): | |
y_score = classifier.predict_proba(X)[:, 1] | |
return roc_auc_score(y, y_score) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# machine learning | |
scikit-learn | |
statsmodels | |
xgboost | |
lightgbm | |
catboost | |
# natural language processing | |
gensim |