fix: print only the most recommended anime

This commit is contained in:
Krzysztof Rudnicki 2023-06-11 22:39:34 +02:00
parent 4a66ce8731
commit 5f2a5c8836

View File

@ -187,7 +187,7 @@ def predict(prediction_model, pivot_table, seed=42, anime="RANDOM", recommendati
query) query)
if debug: if debug:
print("prediction model, distance: ", distance) print("prediction model, distance: ", distance)
for i in range(recommendation_number): for i in range(0, 1):
if i == 0 and not auto and not debug: if i == 0 and not auto and not debug:
print(f"Recommendations for {chosen_anime_name}:\n") print(f"Recommendations for {chosen_anime_name}:\n")
elif not auto and not debug: elif not auto and not debug:
@ -315,6 +315,7 @@ def auto_mode(data_limit=-1, seed=42, anime="RANDOM"):
if possibleMetrics == []: if possibleMetrics == []:
possibleMetrics = [""] possibleMetrics = [""]
for metric in possibleMetrics: for metric in possibleMetrics:
if metric != 'precomputed':
print("testing for algorithm, metric: ", algorithm, metric) print("testing for algorithm, metric: ", algorithm, metric)
for neighbor_amount in neighbor_spread: for neighbor_amount in neighbor_spread:
print("testing for algorithm, metric, neighbor_amount: ", print("testing for algorithm, metric, neighbor_amount: ",