A Collection of Machine Learning Algorithms implemented from Scratch
Project description
Py-modelml
modelml is a collection of machine learning models implemented from scratch. This library provides simple and easy-to-use implementations of various machine learning algorithms, including linear regression, multiple regression, logistic regression, k-nearest neighbors (KNN), decision trees,random forests,XGB classifier and SVM.
Installation
You can install modelml using pip:
pip install modelml
Usage
Here an examples of how to use the models provided by modelml:
Linear Regression
from modelml import LinearRegression
import numpy as np
# Example data
X = np.array([[1], [2], [3], [4]])
y = np.array([2, 4, 6, 8])
# Create and train the model
model = LinearRegression(learning_rate=0.01, epochs=1000)
model.fit(X, y)
# Make predictions
predictions = model.predict(X)
print("Predictions:", predictions)
similarly implement all other algorithms
Algorithms
includes the following machine learning algorithms:
Linear Regression - A basic regression model that fits a linear relationship between independent and dependent variables. Multiple Linear Regression - An extension of linear regression that handles multiple input features. Logistic Regression - A classification algorithm based on the sigmoid function for binary classification problems. K-Nearest Neighbors (KNN) - A non-parametric method used for classification and regression based on distance metrics. Decision Tree - A tree-based model that splits data based on feature importance to make decisions. Random Forest - An ensemble method using multiple decision trees to improve prediction accuracy and reduce overfitting. Support Vector Machine (SVM) - A powerful classification algorithm that finds the optimal hyperplane for separating classes. XGBoost - An optimized gradient boosting algorithm that builds trees sequentially to minimize errors
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contact
For any questions or feedback, please contact Karthikeyan.
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 modelml-0.1.1.tar.gz.
File metadata
- Download URL: modelml-0.1.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20977a7c4c119ff4177545410577421f63ef2f3d6bdbd00c2feb2825edca968f
|
|
| MD5 |
ae667607d2a032347ee1bb8a9ffa022e
|
|
| BLAKE2b-256 |
59f3b61bff5b106763d5ec9f4eb0c3ef519fc39836a0e1e993ffa0850c006503
|
File details
Details for the file modelml-0.1.1-py3-none-any.whl.
File metadata
- Download URL: modelml-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99ca98112d944b7d536e021e9c34546e757a903377bd347f9109d7707b87c2fd
|
|
| MD5 |
b8cf2ae6b99b0ff84a3fedb55e3b08bd
|
|
| BLAKE2b-256 |
07146167f3eb00390d2434ccc19e1458451720723bfa2f2c210a3e41954129f3
|