Oct-11-2022, 07:28 PM
Here is the error that I get:
I have seen examples of pd.DataFrame.from_dict online and there are no differences that I can see.
Respectfully,
LZ
Output:AttributeError Traceback (most recent call last)
Input In [20], in <cell line: 2>()
1 # plotting cross validation result
----> 2 get_cv_plot(clf, 'param_C')
Input In [10], in get_cv_plot(validation, parameter)
2 """
3 Function to plot cross validation metric
4 """
5 # creating dataframe of cross validation results
----> 6 results = pd.DataFrame.from_dict(validation.cv_results_)
7 results = results.sort_values([parameter])
9 # Get Mean score for each grid search for train data
AttributeError: 'GridSearchCV' object has no attribute 'cv_results_'
I am not sure what it means. It sure seems that cv_results_ is an attribute of GridSearchCV. The first post shows the code for get_cv_plot and this post of error prose shows the error. cv_results_ is in both of them. Perhaps an example would help. I still do not understand. As I said cv_results_ is in both code snippets. What is wrong? I do not see it.I have seen examples of pd.DataFrame.from_dict online and there are no differences that I can see.
Respectfully,
LZ