programminghistorian / jekyll

Jekyll-based static site for The Programming Historian
http://programminghistorian.org
521 stars 229 forks source link

Linear Regression tutorial #3403

Open mlplace opened 3 days ago

mlplace commented 3 days ago

In the following code, it's unclear as least to me where the date_labels parameter to the SelectKBest().fit_transform comes from.

from sklearn.feature_selection import SelectKBest, f_regression Z_new = SelectKBest(f_regression, k=3500).fit_transform(Z, date_labels)

mlplace commented 3 days ago

Would this be correct? date_labels = df_all['yearDecimal']

anisa-hawes commented 2 days ago

Thank you for getting in touch, @mlplace.

We appreciate you letting us know that you encountered a problem when working through the lesson Regression Analysis with Scikit-Learn (part 1 - Linear).

I'd like to ask if you could share some details to help us understand the context: