Metadata-Version: 2.4
Name: numlearnl9
Version: 1.0.1
Summary: Machine Learning Lab Practical Kit with 10 classic experiments for students
Home-page: https://github.com/yourusername/numlearnl9
Author: numlearnl9 Team
Author-email: numlearnl9 Team <student@university.edu>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Intended Audience :: Education
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: matplotlib>=3.4.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# numlearnl9 🚀

> **The Ultimate Machine Learning Practical Companion for Students**  
> Designed to help students ace their Machine Learning lab exams and practical coursework with 10 standard, production-grade implementations.

---

## 📌 Practical Experiments List

| Question | Algorithm & Practical Topic | Function Call | Key Visualizations & Outputs |
| :---: | :--- | :--- | :--- |
| **Q1** | **Linear Regression** | `numlearnl9.q1()` | Best-fit regression line, MSE, $R^2$ score, user prediction input |
| **Q2** | **Logistic Regression** | `numlearnl9.q2()` | Sigmoid probability S-curve ($P(y=1)$ vs $z$), decision threshold (0.5) |
| **Q3** | **CART Classification Tree** | `numlearnl9.q3()` | Visual decision tree (`plot_tree`), Confusion Matrix display, Gini index |
| **Q4** | **CART Regression Tree** | `numlearnl9.q4()` | Regression tree, Actual vs Predicted scatter plot, MSE, RMSE, $R^2$ |
| **Q5** | **Bagging Ensemble** | `numlearnl9.q5()` | Accuracy, per-class Precision/Recall/F1, confusion matrix, base estimator tree |
| **Q6** | **PCA Dimensionality Reduction** | `numlearnl9.q6()` | Original vs reduced `.head()`, Scree plot, $\ge 95\%$ variance limit cutoff, 2D scatter |
| **Q7** | **Linear SVM Classification** | `numlearnl9.q7()` | Samples, features, class counts, accuracy bar chart, separating hyperplane |
| **Q8** | **Non-Linear SVM (RBF Kernel)** | `numlearnl9.q8()` | Samples, features, class counts, accuracy bar chart, RBF boundary contour |
| **Q9** | **MST Graph-Based Clustering** | `numlearnl9.q9()` | 3-Panel progression: (1) Big Graph $\to$ (2) Kruskal's MST $\to$ (3) $k$ Segments |
| **Q10** | **DBSCAN Clustering** | `numlearnl9.q10()` | Density clusters, outlier noise detection ($-1$), colorbar scatter |

---

## 💻 Installation

Install directly via `pip`:

```bash
pip install numlearnl9
```

Or install locally in editable mode:

```bash
git clone https://github.com/yourusername/numlearnl9.git
cd numlearnl9
pip install -e .
```

---

## ⚡ Quick Usage

### 1. View Question Index
```python
import numlearnl9

# View the full list of 10 practical questions
numlearnl9.index()
```

### 2. Run Any Practical (Default Standalone)
```python
import numlearnl9

# Runs Question 1 with built-in dataset and plot
numlearnl9.q1()

# Runs Question 9 (Graph-Based Clustering with 3-panel step-by-step MST plot)
numlearnl9.q9()
```

### 3. Run with Step-by-Step Comments & Explanations
```python
# Displays detailed step explanations and enables interactive prediction prompt
numlearnl9.q1(comments=True)
numlearnl9.q2(comments=True)
```

### 4. Run with Custom CSV Dataset (`yourfilename.csv`)
```python
# Run model on custom CSV dataset
numlearnl9.q1(custom=True, csv_path='my_data.csv')
numlearnl9.q3(custom=True, csv_path='my_data.csv')
```

---

## 🌐 Public Server / Terminal `curl` Setup

If you prefer hosting the raw scripts on a public HTTP server for quick download in lab terminals:

```bash
# Fetch the questions index
curl -O https://yourserver.com/ml/index.py

# Download and run clean code (no comments)
curl -O https://yourserver.com/ml/q1.py
python3 q1.py

# Download code with explanatory comments & user input
curl -O https://yourserver.com/mlc/q1.py
python3 q1.py

# Download code ready for custom CSV dataset
curl -O https://yourserver.com/mlcu/q1.py
python3 q1.py
```

### Folder Structure
* `ml/`: Original clean scripts with **no comments** and direct execution.
* `mlc/`: Annotated scripts with **step-by-step comments** and interactive input for Q1 and Q2.
* `mlcu/`: Scripts configured to load **custom CSV** (`yourfilename.csv`).
* `numlearnl9/`: The complete installable Python package.

---

## 🛠️ Publishing to PyPI (For Package Authors)

To publish this package to PyPI so anyone can run `pip install numlearnl9`:

1. Build the distribution wheels:
   ```bash
   pip install build twine
   python -m build
   ```
2. Check the distribution files:
   ```bash
   twine check dist/*
   ```
3. Upload to PyPI (or TestPyPI first):
   ```bash
   # TestPyPI
   twine upload --repository testpypi dist/*

   # Production PyPI
   twine upload dist/*
   ```

---

## 📜 License
MIT License. Free to use for students, educators, and developers worldwide.
