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.1.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.1-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: predipy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5088f564fe4ae808a17584c6f1462566c486628436f1ebc0809c623ca46bd122
MD5 8bd62d9636db00ed9ee174d38fd79e8d
BLAKE2b-256 4f06fcbefab6136b11e3dc35057ab2fc3177d565435880a624f20ac7e91ee81f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: predipy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e474d49a3e37269efc63987d265340e79e43c2e4a545f6b21f431281f650b0c
MD5 93226b213cc7afda92aff00d08105332
BLAKE2b-256 74293714d8a93ee1b5df10c9bfdb158632a8d0c6e4543ba6c758953008c004ac

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