Skip to content

Commit

Permalink
Remove unused code in experiment.py (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqtg committed Mar 24, 2019
1 parent dabcdfb commit 3a02545
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions cornac/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,12 @@ def _create_result(self):
return CVExperimentResult()
return ExperimentResult()

# modify this function to accommodate several models
def run(self):
result = self._create_result()

metric_names = []
organized_metrics = {'ranking': [], 'rating': []}

# Organize metrics into "rating" and "ranking" for efficiency purposes
for mt in self.metrics:
organized_metrics[mt.type].append(mt)
metric_names.append(mt.name)

for model in self.models:
model_result = self.eval_method.evaluate(model=model, metrics=self.metrics, user_based=self.user_based)
model_result = self.eval_method.evaluate(model=model,
metrics=self.metrics,
user_based=self.user_based)
result.append(model_result)

print('\n{}'.format(result))
return result

0 comments on commit 3a02545

Please sign in to comment.