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

Uploaded Python 3

File details

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

File metadata

  • Download URL: predipy-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 5b643ecf60cc76343c0ff4f22d5e543214010364ac938ca2f41cb6743a3a18e6
MD5 6052ce1f102fefb5c5673522ff1b8380
BLAKE2b-256 065b8e05577638240d566e0ad83165bee90300b16bce9ace9c0b01264c8bfa2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: predipy-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 46ab1aa633aeb1f8ba1666453b7f3b7688f1b9d4b88887d9a488b03447c96b63
MD5 913fb55882fd1cbd1f129c5af5c56a4a
BLAKE2b-256 14e8f2bf3c63090f4305cde6d7fd7587be0469447a76d60813817b971987eb2d

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