class_docstr: An UMDA class, inherited from Optimizer.
  
  This is the designed class to define UMDA-related variables and methods.
  
  References:
      H. Mühlenbein. The equation for response to selection and its use for prediction.
      Evolutionary Computation (1997).
class_docstr_tok: ["An","UMDA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","UMDA-related","variables","and","methods",".","References",":","H.","M\u00fchlenbein",".","The","equation","for","response","to","selection","and","its","use","for","prediction",".","Evolutionary","Computation","(","1997",")","."]
docstr: Wraps Univariate Marginal Distribution Algorithm over all agents and variables.
  
  Args:
      space: Space containing agents and update-related information.
docstr_tok: ["Wraps","Univariate","Marginal","Distribution","Algorithm","over","all","agents","and","variables",".","Args",":","space",":","Space","containing","agents","and","update-related","information","."]
code: def update(self, space: Space) -> None:
      """Wraps Univariate Marginal Distribution Algorithm over all agents and variables.
  
      Args:
          space: Space containing agents and update-related information.
  
      """
  
      n_agents = len(space.agents)
      n_selected = int(n_agents * self.p_selection)
  
      space.agents.sort(key=lambda x: x.fit)
  
      probs = self._calculate_probability(space.agents[:n_selected])
  
      for agent in space.agents:
          agent.position = self._sample_position(probs)
          agent.clip_by_bound()
  
imports: from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 10 for calling the UMDA obj's underlying member method code with example usage: obj.update(space) without return types