0

Example code:

parameter_svc = {'C': [0.001, 0.01, 0.1]}
model_svc =  GridSearchCV(SVC(random_state=rng), parameter_svc)
model_svc.fit(X_train, y_train)

If possible if I reduce the number of lines by doing

parameter_svc = {'C': [0.001, 0.01, 0.1]}
model_svc =  GridSearchCV(SVC(random_state=rng), parameter_svc).fit(X_train, y_train)
Aqee
  • 153
  • 1
  • 9

1 Answers1

0

Yes you can do that. It's called method chaining and it's common. :)

Sean McCarthy
  • 4,838
  • 8
  • 39
  • 61