File tree Expand file tree Collapse file tree 7 files changed +16
-1
lines changed Expand file tree Collapse file tree 7 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11# Exercise 4: Fitting a multiple linear regression model and determining the intercept and coefficient
22
3- # continuing from Exercise 1 :
3+ # continuing from Exercise 3 :
44
55# instantiate linear regression model
66from sklearn .linear_model import LinearRegression
Original file line number Diff line number Diff line change 11# Exercise 5: Fitting a logistic regression model and determining the intercept and coefficient
22
3+ # clear environment prior to running this code
4+
35# import data
46import pandas as pd
57df = pd .read_csv ('weather.csv' )
Original file line number Diff line number Diff line change 11# Exercise 8: Preparing data for support vector classifier
22
3+ # clear environment prior to running this code
4+
35# import data
46import pandas as pd
57df = pd .read_csv ('weather.csv' )
Original file line number Diff line number Diff line change 11# Exercise 10: Tuning decision tree classifier using grid search in pipeline
22
3+ # continuing from Activity 4:
4+
35# Set up the steps for a pipeline
46from sklearn .preprocessing import StandardScaler
57from sklearn .tree import DecisionTreeClassifier
Original file line number Diff line number Diff line change 3636plt .legend (loc = 4 )
3737plt .show ()
3838
39+
40+
41+
42+
43+
Original file line number Diff line number Diff line change 11# Exercise 12: Preparing data for random forest regressor pipeline
22
3+ # clear environment prior to running this code
4+
35# import data
46import pandas as pd
57df = pd .read_csv ('weather.csv' )
Original file line number Diff line number Diff line change 11# Exercise 13: Programmatically extracting tuned hyperparameters and determining feature importance from random forest regressor grid search model
22
3+ # continuing from Activity 6
4+
35# instantiate model
46from sklearn .ensemble import RandomForestRegressor
57model = RandomForestRegressor (criterion = best_parameters ['Forest__criterion' ],
You can’t perform that action at this time.
0 commit comments