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}
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) 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, top_k, seed): model = rs.PersonalPopularityModel() updater = rs.PersonalPopularityModelUpdater() updater.set_model(model) return (model, updater, [])