Skip to content

Pframework and Data Processor

Alexander Dmitriev edited this page Mar 16, 2018 · 17 revisions

PFramework

PFramework (pframework.py) is a menu selector that allows to work with multiple models. It relies on the given structure for models:

PModules            root folder for all models

|

model_name          folder dedicated to a model

    |

    model_name      model_name.py file

        |

        model_name  model_name class

Every model should have:

  • A constructor that defines a default parameters passed.
  • set_parameters() function prompting user to change parameters (if needed).
  • call_model() function doing all of the prediction. Should return nparray.
  • get_data_column_name() which returns a name of the column from the Dataframe with testing set you read. To set it, you need to do something like: self.data_column_name = df.columns[1]

PFramework works with a local .csv file as an input: it assumes that you already have a train data in predictor_resources folder.

PFramework allows to perform the error analysis of the model using ErrorAnalysis class. The data can be stored:

  • In a .csv file locally in predictor_resources folder.
  • Could be sent to a InfluxDB (assuming that the connection is up).

Data Processor

data_processor.py works with getting the data you need for running the predictions or adding a new Access Points to InfluxDB (or any other data you need). It can:

  • pull the data from DB to predictor_resources folder as .csv file.
  • send the data from existing .csv file in predictor_resources folder to a specified DB (AccessPoints by default).

Clone this wiki locally