def _add_transform_genes(self):
     '''Sets up for evolution of the regularized vector AR model.'''    
     self._alleles.add(pu.make_int_gene(1, 1, 8*24, 5))
     self._alleles.add(pu.make_int_gene(1, 0, 8*24, 5))
     self._add_lambda_gene()
     self._loci_list += ['AR_order']
     self._loci_list += ['EXO_order']
     self._loci_list += ['lambda_cont']
 def _add_transform_genes(self):
     '''Sets up for evolution of the regularized vector AR model.'''
     self._alleles.add(pu.make_int_gene(1, 1, 8 * 24, 5))
     self._alleles.add(pu.make_int_gene(1, 0, 8 * 24, 5))
     self._add_lambda_gene()
     self._loci_list += ['AR_order']
     self._loci_list += ['EXO_order']
     self._loci_list += ['lambda_cont']
 def _add_transform_genes(self):
     """Sets up for evolution of a seasonal ARIMA model."""
     self._alleles.add(pu.make_int_gene(1, 1, 10, 1)) # 'AR' backshift (p)
     self._alleles.add(pu.make_choice_gene(1, [0, 1, 2])) # 'I' backshift (d) 
     self._alleles.add(pu.make_choice_gene(1, [1, 2, 3])) # 'MA' backshift (q)
     self._alleles.add(pu.make_int_gene(1, 1, 10, 1)) # Seasonal 'AR' backshift (p)
     self._alleles.add(pu.make_choice_gene(1, [0, 1, 2])) # Seasonal 'I' backshift (d) 
     self._alleles.add(pu.make_choice_gene(1, [1, 2, 3])) # Seasonal 'MA' backshift (q)
     self._loci_list += ['AR_order', 'I_order', 'MA_order',
                        'ssn_AR_order', 'ssn_I_order', 'ssn_MA_order']
 def _add_transform_genes(self):
     """This is where the models are defined. The models are passed to the
     GA engine for evolution of the optimal set of parameters. Afterwards,
     the models are tested, and performance is measured."""
     self._alleles.add(pu.make_int_gene(1, 1, 10, 1)) # Scale
     self._alleles.add(pu.make_choice_gene(1, [2])) # Aj, in the paper 2 gives best results.
     self._loci_list += ['scale', 'Aj']
Esempio n. 5
0
 def _add_transform_genes(self):
     """This is where the models are defined. The models are passed to the
     GA engine for evolution of the optimal set of parameters. Afterwards,
     the models are tested, and performance is measured."""
     self._alleles.add(pu.make_int_gene(1, 1, 10, 1))  # Scale
     self._alleles.add(pu.make_choice_gene(
         1, [2]))  # Aj, in the paper 2 gives best results.
     self._loci_list += ['scale', 'Aj']
 def _add_transform_genes(self):
     self._alleles.add(pu.make_int_gene(1, 2, 11, 1)) # Dimension
     # self._alleles.add(pu.make_real_gene(1, 0, 1, 0.05)) # Weight
     # self._alleles.add(pu.make_int_gene(1, 1024, 2048, 50)) # Boolean mask
     self._loci_list += ['dimension'] #, 'weight', 'mask', 
     if not self._options.no_cleaning:
         #wavelet.set_local_cleaning_func(self._get_cleansing_function(options), model)
         raise NotImplementedError("CBR with cleaning not updated to work with pipeline model for cleaning.")
 def _add_transform_genes(self):
     """Sets up for evolution of a seasonal ARIMA model."""
     self._alleles.add(pu.make_int_gene(1, 1, 10, 1))  # 'AR' backshift (p)
     self._alleles.add(pu.make_choice_gene(1,
                                           [0, 1, 2]))  # 'I' backshift (d)
     self._alleles.add(pu.make_choice_gene(1,
                                           [1, 2, 3]))  # 'MA' backshift (q)
     self._alleles.add(pu.make_int_gene(1, 1, 10,
                                        1))  # Seasonal 'AR' backshift (p)
     self._alleles.add(pu.make_choice_gene(
         1, [0, 1, 2]))  # Seasonal 'I' backshift (d)
     self._alleles.add(pu.make_choice_gene(
         1, [1, 2, 3]))  # Seasonal 'MA' backshift (q)
     self._loci_list += [
         'AR_order', 'I_order', 'MA_order', 'ssn_AR_order', 'ssn_I_order',
         'ssn_MA_order'
     ]
Esempio n. 8
0
 def _add_transform_genes(self):
     self._alleles.add(pu.make_int_gene(1, 2, 11, 1))  # Dimension
     # self._alleles.add(pu.make_real_gene(1, 0, 1, 0.05)) # Weight
     # self._alleles.add(pu.make_int_gene(1, 1024, 2048, 50)) # Boolean mask
     self._loci_list += ['dimension']  #, 'weight', 'mask',
     if not self._options.no_cleaning:
         #wavelet.set_local_cleaning_func(self._get_cleansing_function(options), model)
         raise NotImplementedError(
             "CBR with cleaning not updated to work with pipeline model for cleaning."
         )
 def _add_transform_genes(self):
     """This is where the models are defined. The models are passed to the
     GA engine for evolution of the optimal set of parameters. Afterwards,
     the models are tested, and performance is measured."""
     
     self._alleles.add(pu.make_int_gene(1, 1, 10, 1)) # Scale
     self._alleles.add(pu.make_choice_gene(1, [2])) # Aj, in the paper 2 gives best results.
     gene = pu.make_choice_gene(1, [i for i in self._hindsight_days])
     self._alleles.add(gene, weight=1)
     
     if options.no_cleaning:
         loci = sg.utils.Enum('scale', 'Aj')
     else:
         loci = sg.utils.Enum('scale', 'Aj', 't_smooth', 
                              'l_smooth', 't_zscore', 'l_zscore')
    def _add_transform_genes(self):
        """This is where the models are defined. The models are passed to the
        GA engine for evolution of the optimal set of parameters. Afterwards,
        the models are tested, and performance is measured."""

        self._alleles.add(pu.make_int_gene(1, 1, 10, 1))  # Scale
        self._alleles.add(pu.make_choice_gene(
            1, [2]))  # Aj, in the paper 2 gives best results.
        gene = pu.make_choice_gene(1, [i for i in self._hindsight_days])
        self._alleles.add(gene, weight=1)

        if options.no_cleaning:
            loci = sg.utils.Enum('scale', 'Aj')
        else:
            loci = sg.utils.Enum('scale', 'Aj', 't_smooth', 'l_smooth',
                                 't_zscore', 'l_zscore')
Esempio n. 11
0
 def _add_transform_genes(self):
     """Sets up for evolution of the ESN model."""
     self._alleles.add(pu.make_int_gene(1, 10, 500, 25), weight=1) # Network size
     self._alleles.add(pu.make_real_gene(1, 0, 1, 0.05), weight=1) # Leak rate
     self._alleles.add(pu.make_real_gene(1, 0.1, 0.75, 0.05), weight=1) # Input scaling
     self._alleles.add(pu.make_real_gene(1, 0, 1, 0.05), weight=1) # Bias scaling
     self._alleles.add(pu.make_real_gene(1, 0.5, 2, 0.05), weight=1) # Spectral radius
     # We don't want too many seeds per evolutions, but we don't want to
     # always evolve on the same 5 networks either:
     self._alleles.add(pu.make_choice_gene(
         1, np.random.random_integers(0, 2**16, 5)), weight=1) # Seed
     # Grid optimization showed that for a training length of 336, with
     # other params set based on previous gridopts and operating on the
     # total dataset rather than single AMS'es, optimal ridge was ~5. Scaled
     # thus 5/336=0.015.
     self._alleles.add(pu.make_choice_gene(
         1, [0.0001/self._max_hindsight_hours]), weight=1) # Scaled ridge
     self._loci_list += ['size', 'leak', 'in_scale', 
                   'bias_scale', 'spectral', 'seed', 'ridge' ]
 def _add_lambda_gene(self):
     self._alleles.add(pu.make_int_gene(1, 0, 1e6, 100))
 def _add_transform_genes(self):
     '''Sets up for evolution of the regularized vanilla benchmark model.'''    
     self._alleles.add(pu.make_int_gene(1, 0, 1e6, 100))
     self._loci_list += ['lambda_cont']
 def _add_lambda_gene(self):
     self._alleles.add(pu.make_int_gene(1, 0, 1e6, 100))
 def _add_transform_genes(self):
     '''Sets up for evolution of the regularized vanilla benchmark model.'''
     self._alleles.add(pu.make_int_gene(1, 0, 1e6, 100))
     self._loci_list += ['lambda_cont']
Esempio n. 16
0
 def _add_transform_genes(self):
     '''Sets up for evolution of the ARIMA model.'''
     self._alleles.add(pu.make_int_gene(1, 1, 8 * 24, 5))
     self._alleles.add(pu.make_int_gene(1, 0, 8 * 24, 5))
     self._loci_list += ['AR_order']
     self._loci_list += ['EXO_order']
 def _add_transform_genes(self):
     '''Sets up for evolution of the ARIMA model.'''    
     self._alleles.add(pu.make_int_gene(1, 1, 8*24, 5))
     self._alleles.add(pu.make_int_gene(1, 0, 8*24, 5))
     self._loci_list += ['AR_order']
     self._loci_list += ['EXO_order']