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.6.tar.gz
(3.0 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.6.tar.gz.
File metadata
- Download URL: predipy-0.1.6.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a73ea5877fb219cce08db1579cf881c2d4413c6a668a3eb6ec8baa08e1ff070
|
|
| MD5 |
0bcb79ea9b4b00ca4b11ef00048bc5f7
|
|
| BLAKE2b-256 |
c9656b51677fb370d03c0cdb0f637d8f630966b6e74408075bf8679c0c4fe8c5
|
File details
Details for the file predipy-0.1.6-py3-none-any.whl.
File metadata
- Download URL: predipy-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.6 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 |
3268f96cce143b23eb8617b587ea21c65920ff56e4dfd4cafed8138303765e48
|
|
| MD5 |
0e4d7d1465ba1bda75506e1fe4bb737e
|
|
| BLAKE2b-256 |
adb7d8952ee60548243ac21d352fc3236dcc5b9382195bb29ed645cd7a706038
|