Skip to main content

🔥 FlameAI

License PyPI GitHub CI Downloads

Python Deep Learning Toolkit.

Installation

Install the package:

pip install flameai

Update the package:

python3 -m pip install --upgrade pip
pip3 install --upgrade flameai

Example

Evaluate the performance of a binary classification model:

# simple.py
import flameai

y_true = [0, 0, 0, 1, 0, 1, 0, 1, 1, 0]
y_pred = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]

flameai.eval_binary(y_true, y_pred, threshold=0.5)
$ python examples/simple.py
threshold: 0.50000
accuracy: 0.70000
precision: 0.60000
recall: 0.75000
f1_score: 0.66667
auc: 0.70833
cross-entropy loss: 4.03816
True Positive (TP): 3
True Negative (TN): 4
False Positive (FP): 2
False Negative (FN): 1
confusion matrix:
[[4 2]
 [1 3]]

More examples: examples

Test Locally

Create a conda environment:

# Create env
mamba create -n python_3_10 python=3.10

# Activate env
conda activate python_3_10

# Check envs
conda info --envs

# Deactivate env
conda deactivate

# Remove env
conda env remove --name python_3_10

Install the package from source (or local wheel):

# Check if flameai has been installed
pip list | grep flameai

# Install from source
pip install -e .

# Or install from local wheel
# `pip install dist/flameai-[VERSION]-py3-none-any.whl`

# Uninstall
pip uninstall flameai

# Reinstall
pip uninstall flameai -y && pip install -e .

Test:

# Install pytest
pip install pytest

# Run tests
pytest

# Install nox
pip install nox

# Run nox
nox

Lint:

# Install flake8 and flake8-import-order
pip install flake8
pip install flake8-import-order

# Lint
flake8 --import-order-style google

Development

Build:

python3 -m pip install --upgrade build

python3 -m build

Upload:

python3 -m pip install --upgrade twine

twine upload dist/*

Metadata

Release files for flameai 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flameai 1.0.9
File Size Uploaded
flameai-1.0.9.tar.gz 43.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flameai 1.0.9
File Interpreter ABI Platform
flameai-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 59.3 kB

Release files / flameai-1.0.9.tar.gz

Download URL flameai-1.0.9.tar.gz
Size 43.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1e20c3828d978b7a37ef812db037f318bd3dff7698d145c6fdea039fec6f6eb9
BLAKE2b-256 checksum
How to use checksums
9977be23ef4e6e5386625ffb8e5dafeb2bf3dcc905788a9a639b9d76f3a724a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Release files / flameai-1.0.9-py3-none-any.whl

Download URL flameai-1.0.9-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19f912c6f1135354415df3238402110205e66ce6fc50b9b6f006367a8808aa33
BLAKE2b-256 checksum
How to use checksums
9b40959d5d85f8bfb2d4e88e2714da68b145cacac8a5db35b83e91cdd53949bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page