Metadata-Version: 2.4
Name: aimlexp
Version: 0.1.0
Summary: Quick CLI reference, runner, and exporter for AIML and Machine Learning lab experiments
Author-email: AIML Student <student@example.com>
License-Expression: MIT
Keywords: aiml,machine-learning,ai,lab-experiments,cli,scikit-learn,reference
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: lab
Requires-Dist: numpy; extra == "lab"
Requires-Dist: pandas; extra == "lab"
Requires-Dist: scikit-learn; extra == "lab"
Requires-Dist: matplotlib; extra == "lab"
Requires-Dist: mlxtend; extra == "lab"
Dynamic: license-file

# aimlexp - AIML & Machine Learning Lab Experiments CLI

[![PyPI version](https://img.shields.io/pypi/v/aimlexp.svg)](https://pypi.org/project/aimlexp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)

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:
```bash
# 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):
```bash
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`):
```bash
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**:
```bash
# 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:
```bash
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:
```bash
mlexp knn -r
mlexp dt --run
```

### 5. View Metadata & Overview (`-i` / `--info`):
Inspect experiment summary and aliases without printing all code:
```bash
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
```bash
pip install --upgrade build twine
```

### Step 2: Build Source Distribution and Wheel
From the repository root directory:
```bash
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
```bash
python -m twine check dist/*
```

### Step 4: Upload to PyPI

#### Option A: Test on TestPyPI first (Recommended):
```bash
python -m twine upload --repository testpypi dist/*
```

#### Option B: Upload to Production PyPI:
```bash
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:
```bash
pip install mlexp
mlexp --list
```

---

## 📄 License
This project is licensed under the [MIT License](LICENSE).
