Newer
Older
import analysis_functions
import analysis_plots
import data_model
"""
A program to demonstrate plotting
precision and recall vs rank.
"""
# Load the CSV data.
query_results = data_model.load_query_results()
# Find the recall and precision.
recall_vs_rank = analysis_functions.recall(query_results[1])
precision_vs_rank = analysis_functions.precision(query_results[1])
rank = list(range(1, len(precision_vs_rank)+1))
# Plot the recall and precision.
analysis_plots.recall_precision("recall_precision.png",
rank,
recall_vs_rank,
precision_vs_rank)