Project.Prediction Module

In this part we are going to document a half part of the Project wiches the Prediction or three sources of energy:

class Project.Prediction.ClassModel.Dos(data, energy, year, month, day)[source]

Bases: object

Class Dos is a class that could daily predect and plot three sources of three sources of enrergy: Electricity Consumption, Gaz and Nuclear.

Parameters
  • data (Dataframe) – This is the data training, it is the output of Data Collection.

  • energy (int) – This model predict three sources of energy: Electricity Consumption, Gaz and Nuclear. 0 : Electricity Consumption 1 : Gaz 2: Nuclear

  • Year (int) – The Year for which day we want to predict.

  • month (int) – The month for which day we want to predict.

  • day (int) – The day for which day we want to predict.

createFeatures()[source]

Create time series features based on time series index.

fitModel()[source]

Automatic process that makes sure our machine learning models have high level of accuracy. The Model name is Boosted Trees for more information please see this referance

DayPred(reg)[source]

Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane.

Parameters

reg – this is the output of fitModel .

plot(day_pred, DayDate)[source]

This method plot daily energy predection indexing by Time