def config(self, elems): config = self.parameter_defaults( top_k=100, min_time=0, seed=0, out_file=None, filters=[], loggers=[], ) model = rs.TransitionProbabilityModel() updater = rs.TransitionProbabilityModelUpdater( **self.parameter_defaults(filter_freq_updates=False, mode_="normal", label_transition_mode_=False, label_file_name_="")) updater.set_model(model) learner = rs.SimpleLearner() learner.add_simple_updater(updater) learner.set_model(model) model = model learner = learner filters = [model] return {'config': config, 'model': model, 'learner': learner}
def config(self, elems): config = self.parameter_defaults( top_k=100, min_time=0, seed=0, out_file=None, filters=[], loggers=[], ) model = rs.NearestNeighborModel( **self.parameter_defaults(gamma=0.8, norm="num", direction="forward", gamma_threshold=0, num_of_neighbors=10)) updater = rs.NearestNeighborModelUpdater(**self.parameter_defaults( compute_similarity_period=86400, period_mode="time-based")) updater.set_model(model) learner = rs.SimpleLearner() learner.add_simple_updater(updater) learner.set_model(model) model = model learner = learner filters = [model] return {'config': config, 'model': model, 'learner': learner}
def config(self, elems): config = self.parameter_defaults( top_k=100, min_time=0, seed=0, out_file=None, filters=[], loggers=[], ) model = rs.PopularityModel() updater = rs.PopularityTimeFrameModelUpdater(**self.parameter_defaults( tau=86400 )) updater.set_model(model) learner = rs.SimpleLearner() learner.add_simple_updater(updater) learner.set_model(model) model = model learner = learner return { 'config': config, 'model': model, 'learner': learner }
def config(self, elems): config = self.parameter_defaults( top_k=100, min_time=0, seed=0, out_file=None, filters=[], loggers=[], ) model = rs.PersonalPopularityModel() updater = rs.PersonalPopularityModelUpdater() updater.set_model(model) simple_learner = rs.SimpleLearner() simple_learner.add_simple_updater(updater) simple_learner.set_model(model) learner = rs.LearnerPeriodicDelayedWrapper( **self.parameter_defaults(period=86400, delay=86400)) learner.set_wrapped_learner(simple_learner) model = model learner = learner return {'config': config, 'model': model, 'learner': learner}