Skip to main content

aimlexp - AIML & Machine Learning Lab Experiments CLI

PyPI version License: MIT Python 3.7+

A fast, lightweight CLI reference tool, runner, and exporter for Machine Learning and AI laboratory practical experiments. Easily view, export, or run clean, self-contained Python programs directly from your terminal using either mlexp or aimlexp.


🚀 Installation

From PyPI:

# Lightweight CLI (zero dependencies)
pip install aimlexp

# Optional: Install with all ML lab libraries (numpy, scikit-learn, etc.)
pip install "aimlexp[lab]"

Local / Editable Mode (for development):

git clone https://github.com/example/aimlexp.git
cd aimlexp
pip install -e .

⚡ Quick Usage

Both mlexp and aimlexp commands are available interchangeably:

1. View Experiment Catalog (--list or -l):

mlexp --list
# or
aimlexp --list

(Running mlexp without arguments also shows the catalog)

2. View Code for Any Experiment:

You can access experiments by number, canonical key, or common aliases:

# By experiment number
mlexp 4
mlexp 04

# By algorithm alias
mlexp knn
mlexp dt
mlexp svm
mlexp nb
mlexp slr
mlexp poly
mlexp kmeans
mlexp pca
mlexp lda
mlexp apriori

3. Save Code Directly to a File (-o / --output):

Save any experiment into a standalone script to work on during lab:

mlexp knn -o knn_lab.py
python knn_lab.py

4. Execute Experiment Immediately (-r / --run):

Run the experiment in Python right from your command line:

mlexp knn -r
mlexp dt --run

5. View Metadata & Overview (-i / --info):

Inspect experiment summary and aliases without printing all code:

mlexp 4 --info

📚 Complete Experiments Catalog

# Title Key Primary Aliases Description
01 Rule-Based COVID Symptom Screening rule_based_covid 1, rule, covid, symptom, expert_system Rule-based symptom checking with conditional logic
02 Dataset Import, Encoding & Outliers dataset_encoding_outliers 2, encoding, outliers, preprocessing, iqr Median imputation, categorical encoding, and IQR outlier clipping
03 Train-Test Split, Scaling & Sampling train_test_scaling_sampling 3, split, scaling, sampling, standard_scaler Train/test partitioning, standard scaling, and row sampling
04 K-Nearest Neighbors (KNN) Classifier knn_classifier 4, knn, k_nearest_neighbors K-Nearest Neighbors (k=5) classifier on scaled Iris data
05 Decision Tree Classifier decision_tree_classifier 5, dt, tree, decision_tree DecisionTreeClassifier with feature threshold rules
06 Support Vector Machine (SVM) Classifier svm_classifier 6, svm, svc, support_vector_machine Linear Support Vector Classifier (SVC) with accuracy score
07 Naive Bayes Classifier naive_bayes_classifier 7, nb, bayes, gaussian_nb Gaussian Naive Bayes probabilistic classification
08 Simple Linear Regression simple_linear_regression 8, slr, linear_regression Single-feature regression with slope, intercept & 2D scatter plot
09 Multiple Linear Regression multiple_linear_regression 9, mlr, multiple_regression Multi-feature price prediction with 3D projection scatter
10 Polynomial Regression polynomial_regression 10, poly, polynomial Degree-2 curved polynomial regression fitting
11 Logistic Regression Classifier logistic_regression 11, logistic, log_reg, logit Multiclass Logistic Regression classification on Iris
12 Association Rule Learning association_rule_learning 12, apriori, association, market_basket Apriori algorithm discovering frequent itemsets, confidence & lift
13 K-Means Clustering kmeans_clustering 13, kmeans, clustering K-Means 2D clustering with marked centroid visualization
14 Hierarchical Clustering hierarchical_clustering 14, hierarchical, agglomerative Agglomerative hierarchical clustering dendrogram/scatter
15 Principal Component Analysis (PCA) principal_component_analysis 15, pca, dimensionality_reduction 4D to 2D feature reduction maximizing variance
16 Linear Discriminant Analysis (LDA) linear_discriminant_analysis 16, lda, discriminant_analysis Supervised dimensionality reduction maximizing class separability

📦 Building and Uploading to PyPI

Step 1: Install Build Tools

pip install --upgrade build twine

Step 2: Build Source Distribution and Wheel

From the repository root directory:

python -m build

This generates:

  • dist/mlexp-0.1.0-py3-none-any.whl
  • dist/mlexp-0.1.0.tar.gz

Step 3: Verify the Package Artifacts

python -m twine check dist/*

Step 4: Upload to PyPI

python -m twine upload --repository testpypi dist/*

Option B: Upload to Production PyPI:

python -m twine upload dist/*

Enter your PyPI API token (__token__ as username and your token as password) when prompted.

Once uploaded, anyone can install and use it immediately:

pip install mlexp
mlexp --list

📄 License

This project is licensed under the MIT License.

Metadata

Release files for aimlexp 0.1.0

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

Source distribution (sdist)

Source distribution for aimlexp 0.1.0
File Size Uploaded Provenance
aimlexp-0.1.0.tar.gz 13.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 25.9 kB

Release files / aimlexp-0.1.0.tar.gz

Download URL aimlexp-0.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4a5ee8684d4f2888200c89b2c3d22185fccda84450b421eec33a2360ea59c417
BLAKE2b-256 checksum
How to use checksums
5a8b505529b59231de396acaadf737a0faea5d9c076f12adf9a8ccce22db4fe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / aimlexp-0.1.0-py3-none-any.whl

Download URL aimlexp-0.1.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd22bae557ff01c929096f75d517c79840d10ccf226e34f19627a9e72d8961b5
BLAKE2b-256 checksum
How to use checksums
28083e9a7d1661c4ebd48a4abfa1677de855c1a30a1b150f31ec4a60279cd175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for aimlexp 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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