Skip to main content

AIM-CU: A CUSUM-based tool for AI Monitoring

Project description

Monitoring a clinically deployed AI device to detect performance drift is an essential step to ensure the safety and effectiveness of AI.

AIM-CU is a statistical tool for AI monitoring based on a cumulative sum (AIM-CU) approach.

AIM-CU computes:

  • The parameter choices for change-point detection based on an acceptable false alarm rate

  • Detection delay estimates for a given displacement of the performance metric from the target for those parameter choices.

System setup

Make sure R is installed in the system. There is no specific version that this relies on. Here we have used the version 4.1.2 (2021-11-01). Instructions for Linux (the below setup is only performed in Linux):

wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc |  tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
apt-get install -y --no-install-recommends r-base r-base-dev

# setup R configs
echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
Rscript -e "install.packages('ggplot2')"
Rscript -e "install.packages('hexbin')"
Rscript -e "install.packages('lazyeval')"
Rscript -e "install.packages('cusumcharter')"
Rscript -e "install.packages('RcppCNPy')"
Rscript -e "install.packages('spc')"

Code execution

Clone AIM-CU repository.

git clone https://github.com/DIDSR/AIM-CU.git

Run the following commands to install required dependencies (Python = 3.10 is used).

apt-get -y install python3
apt-get -y install pip
cd AIM-CU
pip install -r requirements.txt

Run AIM-CU.

cd src/package
python3 app.py

Open the URL http://0.0.0.0:7860 that is running the AIM-CU locally.

Example code execution

Example code can be run through Jupyter Notebook. Do this by entering the jupyter notebook command from the /src/package/ directory. The tool is designed to be used through a GUI, not from the console.

Demo

AIM-CU can also be run through the demo available at https://huggingface.co/spaces/didsr/AIM-CU. If Space is paused, click on Restart button. Note: this Space uses a custom Docker container; build may break due to latest package updates pulled by HuggingFace.

Disclaimer

About the Catalog of Regulatory Science Tools

The enclosed tool is in preparation for the Catalog of Regulatory Science Tools. Note that this software is not (yet) a standalone RST but rather is to be included as a reference tool to support other Regulatory Science Tools (such as synthetic datasets) for reproducibility.

This catalog collates a variety of regulatory science tools that the FDA’s Center for Devices and Radiological Health’s (CDRH) Office of Science and Engineering Labs (OSEL) developed. These tools use the most innovative science to support medical device development and patient access to safe and effective medical devices. If you are considering using a tool from this catalog in your marketing submissions, note that these tools have not been qualified as Medical Device Development Tools and the FDA has not evaluated the suitability of these tools within any specific context of use. You may request feedback or meetings for medical device submissions as part of the Q-Submission Program.

For more information about the Catalog of Regulatory Science Tools, email RST_CDRH@fda.hhs.gov.

Project details


Download files

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

Source Distribution

aim_cu-0.2.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

aim_cu-0.2.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file aim_cu-0.2.1.tar.gz.

File metadata

  • Download URL: aim_cu-0.2.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for aim_cu-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fd94a63bffca823b9a09ae0c2d04a3a5a6c1970bf3a9a50518e07f288373ae07
MD5 7a30df79185bd6f449c30337c5064adc
BLAKE2b-256 34fe27c4ac320d22f3ad9a4e239d717846263f7a760839967f5fc09e9f6df67d

See more details on using hashes here.

File details

Details for the file aim_cu-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: aim_cu-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for aim_cu-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02d2450529bc7fa7e070a32773543369e81c4a18da6f940479043d8688875cba
MD5 9b4f0b07718d934c472f6876d6d38382
BLAKE2b-256 43d82ae7549c8d282972c3aad01e2347e6260c76eef2b3f60b3d4c3af58d1278

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 Pingdom Monitoring Sentry Error logging StatusPage Status page