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.7.tar.gz (3.1 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.7-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: predipy-0.1.7.tar.gz
  • Upload date:
  • Size: 3.1 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.7.tar.gz
Algorithm Hash digest
SHA256 aacc9b300c715d1ebac0d5865e0edbda9920912adccc827c8e6d8ad74bc787c3
MD5 9fe0e7a7f37f3194a5b063a1e5dc1651
BLAKE2b-256 b92808bb6305044b26c5e94b8ca20564f8b166a8154ccddb1381ead17ad83392

See more details on using hashes here.

File details

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

File metadata

  • Download URL: predipy-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7a3160bd6ce13ac5df1d87a5c1c01a842770493f6f5e6965925a67d1a5f66691
MD5 c1eaf183328f941609860d47627f7103
BLAKE2b-256 41bd090cf108cbed30409ddb79e5ffa02f8edc2e328f8a5c4b198c4009a06c88

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