docstr: Build the configuration space which defines all parameters and their ranges for the SGD classifier.
docstr_tok: ["Build","the","configuration","space","which","defines","all","parameters","and","their","ranges","for","the","SGD","classifier","."]
code: def configspace(self) -> ConfigurationSpace:
      """Build the configuration space which defines all parameters and their ranges for the SGD classifier."""
      cs = ConfigurationSpace(seed=0)
  
      # We define a few possible parameters for the SGD classifier
      alpha = Float("alpha", (0, 1), default=1.0)
      l1_ratio = Float("l1_ratio", (0, 1), default=0.5)
      learning_rate = Categorical(
          "learning_rate",
          ["constant", "invscaling", "adaptive"],
          default="constant",
      )
      eta0 = Float("eta0", (0.00001, 1), default=0.1, log=True)
  
      # Add the parameters to configuration space
      cs.add_hyperparameters([alpha, l1_ratio, learning_rate, eta0])
  
      return cs
  
file_path: SMAC3/tests/fixtures/models.py
imports: from __future__ import annotations
  import warnings
  import numpy
  import pytest
  from ConfigSpace import Categorical, Configuration, ConfigurationSpace, Float
  from sklearn.linear_model import SGDClassifier
  from sklearn.model_selection import StratifiedKFold, cross_val_score
label_desc: Use image node_id 2 for calling the SGD obj's underlying member method code with example usage: obj.configspace() and returns: cs