Skip to main content

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:

py -m pip install skklearn

Or install locally from the built wheel:

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):

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
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
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
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
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:

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

Metadata

Release files for skklearn-lab-tools 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 skklearn-lab-tools 0.1.0
File Size Uploaded
skklearn_lab_tools-0.1.0.tar.gz 9.1 kB Details

Built distribution (wheel)

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

Total release size: 18.6 kB

Release files / skklearn_lab_tools-0.1.0.tar.gz

Download URL skklearn_lab_tools-0.1.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
44c7fc525a33144c310958b2f44a1bb835ba00ea36b494517f9af71238dc5251
BLAKE2b-256 checksum
How to use checksums
bc5f0a48b1450d66449900922537173b7ffd47a8260012050f16152045db746d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

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

Download URL skklearn_lab_tools-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f4acfb612870f53fb6d5db7976bf9e3170acb62ade44b8f4d406a70c90cee00
BLAKE2b-256 checksum
How to use checksums
fb08ef04893c96a47918fb69c8c6d2f9c1fe706234ffe2e34e67231f73cf6d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

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