Hi, my question is on the second part of the assignment.
weights = pd.DataFrame([est.coef_ for est in cv_result[‘estimator’]], columns=data.columns)
-
when I call weights variable, it output a data frame with 8 features, why it does not show the coefficient value in a column?
-
what does the second parameter columns=data.columns means? Is it telling the est.coef column need to attach with the original dataset with 8 variables?
-
A bit of out of topic but I would like to learn more on building boxplot. Is it possible to use seaborn?
Like this code but I am having error on the column name.
import seaborn as sns
col = list(data.columns)
sns.boxplot(data=data, x=‘list(col)’, y=‘weights’)
The error:
ValueError: Could not interpret input ‘list(col)’
How to correct the code above?