def configure(self, time_series, dt=None, bold_model=None, RBM=None, neural_input_transformation=None): """ Store the input shape to be later used to estimate memory usage. Also create the algorithm instance. """ self.input_time_series_index = time_series self.input_shape = (self.input_time_series_index.data_length_1d, self.input_time_series_index.data_length_2d, self.input_time_series_index.data_length_3d, self.input_time_series_index.data_length_4d) LOG.debug("time_series shape is %s" % str(self.input_shape)) # -------------------- Fill Algorithm for Analysis -------------------## algorithm = BalloonModel() if dt is not None: algorithm.dt = dt else: algorithm.dt = time_series.sample_period / 1000. if bold_model is not None: algorithm.bold_model = bold_model if RBM is not None: algorithm.RBM = RBM if neural_input_transformation is not None: algorithm.neural_input_transformation = neural_input_transformation self.algorithm = algorithm
def configure(self, time_series, dt=None, bold_model=None, RBM=None, neural_input_transformation=None): """ Store the input shape to be later used to estimate memory usage. Also create the algorithm instance. """ self.input_shape = time_series.read_data_shape() log_debug_array(LOG, time_series, "time_series") ##-------------------- Fill Algorithm for Analysis -------------------## algorithm = BalloonModel() if dt is not None: algorithm.dt = dt else: algorithm.dt = time_series.sample_period / 1000. if bold_model is not None: algorithm.bold_model = bold_model if RBM is not None: algorithm.RBM = RBM if neural_input_transformation is not None: algorithm.neural_input_transformation = neural_input_transformation self.algorithm = algorithm self.algorithm.time_series = time_series
def configure(self, view_model): # type: (BalloonModelAdapterModel) -> None """ Store the input shape to be later used to estimate memory usage. Also create the algorithm instance. """ self.input_time_series_index = self.load_entity_by_gid( view_model.time_series.hex) self.input_shape = (self.input_time_series_index.data_length_1d, self.input_time_series_index.data_length_2d, self.input_time_series_index.data_length_3d, self.input_time_series_index.data_length_4d) self.log.debug("time_series shape is %s" % str(self.input_shape)) # -------------------- Fill Algorithm for Analysis -------------------## algorithm = BalloonModel() if view_model.dt is not None: algorithm.dt = view_model.dt else: algorithm.dt = self.input_time_series_index.sample_period / 1000. if view_model.bold_model is not None: algorithm.bold_model = view_model.bold_model if view_model.RBM is not None: algorithm.RBM = view_model.RBM if view_model.neural_input_transformation is not None: algorithm.neural_input_transformation = view_model.neural_input_transformation self.algorithm = algorithm