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.4.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.4.tar.gz.
File metadata
- Download URL: predipy-0.1.4.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 |
1f50b44dbd96bd74ab776f7623e894726814c1935ec1e47108b974ae77f41cd1
|
|
| MD5 |
3eda5a82548ca1fa4addd26ae918598a
|
|
| BLAKE2b-256 |
62b8e579bcbf17d93484f30529b0de875b31c5f344404e13d2280d465351f51f
|
File details
Details for the file predipy-0.1.4-py3-none-any.whl.
File metadata
- Download URL: predipy-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.1 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 |
cfaffcc511ea028ba5ce0021cd2f955be695941e42a64bbcac26380f8c991263
|
|
| MD5 |
1f9d93db822ab43de7187a02c583369c
|
|
| BLAKE2b-256 |
93f67cfd4ec8ce0711947a7fe1df5d27e18b5fc446092cfad53b56f278666b0a
|