Skip to main content

OPI Solutions Python package for Predictive Maintenance

Project description

opi-logo

OPI Solutions: Predictive Maintenance

About

How to install

pip install --upgrade pip

pip install opipy-pm==0.1.3

Examples

Binary Classifier Training

# Import classifier from Models package
from opipy_pm.Models.nn.Torch.Classifier import BinaryClassifier
from opipy_pm.Models.nn.Torch.Classifier import training_loop, data_loader
from opipy_pm.Models.nn.Torch.Classifier import pos_class_weight, data_splitter

pos_weight = pos_class_weight(df=df, target="machine_failure")
pred_cols: list[str] = ["torque", "tool_wear"]
Xtrain, Ytrain, Xval, Yval = data_splitter(df=df,
                                           pred_cols=pred_cols,
                                           test_size=0.2,
                                           holdout=True
                                           )

# instantiate the binary classification class
dim: int = len(pred_cols)
model_clf = BinaryClassifier(in_dim=dim)
model_clf._init_weights_()

train_loader, val_loader = data_loader(Xtrain, Ytrain, Xval, Yval)
epochs: int = 100
training_loop(model_clf, train_loader, val_loader, pos_weight, epochs)

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

opipy_pm-0.1.3.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

opipy_pm-0.1.3-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opipy_pm-0.1.3.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for opipy_pm-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6ce1a8cfee56198357c3d09c9eb8dffb4878eb15e5c18a2f08aa83622ad6602e
MD5 fed1e6b75ba4359aa45b131effac830c
BLAKE2b-256 d00ed382b1d3021370504dd04796013fa3547939267b3a04d6ff739e3b731e3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opipy_pm-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for opipy_pm-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5cb87e605419aebd3bc650be69d8e747a3b5b128859eab0c45a3235d76ec9e90
MD5 498bd1deabacf19424d6448105c65685
BLAKE2b-256 61e9704fbb56a609f73610aefec1ef7c0a795623af11797fe6af4dfed0a086bf

See more details on using hashes here.

Supported by

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