class_docstr: A Global Stopping Strategy which recommends stopping optimization if there
  is no significant improvement over recent iterations.
  
  This stopping strategy recommends stopping if there is no significant improvement
  over the past `window_size` trials, among those that are feasible
  (satisfying constraints). The meaning of a "significant"
  improvement differs between single-objective and multi-objective optimizations.
  For single-objective optimizations, improvement is as a fraction of the
  interquartile range (IQR) of the objective values seen so far. For
  multi-objective optimizations (MOO), improvement is as a fraction of the hypervolume
  obtained `window_size` iterations ago.
docstr: Initialize an improvement-based stopping strategy.
  
  Args:
      min_trials: Minimum number of trials before the stopping strategy
          kicks in.
      window_size: Number of recent trials to check the improvement in.
          The first trial that could be used for analysis is
          `min_trials - window_size`; the first trial for which stopping
          might be recommended is `min_trials`.
      improvement_bar: Threshold (in [0,1]) for considering relative improvement
          over the best point.
      inactive_when_pending_trials: If set, the optimization will not stopped as
          long as it has running trials.
docstr_tok: ["Initialize","an","improvement-based","stopping","strategy",".","Args",":","min_trials",":","Minimum","number","of","trials","before","the","stopping","strategy","kicks","in",".","window_size",":","Number","of","recent","trials","to","check","the","improvement","in",".","The","first","trial","that","could","be","used","for","analysis","is","`","min_trials","-","window_size","`",";","the","first","trial","for","which","stopping","might","be","recommended","is","`","min_trials","`",".","improvement_bar",":","Threshold","(","in","[","0,1","]",")","for","considering","relative","improvement","over","the","best","point",".","inactive_when_pending_trials",":","If","set",",","the","optimization","will","not","stopped","as","long","as","it","has","running","trials","."]
code: def __init__(
      self,
      min_trials: int,
      window_size: int = 5,
      improvement_bar: float = 0.1,
      inactive_when_pending_trials: bool = True,
  ) -> None:
      """
      Initialize an improvement-based stopping strategy.
  
      Args:
          min_trials: Minimum number of trials before the stopping strategy
              kicks in.
          window_size: Number of recent trials to check the improvement in.
              The first trial that could be used for analysis is
              `min_trials - window_size`; the first trial for which stopping
              might be recommended is `min_trials`.
          improvement_bar: Threshold (in [0,1]) for considering relative improvement
              over the best point.
          inactive_when_pending_trials: If set, the optimization will not stopped as
              long as it has running trials.
      """
      super().__init__(
          min_trials=min_trials,
          inactive_when_pending_trials=inactive_when_pending_trials,
      )
      self.window_size = window_size
      self.improvement_bar = improvement_bar
      self.hv_by_trial: Dict[int, float] = {}
  
imports: from logging import Logger
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  from ax.core.base_trial import BaseTrial, TrialStatus
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import ObjectiveThreshold
  from ax.core.trial import Trial
  from ax.core.types import ComparisonOp
  from ax.global_stopping.strategies.base import BaseGlobalStoppingStrategy
  from ax.modelbridge.modelbridge_utils import observed_hypervolume
  from ax.plot.pareto_utils import get_tensor_converter_model
  from ax.service.utils.best_point import fill_missing_thresholds_from_nadir
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
label_desc: Use image node_id 1 to create a new ImprovementGlobalStoppingStrategy object from inherited base classes: BaseGlobalStoppingStrategy with example: obj = ImprovementGlobalStoppingStrategy(min_trials, window_size, improvement_bar, inactive_when_pending_trials)