Oracle Guardian AI Open Source Project
Oracle Guardian AI Open Source Project is a library consisting of tools to assess fairness/bias and privacy of machine learning models and data sets. This package contains fairness and privacy_estimation modules.
The Fairness module offers tools to help you diagnose and understand the unintended bias present in your dataset and model so that you can make steps towards more inclusive and fair applications of machine learning.
The Privacy Estimation module helps estimate potential leakage of sensitive information in the training data through attacks on Machine Learning (ML) models. The main idea is to carry out Membership Inference Attacks on a given target model trained on a given sensitive dataset, and measure their success to estimate the risk of leakage.
Installation
You have various options when installing oracle-guardian-ai.
Installing the oracle-guardian-ai base package
python3 -m pip install oracle-guardian-ai
Installing extras libraries
The all-optional module will install all optional dependencies. Note the single quotes around installation of extra libraries.
python3 -m pip install 'oracle-guardian-ai[all-optional]'
To work with fairness/bias, install the fairness module. You can find extra dependencies in requirements-fairness.txt.
python3 -m pip install 'oracle-guardian-ai[fairness]'
To work with privacy estimation, install the privacy module. You can find extra dependencies in requirements-privacy.txt.
python3 -m pip install 'oracle-guardian-ai[privacy]'
Documentation
- Oracle Guardian AI Documentation
- OCI Data Science and AI services Examples
- Oracle AI & Data Science Blog
Examples
Measurement with a Fairness Metric
from guardian_ai.fairness.metrics import ModelStatisticalParityScorer
fairness_score = ModelStatisticalParityScorer(protected_attributes='<target_attribute>')
Bias Mitigation
from guardian_ai.fairness.bias_mitigation import ModelBiasMitigator
bias_mitigated_model = ModelBiasMitigator(
model,
protected_attribute_names='<target_attribute>',
fairness_metric="statistical_parity",
accuracy_metric="balanced_accuracy",
)
bias_mitigated_model.fit(X_val, y_val)
bias_mitigated_model.predict(X_test)
Contributing
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Find Getting Started instructions for developers in README-development.md.
Security
Consult the security guide SECURITY.md for our responsible security vulnerability disclosure process.
License
Copyright (c) 2023 Oracle and/or its affiliates. Licensed under the Universal Permissive License v1.0.
Metadata
Release files for oracle-guardian-ai 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oracle_guardian_ai-1.3.0.tar.gz | 60.5 kB | Without provenance | Details for oracle_guardian_ai-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oracle_guardian_ai-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for oracle_guardian_ai-1.3.0-py3-none-any.whl |
Total release size: 145.8 kB
Release files / oracle_guardian_ai-1.3.0.tar.gz
| Download URL | oracle_guardian_ai-1.3.0.tar.gz |
|---|---|
| Size | 60.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae98543108432ec3242cb4e3b8170e48027d0d2455ed3441163412d8cd4fc231
|
|
BLAKE2b-256 checksum How to use checksums |
ff4c5f05d88144eae3891391eef77d4d86affbfc29fcc1a998e13e6c7a69c292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / oracle_guardian_ai-1.3.0-py3-none-any.whl
| Download URL | oracle_guardian_ai-1.3.0-py3-none-any.whl |
|---|---|
| Size | 85.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a277c136773d0b57d85f56b1b11540938d3a26a3519fd4ab658a8aa609297553
|
|
BLAKE2b-256 checksum How to use checksums |
8d6950691ecef4c6da7036d53535601e51c8a97fd20b2b80d2709c89bda2367f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Security for oracle-guardian-ai 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.