Minimalist Machine Learning library
Project description
dlpml
dlpml is a minimalist machine learning library implemented in Python. It provides simple and efficient tools for data analysis and machine learning, including linear regression and logistic regression models.
Features
- Linear Regression
- Logistic Regression
- Regularization
- Gradient Descent Optimization
Installation
To install the required dependencies, use Poetry:
poetry install
Usage (check notebooks)
Linear Regression
import pandas as pd
from dlpml.regression.linear_regressor import LinearRegressor
# Load dataset
data = pd.read_csv("data/ex_linear_regression_data1.csv", header=None)
X_train = data.iloc[:, [0]].to_numpy()
y_train = data.iloc[:, 1].to_numpy()
# Initialize and fit the model
model = LinearRegressor(alpha=0.01, iterations=10000, lambda_=0.01)
model.fit(X_train, y_train)
# Make predictions
y_pred = model.predict(X_train)
Logistic Regression
import pandas as pd
from dlpml.classification.logistic_regressor import LogisticRegressor
# Load dataset
data = pd.read_csv("data/ex_logistic_regression_data1.csv")
X_train = data.iloc[:, 0:2].to_numpy()
y_train = data.iloc[:, 2].to_numpy()
# Initialize and fit the model
model = LogisticRegressor(alpha=0.01, iterations=10000, lambda_=0.01)
model.fit(X_train, y_train)
# Make predictions
y_pred = model.predict(X_train)
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 dlpml-0.1.0.tar.gz.
File metadata
- Download URL: dlpml-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47a0457920d5ba711342e2d987f177310f036e9b5eb5f9ba824bc82e59e6d989
|
|
| MD5 |
eb78d911081a7c1a41d0e7689a893747
|
|
| BLAKE2b-256 |
4e7290560380868350bca8cfde14a1f02254b17d4cd37435bb52041760e6c4d7
|
File details
Details for the file dlpml-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dlpml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
362c2870a625aea8581d32574689a72db59db3d385489144646747261749ed9f
|
|
| MD5 |
ae095113026ede742401a462e9e9213b
|
|
| BLAKE2b-256 |
0ef3abecd26df2f96dc8fe47c93bcff739bd099e453b5e1d07ce69ed5dc21457
|