Skip to main content

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


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.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

predipy-0.1.0-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file predipy-0.1.0.tar.gz.

File metadata

  • Download URL: predipy-0.1.0.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

Hashes for predipy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91998d602864a4ea6166401e77434de5f5994f234ed00e42c153d0a87f7f1a02
MD5 3214676843a2f28947d45b61abead654
BLAKE2b-256 2a4bc9e0519a251ee5efdf691b31bceebd69276099e7aeca38831fe9438dc28f

See more details on using hashes here.

File details

Details for the file predipy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: predipy-0.1.0-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

Hashes for predipy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e789be138f1d37071ba311713b37c359b573036cbee6bacf79c77d671263e176
MD5 3bbbd57cb214f7265926c0f735ccf719
BLAKE2b-256 896bf9798fc57ae75aa2457f671581c28a85a24cfb4d763fcfda1b3a6b9fd84c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page