def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) for identifier in _CONFIGURABLE_IDENTIFIERS: if not parser.has_option(section.name, identifier): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) self._overwrite_existing = parser.getboolean( section.name, _OVERWRITE_EXISTING_CONFIG_ID) self._combined_examples_factor = parser.getint( section.name, _EXAMPLE_COMBINATION_FACTOR_IDENTIFIER) block_length = parser.getint(section.name, _TDP_BLOCK_LENGTH_IDENTIFIER) if enabled: data_provider_registry.registry.register_consumer( data_provider_static_names. TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, self, [block_length], data_provider_static_names. TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, prediction_string_serializer=string_serialize_predictions, data_exportation_function=export_predictions, keyword_args={ 'ema_period': [5, 10, 15], 'trend_strength_labelling': True })
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) for identifier in _CONFIGURABLE_IDENTIFIERS: if not parser.has_option(section.name, identifier): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) self.__periods_per_example = parser.getint( section.name, _EXAMPLE_COMBINATION_FACTOR_IDENTIFIER) self.__num_individuals = parser.getint(section.name, _NUM_INDIVIDUALS_IDENTIFIER) self.__num_epochs = parser.getint(section.name, _NUM_EPOCHS_IDENTIFIER) self.__save_interval = parser.getint( section.name, _MODEL_CHECKPOINT_EPOCH_INTERVAL_IDENTIFIER) self.__mutation_chance = parser.getfloat(section.name, _MUTATION_CHANCE_IDENTIFIER) self.__mutation_magnitude = parser.getfloat( section.name, _MUTATION_MAGNITUDE_IDENTIFIER) self.__crossover_chance = parser.getfloat( section.name, _CROSSOVER_CHANCE_IDENTIFIER) block_length = parser.getint(section.name, _TDP_BLOCK_LENGTH_IDENTIFIER) if enabled: data_provider_registry.registry.register_consumer( data_provider_static_names. CLOSING_PRICE_REGRESSION_BLOCK_PROVIDER_ID, self, [block_length], data_provider_static_names. CLOSING_PRICE_REGRESSION_BLOCK_PROVIDER_ID, keyword_args={'ema_period': [10, 15, 20]}, data_exportation_function=export_predictions, prediction_string_serializer=string_serialize_predictions)
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) for identifier in _CONFIGRABLE_IDIENTIFIERS: if not parser.has_option(section.name, identifier): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) self._trend_lookahead = parser.getint(section.name, _TREND_LOOKAHEAD_IDENTIFIER) self._overwite_existing = parser.getboolean(section.name, _OVERWRITE_EXISTING_MODELS_CONFIG_ID) self._combined_examples_factor = parser.getint(section.name, _EXAMPLE_COMBINATION_FACTOR_IDENTIFIER) ema_periods = parser.get(section.name, _EMA_PERIODS_IDENTIFIER) ema_periods = ema_periods.split(',') self._ema_periods = [int(x) for x in ema_periods] block_length = parser.getint(section.name, _TDP_BLOCK_LENGTH_IDENTIFIER) if enabled: data_provider_registry.registry.register_consumer( data_provider_static_names.TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, self, [block_length], data_provider_static_names.TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, {"trend_lookahead": self._trend_lookahead, "ema_period": self._ema_periods}, prediction_string_serializer=string_serialize_predictions, data_exportation_function=export_predictions )
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) for identifier in _CONFIGURABLE_IDENTIFIERS: if not parser.has_option(section.name, identifier): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) self._combined_examples_factor = parser.getint( section.name, _EXAMPLE_COMBINATION_FACTOR_IDENTIFIER) self._num_similar_regions = parser.getint(section.name, _TOP_N_HIGHLIGHTED_PERIOD) block_length = parser.getint(section.name, _TDP_BLOCK_LENGTH_IDENTIFIER) if enabled: data_provider_registry.registry.register_consumer( data_provider_static_names.PERCENTAGE_CHANGE_BLOCK_PROVIDER_ID, self, [block_length], data_provider_static_names.PERCENTAGE_CHANGE_BLOCK_PROVIDER_ID, prediction_string_serializer=None, data_exportation_function=None, keyword_args={ 'percentage_changes': False, 'trend_lookahead': 0 })
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) if not parser.has_option(section.name, _ENABLED_CONFIG_ID): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIG_ID) if enabled: data_provider_registry.registry.register_provider( data_provider_static_names.PERCENTAGE_CHANGE_BLOCK_PROVIDER_ID, self)
def load_configuration(self, parser: "ConfigParser"): section = cfg_util.create_type_section(parser, self) if not parser.has_option(section.name, ENABLED_CONFIGURATION_IDENTIFIER): self.write_default_configuration(section) if not parser.has_option(section.name, LOAD_CHECKPOINT_CONFIGURATION_IDENTIFIER): self.write_default_configuration(section) enabled = parser.getboolean(section.name, ENABLED_CONFIGURATION_IDENTIFIER) self.load_checkpoint = parser.getboolean(section.name, LOAD_CHECKPOINT_CONFIGURATION_IDENTIFIER) if enabled: registry.register_consumer(data_provider_static_names.INDICATOR_BLOCK_PROVIDER_ID, self, [260], passback="RL-Single")
def load_configuration(self, parser: "configparser.ConfigParser"): """Attempts to load the configurable parameters for this provider from the provided parser. For more details see abstract class documentation. """ section = config_util.create_type_section(parser, self) if not parser.has_option(section.name, ENABLED_CONFIG_ID): self.write_default_configuration(section) enabled = parser.getboolean(section.name, ENABLED_CONFIG_ID) if enabled: data_provider_registry.registry.register_provider( data_provider_static_names.SPLIT_BLOCK_PROVIDER_ID, self)
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) if not parser.has_option(section.name, _ENABLED_CONFIGURATION_IDENTIFIER): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) self._overwite_existing = parser.getboolean(section.name, _OVERWRITE_EXISTING_MODELS_CONFIG_ID) if enabled: block_length = parser.getint(section.name, _TDP_BLOCK_LENGTH_IDENTIFIER) data_provider_registry.registry.register_consumer( data_provider_static_names.TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, self, [block_length], data_provider_static_names.TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, keyword_args={"trend_strength_labelling": True}, prediction_string_serializer=string_serialize_predictions )
def load_configuration(self, parser: "ConfigParser"): section = cfgUtil.create_type_section(parser, self) if not parser.has_option(section.name, ENABLED_CONFIGURATION_IDENTIFIER): self.write_default_configuration(section) enabled = parser.getboolean(section.name, ENABLED_CONFIGURATION_IDENTIFIER) if enabled: registry.register_consumer( data_provider_static_names.CLUSTERED_BLOCK_PROVIDER_ID, self, [[ 'hist_date', 'adj_close', 'opening_price', 'volume_data', 'high_price' ], [1]], passback='CombinedDataCNN') registry.register_consumer( data_provider_static_names.SPLIT_BLOCK_PROVIDER_ID, self, [[ 'hist_date', 'adj_close', 'opening_price', 'volume_data', 'high_price' ], [1]], passback='SplitDataCNN')
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) if not parser.has_option(section.name, _ENABLED_CONFIGURATION_IDENTIFIER): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) if enabled: data_columns = [stock_data_table.HIGH_PRICE_COLUMN_NAME, stock_data_table.HIGH_PRICE_COLUMN_NAME, stock_data_table.LOW_PRICE_COLUMN_NAME, stock_data_table.VOLUME_COLUMN_NAME, stock_data_table.CLOSING_PRICE_COLUMN_NAME] data_provider_registry.registry.register_consumer(data_provider_static_names.SPLIT_BLOCK_PROVIDER_ID, self, [data_columns, [7]], data_provider_static_names.SPLIT_BLOCK_PROVIDER_ID) data_provider_registry.registry.register_consumer(data_provider_static_names.CLUSTERED_BLOCK_PROVIDER_ID, self, [data_columns, [7]], data_provider_static_names.CLUSTERED_BLOCK_PROVIDER_ID) data_provider_registry.registry.register_consumer(data_provider_static_names.INDICATOR_BLOCK_PROVIDER_ID, self, [200], data_provider_static_names.INDICATOR_BLOCK_PROVIDER_ID) data_provider_registry.registry.register_consumer( data_provider_static_names.TREND_DETERMINISTIC_BLOCK_PROVIDER_ID, self, [252 * 10], data_provider_static_names.TREND_DETERMINISTIC_BLOCK_PROVIDER_ID)
def load_configuration(self, parser: "ConfigParser"): section = config_util.create_type_section(parser, self) for identifier in _CONFIGURABLE_IDENTIFIERS: if not parser.has_option(section.name, identifier): self.write_default_configuration(section) enabled = parser.getboolean(section.name, _ENABLED_CONFIGURATION_IDENTIFIER) self._overwrite_existing = parser.getboolean( section.name, _OVERWRITE_EXISTING_CONFIG_ID) self._combined_examples_factor = parser.getint( section.name, _EXAMPLE_COMBINATION_FACTOR_IDENTIFIER) block_length = parser.getint(section.name, _TDP_BLOCK_LENGTH_IDENTIFIER) if enabled: data_provider_registry.registry.register_consumer( data_provider_static_names. CLOSING_PRICE_REGRESSION_BLOCK_PROVIDER_ID, self, [block_length], data_provider_static_names. CLOSING_PRICE_REGRESSION_BLOCK_PROVIDER_ID, prediction_string_serializer=string_serialize_predictions # ,data_exportation_function=export_predictions )