Initializing HIBOU#

Now we can create another file that will get the data from data_reader and give them to hibou. Let’s start with the header:

import data_reader

import numpy as np
import pandas pd
import tensorflow as tf

import hibou
from hibou import filters, nn, stats, utils, config, preprocessing

Once this is done, we can define several constants:

config.OUTPUT_DIR = "my_output_dir"
TRAINING_SIZE = 3 * 336     # 3 weeks
EVALUATION_SIZE = 12 * 336  # 12 weeks
INPUTS_VAR = [
    config.Inputs.TEMPERATURE,
    config.Inputs.WIND_SPEED,
    config.Inputs.U,
    config.Inputs.V,
    config.Inputs.NET_RADIATION
    config.Inputs.DAILY_SIN,
    config.Inputs.DAILY_COS,
]
TARGETS_VAR = [
    config.Targets.H,
    config.Targets.LE
]

hibou.init()  # initialize directory for the output and logs
  • The OUTPUT_DIR is the folder that will contain all the data, from the synchronized data to the graphs exported.

  • TRAINING_SIZE and EVALUATION_SIZE are the sizes of training and evaluation sets.

  • INPUTS_VAR are the inputs variables for the ANN.

  • TARGETS_VAR are the targets variables for the ANN.

Some precisions on the training and evaluation sizes. These parameters describe the way the data will be splitted between training and evaluating data sets.

For instance, if TRAINING_SIZE is on 2 weeks and EVALUATION_SIZE on 6 weeks, the neural network will have two weeks of training then 6 weeks of evaluation and so on until the whole data are splitted:

      ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐
weeks │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│11│12│13│14│15│16│
      └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
      └─────┘━━━━━━━━━━━━━━━━━└─────┘━━━━━━━━━━━━━━━━━
      │train│   evaluation    │train│   evaluation    │