Coder Social home page Coder Social logo

anmilleriii / multilabel-lsvm Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 380 KB

Linear Support Vector Machine (LVSM) multilabel classifier to identify trends and deficiencies in utility equipment failure mitigation strategies

License: MIT License

Python 100.00%
sklearn nltk multi-label-classification natural-language-processing python numpy pandas seaborn matplotlib sql one-vs-rest tensorflow

multilabel-lsvm's Introduction

Disclaimer

Utility specific information regarding equipment and maintenance programs has been redacted, rendering this view-only.

Purpose

The use case is classification of electric plant (utility) equipment failure mitigation strategies into general categories to identify trends and deficiencies.

Background

This model classifies recods in the free-text 'Mitigation' field of a plant equipment database (71,000 records) into based on 'Mitigation' strategy type. Records are binned into one or multiple of the following classes:

  • maintenance
  • operational
  • physical_barrier
  • design_and_engineering
  • supply_chain
  • unknown

The NLP classifier applies a Linear Support Vector Classification (SVC) algorithm (https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html).

LVSC was selected based on trials using a number of text-classification algorithms, including:

  • Random Forrest
  • Naive Bayes
  • Linear Regression

Moreover, this classifier applies a multi-label, "One vs Rest" (also known as 'binomial classifiication') strategy, which iteratively applies a seperate LVSM classifier for each label.

Classifier Setup

  1. Clone the repository

git clone https://github.com/ANMillerIII/LVSM.git

  1. Initialize and activate vitual environment

py -m venv venv

./venv/Scripts/activate

  1. Install dependencies

py -m pip install requirements.txt -r

  1. Switch to "LVSM" directory

cd LVSM

Run Classifier

To run the 'Mitigation' classifier

py ./1_mitigation/mitigation_model.py

Prediction output will be in the respective 'out' directories

Limitations

  1. 'train_set' data set is used based on naive string matching with some oversight. This should be improved by manually classifying a greater sample of 'Mitigation' fields by hand.
  2. Accuracy is not a meaningful metric for the 'apply_set' data, since the model is used to make predictions (i.e., must spot check manually)
  3. Foreign-language entries are classified with low fidelity due to lack of manual classification.
  4. 'train_set' data (3,569 records) are not classified by NLP, but rather string-matching/manually with inherent biases.

multilabel-lsvm's People

Contributors

anmiller3 avatar anmilleriii avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.