class_docstr: Tree-structured Parzen Estimator (TPE) algorithm is one of Sequential Model-Based
  Global Optimization (SMBO) algorithms, which will build models to propose new points based
  on the historical observed trials.
  
  Instead of modeling p(y|x) like other SMBO algorithms, TPE models p(x|y) and p(y),
  and p(x|y) is modeled by transforming that generative process, replacing the distributions of
  the configuration prior with non-parametric densities.
  
  The TPE defines p(x|y) using two such densities l(x) and g(x) while l(x) is distribution of
  good points and g(x) is the distribution of bad points. New point candidates will be sampled
  with l(x) and Expected Improvement (EI) optimization scheme will be used to find the most
  promising point among the candidates.
  
  For more information on the algorithm, see original papers at:
  
  - `Algorithms for Hyper-Parameter Optimization
    <https://papers.nips.cc/paper/4443-algorithms-for-hyper-parameter-optimization.pdf>`_
  - `Making a Science of Model Search: Hyperparameter Optimizationin Hundreds of Dimensions
    for Vision Architectures <http://proceedings.mlr.press/v28/bergstra13.pdf>`_
  
  Parameters
  ----------
  space: `orion.algo.space.Space`
      Optimisation space with priors for each dimension.
  seed: None, int or sequence of int, optional
      Seed to sample initial points and candidates points.
      Default: ``None``
  n_initial_points: int, optional
      Number of initial points randomly sampled. If new points
      are requested and less than `n_initial_points` are observed,
      the next points will also be sampled randomly instead of being
      sampled from the parzen estimators.
      Default: ``20``
  n_ei_candidates: int, optional
      Number of candidates points sampled for ei compute. Larger numbers will lead to more
      exploitation and lower numbers will lead to more exploration. Be careful with categorical
      dimension as TPE tend to severily exploit these if n_ei_candidates is larger than 1.
      Default: ``24``
  gamma: real, optional
      Ratio to split the observed trials into good and bad distributions. Lower numbers will
      load to more exploitation and larger numbers will lead to more exploration.
      Default: ``0.25``
  equal_weight: bool, optional
      True to set equal weights for observed points.
      Default: ``False``
  prior_weight: int, optional
      The weight given to the prior point of the input space.
      Default: ``1.0``
  full_weight_num: int, optional
      The number of the most recent trials which get the full weight where the others will be
      applied with a linear ramp from 0 to 1.0. It will only take effect if equal_weight
      is False.
  max_retry: int, optional
      Number of attempts to sample new points if the sampled points were already suggested.
      Default: ``100``
  parallel_strategy: dict or None, optional
      The configuration of a parallel strategy to use for pending trials or broken trials.
      Default is a MaxParallelStrategy for broken trials and NoParallelStrategy for pending
      trials.
class_docstr_tok: ["Tree-structured","Parzen","Estimator","(","TPE",")","algorithm","is","one","of","Sequential","Model-Based","Global","Optimization","(","SMBO",")","algorithms",",","which","will","build","models","to","propose","new","points","based","on","the","historical","observed","trials",".","Instead","of","modeling","p","(","y|x",")","like","other","SMBO","algorithms",",","TPE","models","p","(","x|y",")","and","p","(","y",")",",","and","p","(","x|y",")","is","modeled","by","transforming","that","generative","process",",","replacing","the","distributions","of","the","configuration","prior","with","non-parametric","densities",".","The","TPE","defines","p","(","x|y",")","using","two","such","densities","l","(","x",")","and","g","(","x",")","while","l","(","x",")","is","distribution","of","good","points","and","g","(","x",")","is","the","distribution","of","bad","points",".","New","point","candidates","will","be","sampled","with","l","(","x",")","and","Expected","Improvement","(","EI",")","optimization","scheme","will","be","used","to","find","the","most","promising","point","among","the","candidates",".","For","more","information","on","the","algorithm",",","see","original","papers","at",":","-","`","Algorithms","for","Hyper-Parameter","Optimization","<","https",":","\/\/papers.nips.cc\/paper\/4443-algorithms-for-hyper-parameter-optimization.pdf",">","`","_","-","`","Making","a","Science","of","Model","Search",":","Hyperparameter","Optimizationin","Hundreds","of","Dimensions","for","Vision","Architectures","<","http",":","\/\/proceedings.mlr.press\/v28\/bergstra13.pdf",">","`","_","Parameters","--","--","--","--","--","space",":","`","orion.algo.space.Space","`","Optimisation","space","with","priors","for","each","dimension",".","seed",":","None",",","int","or","sequence","of","int",",","optional","Seed","to","sample","initial","points","and","candidates","points",".","Default",":","``","None","``","n_initial_points",":","int",",","optional","Number","of","initial","points","randomly","sampled",".","If","new","points","are","requested","and","less","than","`","n_initial_points","`","are","observed",",","the","next","points","will","also","be","sampled","randomly","instead","of","being","sampled","from","the","parzen","estimators",".","Default",":","``","20","``","n_ei_candidates",":","int",",","optional","Number","of","candidates","points","sampled","for","ei","compute",".","Larger","numbers","will","lead","to","more","exploitation","and","lower","numbers","will","lead","to","more","exploration",".","Be","careful","with","categorical","dimension","as","TPE","tend","to","severily","exploit","these","if","n_ei_candidates","is","larger","than","1",".","Default",":","``","24","``","gamma",":","real",",","optional","Ratio","to","split","the","observed","trials","into","good","and","bad","distributions",".","Lower","numbers","will","load","to","more","exploitation","and","larger","numbers","will","lead","to","more","exploration",".","Default",":","``","0.25","``","equal_weight",":","bool",",","optional","True","to","set","equal","weights","for","observed","points",".","Default",":","``","False","``","prior_weight",":","int",",","optional","The","weight","given","to","the","prior","point","of","the","input","space",".","Default",":","``","1.0","``","full_weight_num",":","int",",","optional","The","number","of","the","most","recent","trials","which","get","the","full","weight","where","the","others","will","be","applied","with","a","linear","ramp","from","0","to","1.0",".","It","will","only","take","effect","if","equal_weight","is","False",".","max_retry",":","int",",","optional","Number","of","attempts","to","sample","new","points","if","the","sampled","points","were","already","suggested",".","Default",":","``","100","``","parallel_strategy",":","dict","or","None",",","optional","The","configuration","of","a","parallel","strategy","to","use","for","pending","trials","or","broken","trials",".","Default","is","a","MaxParallelStrategy","for","broken","trials","and","NoParallelStrategy","for","pending","trials","."]
code: def _suggest_bo(self, num: int) -> list[Trial]:
      def suggest_bo(num: int) -> list[Trial]:
          return [self._suggest_one_bo() for _ in range(num)]
  
      return self._suggest(num, suggest_bo)
  
imports: from __future__ import annotations
  import logging
  from typing import Any, Callable, ClassVar, Iterable, Sequence, TypeVar
  import numpy
  from scipy.stats import norm
  from scipy.stats.distributions import rv_frozen
  from orion.algo.base import BaseAlgorithm
  from orion.algo.base.parallel_strategy import ParallelStrategy, strategy_factory
  from orion.algo.space import Integer, Real, Space
  from orion.core.utils import format_trials
  from orion.core.utils.flatten import flatten
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 9 for calling the TPE obj's underlying member method code with example usage: obj._suggest_bo(num) and returns: self, unknown