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.2.tar.gz
(1.7 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.2.tar.gz.
File metadata
- Download URL: predipy-0.1.2.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47ee6216334a589cb007f0e0fe3ffffa5dde4056f85c4f1f21bdae367417f11d
|
|
| MD5 |
d4474366fb39f7e8b6c9289711e66c4f
|
|
| BLAKE2b-256 |
3ea87ffe97e26c51c42482c605b3ddaae6f4734e88de473f8f1ea3619ff0e3a2
|
File details
Details for the file predipy-0.1.2-py3-none-any.whl.
File metadata
- Download URL: predipy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 1.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 |
9f57f2971ffcca6f998697db2f91c492a66c014a517b1840f7a6549a83d78e59
|
|
| MD5 |
fe35116339afc8fac685629c842f30e0
|
|
| BLAKE2b-256 |
6ba9c69446f465159d32bdd045cf4d4052799a662d6cac237ad02cf413dcaaa1
|