Skip to main content

A collection of 10 educational Machine Learning experiments for learning and demonstration.

Project description

🤖 MLCode Library

A professional, modular Python library designed for educational machine learning demonstrations. This package contains 10 structured experiments covering various core ML algorithms and Python concepts, complete with an interactive command-line interface to inspect source code and execute models dynamically.


✨ Features

  • 🎓 Interactive Learning: Instantly view the source code of any experiment with a single call (ip.exp1()).
  • 🚀 Dynamic Execution: Run any machine learning experiment and view its plots/outputs instantly (ip.run1()).
  • 📂 Clean Module Layout: Designed using standard Python packaging best practices with automatic dependency discovery.
  • ⚡ Hot Reloading: Easily install in editable mode for developers.

📦 Installation

1. Local Development (Editable Mode)

To install the package locally so that any updates to the experiment files are immediately available:

cd "c:\Users\Himeshwar\Desktop\mlcodes\mlcode"
pip install -e .

2. Standard Global Installation

To install the package permanently on your machine:

pip install .

🛠️ Usage

Open a Jupyter Notebook, a VS Code Interactive Window, or a standard Python terminal and run:

import mlcode as ip

# 1. List all available experiments
ip.show()

# 2. View the source code of Experiment 1
ip.exp1()

# 3. Dynamically run Experiment 1 and show the plot
ip.run1()

📚 Educational Experiments Included

Here are the 10 experiments included in this library and what they demonstrate:

Experiment Focus Area / Algorithm Description Python Concept Shown
exp1 📈 Linear Regression Univariate salary prediction model. Basic Arithmetic & Imports
exp2 🛢️ LSM Regression Fuel consumption least squares prediction model. String Manipulation
exp3 🤖 Machine Learning Basic model training loops and data iteration. Loops
exp4 ⚖️ Conditionals Data thresholding and model routing logic. If-Else Conditions
exp5 🧱 Modular ML Function-wrapped model training pipeline. Functions
exp6 🌳 Decision Trees Classification and tree plotting on a custom dataset. Lists
exp7 🌀 Dimensionality Reduction Principal Component Analysis (PCA) visualization. Dictionaries
exp8 🛡️ Robust Pipelines Safe training wrapper with input error validation. Error Handling
exp9 🏷️ KMeans Clustering Unsupervised K-Means clustering algorithm. List Comprehensions
exp10 🏗️ Class-based ML Object-Oriented Random Forest / Classifier. Basic Classes

🚀 Publishing Globally

1. Build Package Distributions

Build the standard Wheel (.whl) and Source Archive (.tar.gz):

pip install build
python -m build

2. Upload to PyPI (Python Package Index)

Publish the compiled build artifacts so anyone in the world can run pip install mlcode:

pip install twine
python -m twine upload dist/*

(Note: If the name mlcode is already taken on PyPI, rename the name field in setup.py to something unique like mlcode-himeshwar and rebuild!)


📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlcode-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlcode-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file mlcode-0.1.0.tar.gz.

File metadata

  • Download URL: mlcode-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for mlcode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 097c6ad9cd0d152f04e2f32825038f9f2434ffc4fe0bc3d9591f221531f64c4e
MD5 68c52fdfbbefe8751ed29df2d0f582bb
BLAKE2b-256 0b2648b6da1eaf4902b24d90c42c128988b8d5926cdf706fd7adb059cb31ae8c

See more details on using hashes here.

File details

Details for the file mlcode-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mlcode-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for mlcode-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c550427f9a1394b3fd96136d39446e5b41ed66156bd61f51b8fe4b0617194e99
MD5 efc45d9dd04f57594edcb5ccef54f867
BLAKE2b-256 4c6a75a7b76ee0d12081506fa2dcf5af73b2abb565aba981c540ac5be6e4fc83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page