Skip to main content

MonitorAI SDK

The Official Python SDK for Monitoring Machines Lab. MonitorAI is an observabiltiy framework designed for tabular ML to GenAI offering root cause analysis and decision intelligence allowing a linkup between ML and decision making for organizations that rely and use ML for solutions.

Getting started with monitorai sdk for feature drift :

  • Install the package:
pip install monitorai
import pandas as pd
from monitorai import MonitorAI
from monitorai.drift.feature import CategoricalFeatureDrift

client=MonitorAI(api_key="***")

ref_df=pd.DataFrame({
"color":["red","red","blue","blue","red","yellow","yellow","red","blue"],
"social":["twitter","twitter","facebook","facebook","twitter","insta","insta","insta","insta"]})
    
analysis_df=pd.DataFrame({
"color":["red","red","red","blue","blue","yellow"],
"social":["twitter","twitter","facebook","insta","insta","insta"]
})


## create feature drift variable:
feature_drift=CategoricalFeatureDrift(ref_data=ref_df,analysis_data=analysis_df)

## get the bhattacharrya coefficients
bhatta_coeff_social=feature_drift.bhatta_coeff(feature="social")
bhatta_coeff_color=feature_drift.bhatta_coeff(feature="color")

## cauchy schwartz distance:
cauchy_schwartz_social=feature_drift.cauchy_schwartz_dist(feature="social")
cauchy_schwartz_color=feature_drift.cauchy_schwartz_dist(feature="color")

## euclidean distance:
euclid_social=feature_drift.euclidean_dist(feature="social")
euclid_color=feature_drift.euclidean_dist(feature="color")

## hellinger distance:
hellinger_social=feature_drift.hellinger_dist(feature="social")
hellinger_color=feature_drift.hellinger_dist(feature="color")

## jensen-shannon divergence:
js_social=feature_drift.js_divergence(feature="social")
js_color=feature_drift.js_divergence(feature="social")

## kl-divergence:
kl_social=feature_drift.kl_divergence(feature="social")
kl_color=feature_drift.kl_divergence(feature="color")

##psi:
psi_social=feature_drift.psi(feature="social")
psi_color=feature_drift.psi(feature="color")

Citing monitorai

If you use monitorai in your research, please cite it:

@software{monitorai,
  title = {monitorai: A Root Cause and Decision Intelligence Kit For Machine Learning},
  author = {Monitoring Machines Lab},
  year = {2026},
  url = {https://github.com/MasemeneMatlakanaBenny/monitorai},
  doi = {10.5281/zenodo.19646175},
  license = {MIT},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monitor_aii-0.1.47.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monitor_aii-0.1.47-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file monitor_aii-0.1.47.tar.gz.

File metadata

  • Download URL: monitor_aii-0.1.47.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for monitor_aii-0.1.47.tar.gz
Algorithm Hash digest
SHA256 e0f1f93305adb6d4a0d91999087987e5d3a32290d94e21fdea9ca7f0a42e7745
MD5 f6909e85cad20ab038d3fc98d79e072f
BLAKE2b-256 4694babae065fb66fbddaf6795f86168a53aa809d556c92c735f1df9a50a225b

See more details on using hashes here.

File details

Details for the file monitor_aii-0.1.47-py3-none-any.whl.

File metadata

  • Download URL: monitor_aii-0.1.47-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for monitor_aii-0.1.47-py3-none-any.whl
Algorithm Hash digest
SHA256 8c3f636c33951ecf318402d96ffcd1541243503b76b4be6d9de9267c6eac6364
MD5 a2114cbe1053fed39942b73c0e0c1990
BLAKE2b-256 25685af03992be481ffdb1c89ddc1dd87dbe2f2defe5a2e48181bd684034c83f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page