Lightweight Python library for prediction & regression
Project description
PrediPy
PrediPy adalah library Python ringan untuk prediksi & regresi. Mendukung:
- Linear Regression
- Logistic Regression
- Mini MLP (1 hidden layer)
- Vectorized NumPy (paralel otomatis)
Instalasi
Setelah upload ke PyPI, bisa langsung install:
pip install predipy
# example
from predipy import LinearRegression, LogisticRegression, MLP, mse, accuracy
# ===== Linear Regression =====
X = [[1],[2],[3]]
y = [2,4,6]
lr = LinearRegression()
lr.fit(X, y)
print("Linear Regression Predict:", lr.predict([[4]]))
# ===== Logistic Regression =====
X_cls = [[0],[1],[2],[3],[4]]
y_cls = [0,0,0,1,1]
log_model = LogisticRegression(lr=0.1, epochs=1000)
log_model.fit(X_cls, y_cls)
print("Logistic Regression Predict:", log_model.predict([[1],[2],[3]]))
# ===== MLP (Regression) =====
X_mlp = [[0],[1],[2],[3],[4],[5]]
y_mlp = [[0],[2],[4],[6],[8],[10]]
mlp_model = MLP(input_size=1, hidden_size=5, output_size=1, lr=0.01, epochs=2000)
mlp_model.fit(X_mlp, y_mlp)
print("MLP Predict:", mlp_model.predict([[6],[7]]))
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
predipy-0.1.5.tar.gz
(2.8 kB
view details)
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 predipy-0.1.5.tar.gz.
File metadata
- Download URL: predipy-0.1.5.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ea711043618c772cad014603c8e2da6260e4beb595c78aeb05868f8fc740df2
|
|
| MD5 |
2f556bedb73096f781453c96a3c2e65d
|
|
| BLAKE2b-256 |
0936387b413a9fd03919d6f28408c43495a9d9e4190476d61a23b579a8f79106
|
File details
Details for the file predipy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: predipy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d62c5b65989c078eeaee4941b95bea994e8e02da50546bba45bcd6c44f509f0a
|
|
| MD5 |
452d2d3bb44ff76acc06ff95c4d3959c
|
|
| BLAKE2b-256 |
b57978bf10293dccdf58e1358f5688a3f90bfed763fee41ec6fc7f0b6c3783fb
|