this exercise we will use code that we already have. Use the fucntion you created to compute the precision of a model, remember that the precision of a model is:$precision=(tp/(tp+fp))$ where tp is the number of true positives and fp is the number of false positives. The file performance.txt has data from models that were used in an experiment, the data has the model id, number of true positives and number of false positives for each model. Remember again that the model is good if its precision is above 0.75.\n", "\n", "Open the file, read each model and print if the model is good or bad. At the end, print the id of the best model and its precision. Be sure to use a function to compute the precision of each model."
"In this exercise we will use code that we already have. Use the fucntion you created to compute the precision of a model, remember that the precision of a model is:$precision=(tp/(tp+fp))$ where tp is the number of true positives and fp is the number of false positives. The file performance.txt has data from models that were used in an experiment, the data has the model id, number of true positives and number of false positives for each model. Remember again that the model is good if its precision is above 0.75.\n", "\n", "Open the file, read each model and print if the model is good or bad. At the end, print the id of the best model and its precision. Be sure to use a function to compute the precision of each model."
Step by step
Solved in 2 steps