Welcome to ML Insights’s documentation!

Contents:

This package currently contains two useful sets of features. The first is around the Model X-ray, which gives some ways to understand black-box models. The second is around probability calibration.

Installation:

$ pip install ml_insights

Usage:

>>> import ml_insights as mli
>>> xray = mli.ModelXRay(model, data)
>>> rfm = RandomForestClassifier(n_estimators = 500, class_weight='balanced_subsample')
>>> rfm_cv = mli.SplineCalibratedClassifierCV(rfm)
>>> rfm_cv.fit(X_train,y_train)
>>> test_res_calib_cv = rfm_cv.predict_proba(X_test)[:,1]
>>> log_loss(y_test,test_res_calib_cv)

API Docs: