Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unknown Expression
#3
Here is the error that I get:

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
Reply


Messages In This Thread
Unknown Expression - by Led_Zeppelin - Oct-11-2022, 05:28 PM
RE: Unknown Expression - by deanhystad - Oct-11-2022, 06:10 PM
RE: Unknown Expression - by Led_Zeppelin - Oct-11-2022, 07:28 PM
RE: Unknown Expression - by deanhystad - Oct-11-2022, 09:11 PM
RE: Unknown Expression - by Led_Zeppelin - Oct-14-2022, 07:18 PM
RE: Unknown Expression - by deanhystad - Oct-15-2022, 12:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pass results of expression to another expression cmdr_eggplant 2 2,423 Mar-26-2020, 06:59 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020