Beispiel #1
0
 def __init__(self, model_name):
     super(SetOptimizer, self).__init__()
     self.model = ItemSetModel()
     self.model.load(model_name)
     self.item_ids = [x.item_id for x in Item.objects().all()]
     self.item_ids.sort()
Beispiel #2
0
 def _optimize_build(self):
     opt = SetOptimizer('RandomForest_updated')
     res = opt.optimize(72, [4, 1, 1, 1, 1, 1])
     for item in res.x:
         print(Item.objects(item_id=item).first().name)
Beispiel #3
0
 def __init__(self, model_name):
     super(SetOptimizer, self).__init__()
     self.model = ItemSetModel()
     self.model.load(model_name)
     self.item_ids = [x.item_id for x in Item.objects().all()]
     self.item_ids.sort()
 def _optimize_build(self):
     opt = SetOptimizer('RandomForest_updated')
     res = opt.optimize(72, [4,1,1,1,1,1])
     for item in res.x:
         print(Item.objects(item_id=item).first().name)