A lightweight machine learning library with educational implementations built from scratch.
Project description
DolphinBoost
DolphinBoost is a lightweight machine learning library built from scratch in Python for learning and understanding core machine learning algorithms.
The goal of DolphinBoost is to provide clean, readable implementations that help students and developers understand how machine learning models work internally.
Features
- Simple Linear Regression
- NumPy-based implementation
- Minimal dependencies
- Educational and beginner-friendly
- Easy-to-read source code
Installation
pip install dolphinboost
Quick Start
from dolphinboost import SimpleLinearRegression
X = [1, 2, 3, 4, 5]
y = [2, 4, 5, 4, 5]
model = SimpleLinearRegression()
model.fit(X, y)
print("Coefficient:", model.coef_)
print("Intercept:", model.intercept_)
predictions = model.predict([6, 7, 8])
print(predictions)
Example
import pandas as pd
from sklearn.model_selection import train_test_split
from dolphinboost import SimpleLinearRegression
df = pd.read_csv("Salary_dataset.csv")
X = df["YearsExperience"]
y = df["Salary"]
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42
)
model = SimpleLinearRegression()
model.fit(X_train, y_train)
predictions = model.predict(X_test)
print(predictions)
API
SimpleLinearRegression
fit(X, y)
Train the model using the least-squares method.
predict(X)
Predict target values.
Attributes
| Attribute | Description |
|---|---|
| coef_ | Slope of the regression line |
| intercept_ | Intercept of the regression line |
| beta_ | Full parameter vector |
| X_mean_ | Mean of input values |
| y_mean_ | Mean of target values |
Mathematical Foundation
Slope:
β₁ = Σ[(x - x̄)(y - ȳ)] / Σ[(x - x̄)²]
Intercept:
β₀ = ȳ − β₁x̄
Prediction:
y = β₀ + β₁x
Roadmap
Upcoming algorithms:
- Multiple Linear Regression
- Logistic Regression
- Metrics (MSE, MAE, R²)
- And Others
Why DolphinBoost?
- Learn machine learning by reading code.
- Lightweight and easy to understand.
- Built for students and educational purposes.
- No hidden abstractions.
License
MIT License
Author
Peddakotla Karthikeya
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dolphinboost-0.1.0.tar.gz.
File metadata
- Download URL: dolphinboost-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aacb4f7aacb0387bb3362cae82f86356ec5faa05247d1aa41fbf057d1739501
|
|
| MD5 |
9705dc7dcdae9971e704a2167b5f4c2b
|
|
| BLAKE2b-256 |
1d6562496987de114bbdb9949b13d9535e290fff1129da529d0d94252674759d
|
File details
Details for the file dolphinboost-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dolphinboost-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
598b27b0f0e690e14b8ca068e3eeaaad0859b89d97dac69aaea1d740b140bfc9
|
|
| MD5 |
8d5f8f205a293ddef12bfb463d549aa1
|
|
| BLAKE2b-256 |
7c6b5a1e4f9d6bc1f7f82354379a1e79706c4e707ae220d0ca4935e805fa1c55
|