Public Member Functions | Private Member Functions | Private Attributes | List of all members
learn_lib.anomaly_detector.AnomalyDetector Class Reference
Inheritance diagram for learn_lib.anomaly_detector.AnomalyDetector:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, unsup_models, sup_models)
 
def call_output (self, true_y, pred_y)
 
def classify_supervised (self, dataset_name, in_data, out_label)
 
def classify_unsupervised (self, dataset_name, in_data, out_label)
 
def fit_supervised_models (self, sup_train_x, sup_train_y)
 
def fit_unsupervised_models (self, data_x)
 

Private Member Functions

def __classify (self, model, data)
 
def __fit_supervised (self, data_x, data_y)
 
def __fit_unsupervised (self, data)
 

Private Attributes

 __outputMat
 
 __sup_clfs
 
 __unsup_clfs
 

Detailed Description

Definition at line 22 of file anomaly_detector.py.

Constructor & Destructor Documentation

def learn_lib.anomaly_detector.AnomalyDetector.__init__ (   self,
  unsup_models,
  sup_models 
)

Definition at line 24 of file anomaly_detector.py.

Member Function Documentation

def learn_lib.anomaly_detector.AnomalyDetector.__classify (   self,
  model,
  data 
)
private
        Given a model, prediction is made.

        BUG: Assuming model is used as a binary classifier,
        predictions are turned to 0/1 vs 1/-1

Definition at line 80 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.__fit_supervised (   self,
  data_x,
  data_y 
)
private
        'Private' fit supervised models method
        Iterate through all models

Definition at line 57 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.__fit_unsupervised (   self,
  data 
)
private
        'Private' fit unsupervised models method
        Iterate through all models

Definition at line 34 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.call_output (   self,
  true_y,
  pred_y 
)
        Predictions for multiple classifiers are being
passed, so need to iterate through them.

Definition at line 154 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.classify_supervised (   self,
  dataset_name,
  in_data,
  out_label 
)
        Get predictions for unsupervised models.
        Calls 'private' method with model for predictions.
For the dataset that is passed in, all supervised model
results are compiled.
With the output labels, the output matrix is called.

Definition at line 108 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.classify_unsupervised (   self,
  dataset_name,
  in_data,
  out_label 
)
        Get predictions for unsupervised models.
        Calls 'private' method with model for predictions.
For the dataset that is passed in, all unsupervised model
results are compiled.
With the output labels, the output matrix is called.

Definition at line 131 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.fit_supervised_models (   self,
  sup_train_x,
  sup_train_y 
)
        Unsupervised data is mixed. Labels (y) are passed in.

Definition at line 94 of file anomaly_detector.py.

def learn_lib.anomaly_detector.AnomalyDetector.fit_unsupervised_models (   self,
  data_x 
)
        Supervised data is meant to all be safe. No labels.

Definition at line 101 of file anomaly_detector.py.

Member Data Documentation

learn_lib.anomaly_detector.AnomalyDetector.__outputMat
private

Definition at line 29 of file anomaly_detector.py.

learn_lib.anomaly_detector.AnomalyDetector.__sup_clfs
private

Definition at line 28 of file anomaly_detector.py.

learn_lib.anomaly_detector.AnomalyDetector.__unsup_clfs
private

Definition at line 27 of file anomaly_detector.py.


The documentation for this class was generated from the following file:


mh5_anomaly_detector
Author(s): Vedanth Narayanan
autogenerated on Mon Jun 10 2019 13:49:20