class_docstr: Create an analysis model with the a top level Analysis containing all landmarks at the highest scale
  
  Parameters
  ----------
  hsne : HSne 
      The python HSne wrapper class
  embedder_type : :class:`hsne_analysis.EmbedderType`
      The embedder to be used when creating a new analysis CPU or GPU
      
  Examples
  --------
  Initialize a model using loaded :class:`HSne` data. 
  
  >>> import nptsne
  >>> model = nptsne.hsne_analysis.AnalysisModel(sample_hsne, nptsne.hsne_analysis.EmbedderType.CPU)
  >>> model.top_scale_id
  2
  
  Attributes
  ----------
  top_analysis
  analysis_container
  bottom_scale_id
  top_scale_id
  
  See Also
  --------
  hsne_analysis.Analysis
  hsne_analysis.EmbedderType.CPU
  
  Notes
  -----
  The hsne_analysis.AnalysisModel contains the user driven selections 
  when exploring an HSNE hierarchy. The AnalysisModel is created
  with a top level default hsne_analysis.Analysis containing all top level landmarks.
class_docstr_tok: ["Create","an","analysis","model","with","the","a","top","level","Analysis","containing","all","landmarks","at","the","highest","scale","Parameters","--","--","--","--","--","hsne",":","HSne","The","python","HSne","wrapper","class","embedder_type",":",":","class",":","`","hsne_analysis.EmbedderType","`","The","embedder","to","be","used","when","creating","a","new","analysis","CPU","or","GPU","Examples","--","--","--","--","Initialize","a","model","using","loaded",":","class",":","`","HSne","`","data",".",">",">",">","import","nptsne",">",">",">","model","=","nptsne.hsne_analysis.AnalysisModel","(","sample_hsne",",","nptsne.hsne_analysis.EmbedderType.CPU",")",">",">",">","model.top_scale_id","2","Attributes","--","--","--","--","--","top_analysis","analysis_container","bottom_scale_id","top_scale_id","See","Also","--","--","--","--","hsne_analysis.Analysis","hsne_analysis.EmbedderType.CPU","Notes","--","--","-","The","hsne_analysis.AnalysisModel","contains","the","user","driven","selections","when","exploring","an","HSNE","hierarchy",".","The","AnalysisModel","is","created","with","a","top","level","default","hsne_analysis.Analysis","containing","all","top","level","landmarks","."]
docstr: Add a new analysis based on a selection in a parent analysis
  
  Parameters
  ----------
  parent: Analysis
     The parent analysis
  
  parent_selection: ndarray<np.uint32>
     The selection indices in the parent analysis
     
  Examples
  --------
  Make a child analysis by selecting half of the points in the top analysis.
  The analysis is created at the next scale down is a child of the top level
  and contains an embedding of the right shape.
  
  >>> import nptsne
  >>> model = nptsne.hsne_analysis.AnalysisModel(sample_hsne, nptsne.hsne_analysis.EmbedderType.CPU)
  >>> sel = np.arange(int(model.top_analysis.number_of_points / 2))
  >>> analysis = model.add_new_analysis(model.top_analysis, sel)
  >>> analysis.scale_id
  1
  >>> analysis.parent_id == model.top_analysis.id
  True
  >>> analysis.embedding.shape == (analysis.number_of_points, 2)
  True
docstr_tok: ["Add","a","new","analysis","based","on","a","selection","in","a","parent","analysis","Parameters","--","--","--","--","--","parent",":","Analysis","The","parent","analysis","parent_selection",":","ndarray","<","np.uint32",">","The","selection","indices","in","the","parent","analysis","Examples","--","--","--","--","Make","a","child","analysis","by","selecting","half","of","the","points","in","the","top","analysis",".","The","analysis","is","created","at","the","next","scale","down","is","a","child","of","the","top","level","and","contains","an","embedding","of","the","right","shape",".",">",">",">","import","nptsne",">",">",">","model","=","nptsne.hsne_analysis.AnalysisModel","(","sample_hsne",",","nptsne.hsne_analysis.EmbedderType.CPU",")",">",">",">","sel","=","np.arange","(","int","(","model.top_analysis.number_of_points","\/","2",")",")",">",">",">","analysis","=","model.add_new_analysis","(","model.top_analysis",",","sel",")",">",">",">","analysis.scale_id","1",">",">",">","analysis.parent_id","==","model.top_analysis.id","True",">",">",">","analysis.embedding.shape","==","(","analysis.number_of_points",",","2",")","True"]
code: def add_new_analysis(self, parent, parent_selection):
      """Add a new analysis based on a selection in a parent analysis
  
      Parameters
      ----------
      parent: Analysis
         The parent analysis
  
      parent_selection: ndarray<np.uint32>
         The selection indices in the parent analysis
  
      Examples
      --------
      Make a child analysis by selecting half of the points in the top analysis.
      The analysis is created at the next scale down is a child of the top level
      and contains an embedding of the right shape.
  
      >>> import nptsne
      >>> model = nptsne.hsne_analysis.AnalysisModel(sample_hsne, nptsne.hsne_analysis.EmbedderType.CPU)
      >>> sel = np.arange(int(model.top_analysis.number_of_points / 2))
      >>> analysis = model.add_new_analysis(model.top_analysis, sel)
      >>> analysis.scale_id
      1
      >>> analysis.parent_id == model.top_analysis.id
      True
      >>> analysis.embedding.shape == (analysis.number_of_points, 2)
      True
      """
  
      analysis = Analysis(
          self.hsne, self.embedder_type, parent, parent_selection
      )
      self._analysis_container.add_analysis(analysis)
      return analysis
  
file_path: nptsne/src/nptsne/hsne_analysis/analysis_model.py
imports: from ..libs._nptsne._hsne_analysis import EmbedderType, Analysis
  import numpy
label_desc: Use image node_id 4 for calling the AnalysisModel obj's underlying member method code with example usage: obj.add_new_analysis(parent, parent_selection) and returns: analysis