mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-06 15:43:14 +02:00
fix: print only the most recommended anime
This commit is contained in:
parent
4a66ce8731
commit
5f2a5c8836
@ -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,12 +315,13 @@ def auto_mode(data_limit=-1, seed=42, anime="RANDOM"):
|
|||||||
if possibleMetrics == []:
|
if possibleMetrics == []:
|
||||||
possibleMetrics = [""]
|
possibleMetrics = [""]
|
||||||
for metric in possibleMetrics:
|
for metric in possibleMetrics:
|
||||||
print("testing for algorithm, metric: ", algorithm, metric)
|
if metric != 'precomputed':
|
||||||
for neighbor_amount in neighbor_spread:
|
print("testing for algorithm, metric: ", algorithm, metric)
|
||||||
print("testing for algorithm, metric, neighbor_amount: ",
|
for neighbor_amount in neighbor_spread:
|
||||||
algorithm, metric, neighbor_amount)
|
print("testing for algorithm, metric, neighbor_amount: ",
|
||||||
preprocess_model_predict(starting_rating_data, starting_anime_contact_data,
|
algorithm, metric, neighbor_amount)
|
||||||
starting_rows_number, original_pivot_table, seed=seed, anime=anime, neighbors=neighbor_amount, algorithm=algorithm, metric=metric)
|
preprocess_model_predict(starting_rating_data, starting_anime_contact_data,
|
||||||
|
starting_rows_number, original_pivot_table, seed=seed, anime=anime, neighbors=neighbor_amount, algorithm=algorithm, metric=metric)
|
||||||
|
|
||||||
|
|
||||||
def write_test_results(title, result=""):
|
def write_test_results(title, result=""):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user