114k views
0 votes
You are creating a classification model from a DataFrame that contains data about traffic on highways in a US state, which contains multiple feature columns and a label column that indicates whether or not each highway is over-congested. You want to train a model, and then test it to compare predicted labels with known labels in the DataFrame. What should you do? Train the model with the entire DataFrame, and then test it with the entire DataFrame. Train the model with the entire DataFrame, and then create a new DataFrame containing random values with which to test it. Split the DataFrame into two randomly sampled DataFrames, and then train the model with one DataFrame and test it with the other. Train the model with the first row of the DataFrame, and then test it with the remaining rows.

1 Answer

1 vote

Answer:

Split the data into two randomly sampled DataFrame,and then train the model with one DataFrame and test it with the other .As we have know labels in the data frame ,so this approch will give us a better picture on how accuractly our model is trained

Step-by-step explanation:

Split the data into two randomly sampled DataFrame,and then train the model with one DataFrame and test it with the other .As we have know labels in the data frame ,so this approch will give us a better picture on how accuractly our model is trained

User Martheen
by
5.1k points