Metadata-Version: 2.4
Name: skklearn-lab-tools
Version: 0.1.0
Summary: An educational collection of ten Python machine learning and data analysis programmes.
Author: Sriram
License-Expression: MIT
Keywords: machine-learning,education,syllabus,data-analysis,skklearn
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: scikit-learn
Requires-Dist: matplotlib
Requires-Dist: seaborn
Requires-Dist: scipy
Requires-Dist: statsmodels
Dynamic: license-file

# skklearn

An educational source-code library of ten Python machine learning and data analysis syllabus programmes.

> **Disclaimer:** `skklearn` is an independent educational package and is **not affiliated with or endorsed by scikit-learn**.

---

## 🎯 Purpose

`skklearn` allows students and lab instructors to install the package, view the exact original source code of any syllabus programme directly in Python IDLE or the terminal, and copy it into a new `.py` file to work with in the lab.

**Key Design Principles:**
- **Source Code Library**: Designed to display and copy unmodified source code, not automatically execute it.
- **Zero Bundled Datasets**: No CSV files or datasets are included in the package.
- **Exact Code Preservation**: All 10 original programmes are preserved byte-for-byte with their original variable names, logic, and file paths.

---

## 💻 Installation

Install `skklearn` using `pip`:

```bash
py -m pip install skklearn
```

Or install locally from the built wheel:

```bash
py -m pip install dist/skklearn-0.1.0-py3-none-any.whl
```

---

## 🚀 How to Use in the College Lab / Python IDLE

### Step 1: Open Python IDLE or Interactive Shell

Import `skklearn` and call `show_code(program_number)`:

```python
import skklearn

# Display Programme 1 (Find-S Algorithm)
skklearn.show_code(1)
```

The exact source code will print directly in your IDLE Shell.

### Step 2: Copy Code into a New File
1. In Python IDLE, highlight and copy the printed code.
2. Select **File > New File** (`Ctrl + N`).
3. Paste the code into your new editor window.
4. Save the file (e.g., `lab_prog1.py`).

### Step 3: Set Up Required Datasets (If Applicable)
For programmes that use external CSV files, create the dataset at the path hardcoded in the original syllabus programme (see table below).

### Step 4: Run the Programme
Press **F5** (or **Run > Run Module**) in IDLE to execute your script.

---

## 📋 Syllabus Programmes & Dataset Requirements

| Programme Number | Algorithm / Title | External CSV Required? | Expected Path & Format |
| :---: | :--- | :---: | :--- |
| `1` | **Find-S Algorithm** | **Yes** | Path: `E:/sriram intern/sampledataset.csv`<br>Format: CSV with header. Categorical string attributes in `iloc[:, :-1]`, target concept in `iloc[:, -1]` with `'yes'`/`'no'`. |
| `2` | **Candidate Elimination** | **Yes** | Path: `E:/sriram intern/sampledataset.csv`<br>Format: Shared with Programme 1. |
| `3` | **Decision Tree Classifier** | No | Uses built-in `sklearn.datasets.load_iris`. |
| `4` | **Multi-Layer Perceptron (MLP)** | No | Uses built-in `sklearn.datasets.load_iris`. |
| `5` | **Gaussian Naïve Bayes** | **Yes** | Path: `E:/sriram intern/datasot_5.csv`<br>Format: CSV with header. Column 0 ignored. Numeric feature columns in `iloc[:, 1:-1]`, binary target in `iloc[:, -1]`. |
| `6` | **Text Classification / Spam** | **Yes** | Path: `E:\sriram intern\downloadsss\prg6new.csv`<br>Format: CSV with header columns `text` (message string) and `label` (categories including `'spam'` and `'ham'`). |
| `7` | **t-test & One-Way ANOVA** | No | Uses built-in `seaborn.load_dataset('iris')`. |
| `8` | **Backpropagation Network** | No | Uses built-in `sklearn.datasets.load_iris`. |
| `9` | **k-Nearest Neighbors (k-NN)** | No | Uses built-in `sklearn.datasets.load_iris`. |
| `10` | **Simple Linear Regression** | No | Uses built-in `sklearn.datasets.load_diabetes`. |

---

## 🛡️ Error Handling

Passing an invalid programme number (outside the range 1 to 10) raises a clear `ValueError`:

```python
skklearn.show_code(15)
# ValueError: Invalid programme number '15'. Please choose a number from 1 to 10.
```

---

## 📦 Dependencies

The package declares the third-party libraries needed when you run the copied syllabus programmes:
- `pandas`
- `numpy`
- `scikit-learn`
- `matplotlib`
- `seaborn`
- `scipy`
- `statsmodels`
