class_docstr: Sampler with partially fixed parameters.
  
  Example:
  
      After several steps of optimization, you can fix the value of ``y`` and re-optimize it.
  
      .. testcode::
  
          import optuna
  
  
          def objective(trial):
              x = trial.suggest_float("x", -1, 1)
              y = trial.suggest_int("y", -1, 1)
              return x**2 + y
  
  
          study = optuna.create_study()
          study.optimize(objective, n_trials=10)
  
          best_params = study.best_params
          fixed_params = {"y": best_params["y"]}
          partial_sampler = optuna.samplers.PartialFixedSampler(fixed_params, study.sampler)
  
          study.sampler = partial_sampler
          study.optimize(objective, n_trials=10)
  
  Args:
  
      fixed_params:
          A dictionary of parameters to be fixed.
  
      base_sampler:
          A sampler which samples unfixed parameters.
class_docstr_tok: ["Sampler","with","partially","fixed","parameters",".","Example",":","After","several","steps","of","optimization",",","you","can","fix","the","value","of","``","y","``","and","re-optimize","it",".","..","testcode",":",":","import","optuna","def","objective","(","trial",")",":","x","=","trial.suggest_float","(","``","x","''",",","-1",",","1",")","y","=","trial.suggest_int","(","``","y","''",",","-1",",","1",")","return","x","*","*","2","+","y","study","=","optuna.create_study","(",")","study.optimize","(","objective",",","n_trials=10",")","best_params","=","study.best_params","fixed_params","=","{","``","y","''",":","best_params","[","``","y","''","]","}","partial_sampler","=","optuna.samplers.PartialFixedSampler","(","fixed_params",",","study.sampler",")","study.sampler","=","partial_sampler","study.optimize","(","objective",",","n_trials=10",")","Args",":","fixed_params",":","A","dictionary","of","parameters","to","be","fixed",".","base_sampler",":","A","sampler","which","samples","unfixed","parameters","."]
code: def before_trial(self, study: Study, trial: FrozenTrial) -> None:
      self._base_sampler.before_trial(study, trial)
  
file_path: optuna/optuna/samplers/_partial_fixed.py
imports: from typing import Any
  from typing import Dict
  from typing import Optional
  from typing import Sequence
  import warnings
  from optuna._experimental import experimental_class
  from optuna.distributions import BaseDistribution
  from optuna.samplers import BaseSampler
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 6 for calling the PartialFixedSampler obj's underlying member method code with example usage: obj.before_trial(study, trial) without return types