class_docstr: Class that defines operations using a Poincare ball.
class_docstr_tok: ["Class","that","defines","operations","using","a","Poincare","ball","."]
docstr: Poincaré ball model retraction.
  
  Approximate the exponential map of the Poincare ball
  
  Parameters
  ----------
  tangent_vec : array-like, shape=[..., dim]
      vector in tangent space.
  base_point : array-like, shape=[..., dim]
      Second point in the Poincare ball.
  
  Returns
  -------
  point : array-like, shape=[..., dim]
      Retraction point.
  
  References
  ----------
  .. [1] Nickel et.al, "Poincaré Embedding for
      Learning Hierarchical Representation", 2017.
docstr_tok: ["Poincar\u00e9","ball","model","retraction",".","Approximate","the","exponential","map","of","the","Poincare","ball","Parameters","--","--","--","--","--","tangent_vec",":","array-like",",","shape=","[","...",",","dim","]","vector","in","tangent","space",".","base_point",":","array-like",",","shape=","[","...",",","dim","]","Second","point","in","the","Poincare","ball",".","Returns","--","--","--","-","point",":","array-like",",","shape=","[","...",",","dim","]","Retraction","point",".","References","--","--","--","--","--","..","[","1","]","Nickel","et.al",",","``","Poincar\u00e9","Embedding","for","Learning","Hierarchical","Representation","''",",","2017","."]
code: def retraction(self, tangent_vec, base_point):
      """Poincaré ball model retraction.
  
      Approximate the exponential map of the Poincare ball
  
      Parameters
      ----------
      tangent_vec : array-like, shape=[..., dim]
          vector in tangent space.
      base_point : array-like, shape=[..., dim]
          Second point in the Poincare ball.
  
      Returns
      -------
      point : array-like, shape=[..., dim]
          Retraction point.
  
      References
      ----------
      .. [1] Nickel et.al, "Poincaré Embedding for
          Learning Hierarchical Representation", 2017.
      """
      retraction_factor = (
          (1 - gs.sum(base_point**2, axis=-1, keepdims=True)) ** 2
      ) / 4
  
      return base_point - gs.einsum(
          "...i,...j->...j", retraction_factor, tangent_vec
      )
  
imports: import math
  import geomstats.algebra_utils
  import geomstats.backend
  from geomstats.geometry._hyperbolic import _Hyperbolic
  from geomstats.geometry.base import VectorSpaceOpenSet
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 6 for calling the PoincareBallMetric obj's underlying member method code with example usage: obj.retraction(tangent_vec, base_point) and returns: unknown