EDAspy.timeseries package
Submodules
EDAspy.timeseries.TS_transformations module
- class EDAspy.timeseries.TS_transformations.TSTransformations(data)[source]
Bases:
object
Tool to calculate time series transformations. Some time series transformations are given. This is just a very simple tool. It is not mandatory to use this tool to use the time series transformations selector. It is only disposed to be handy.
- data = -1
- de_trending(variable, plot=False)[source]
Removes the trend of the time series.
- Parameters:
variable (string) – string available in data DataFrame
plot (bool) – if True plot is give, if False, not
- Returns:
time series detrended
- Return type:
list
- log(variable, plot=False)[source]
Calculate the logarithm of the time series.
- Parameters:
variable (string) – name of variables
plot (bool) – if True a plot is given.
- Returns:
time series transformation
- Return type:
list
- box_cox(variable, lmbda, plot=False)[source]
Calculate Box Cox time series transformation.
- Parameters:
variable (string) – name of variable
lmbda (float) – lambda parameter of Box Cox transformation
plot (bool) – if True, plot is given.ç
- Returns:
time series transformation
- Return type:
list
- smoothing(variable, window, plot=False)[source]
Calculate time series smoothing transformation.
- Parameters:
variable (string) – name of variable
window (int) – number of previous instances taken to smooth.
plot (bool) – if True, plot is given
- Returns:
time series transformation
- Return type:
list
EDAspy.timeseries.TransformationsFeatureSelection module
- class EDAspy.timeseries.TransformationsFeatureSelection.TransformationsFSEDA(max_it, dead_it, size_gen, alpha, vector, array_transformations, cost_function)[source]
Bases:
object
Estimation of Distribution Algorithm that uses a Dirichlet distribution to select among the different time series transformations that best improve the cost function to optimize.
…
Attributes:
- generation: pandas DataFrame
Last generation of the algorithm.
- best_MAE: float
Best cost found.
- best_ind: pandas DataFrame
First row of the pandas DataFrame. Can be casted to dictionary.
- history_best: list
List of the costs found during runtime.
- size_gen: int
Parameter set by user. Number of the individuals in each generation.
- max_it: int
Parameter set by user. Maximum number of iterations of the algorithm.
- dead_it: int
Parameter set by user. Number of iterations after which, if no improvement reached, the algorithm finishes.
- vector: pandas DataFrame
When initialized, parameters set by the user. When finished, statistics learned by the user.
- cost_function:
Set by user. Cost function set to optimize.
- generation = Empty DataFrame Columns: [] Index: []
- output_plot = ''
- historic_best = []
- best_MAE = 99999999999
- best_ind = ''
- check_generation()[source]
Check the cost of each individual of the generation in the cost function