class_docstr: Sammon mapping function
docstr: Mapping problem defined in
  Machine Learning and Data Analysis (MLDA) Problem Set v1.0, Gallagher et al., 2018, PPSN
  https://drive.google.com/file/d/1fc1sVwoLJ0LsQ5fzi4jo3rDJHQ6VGQ1h/view
  
  Parameters
  ----------
  name: str
      name of the dataset (initially among "Virus", "Employees", but Employees dataset is not
      available online anymore)
  
  Notes
  -----
  - "Virus" dataset is P3.a and "Employees" dataset is P3.b
  - for "Employees", we use the online proximity matrix
  - for "Virus", we compute a proximity matrix from raw data (no normalization)
docstr_tok: ["Mapping","problem","defined","in","Machine","Learning","and","Data","Analysis","(","MLDA",")","Problem","Set","v1.0",",","Gallagher","et","al.",",","2018",",","PPSN","https",":","\/\/drive.google.com\/file\/d\/1fc1sVwoLJ0LsQ5fzi4jo3rDJHQ6VGQ1h\/view","Parameters","--","--","--","--","--","name",":","str","name","of","the","dataset","(","initially","among","``","Virus","''",",","``","Employees","''",",","but","Employees","dataset","is","not","available","online","anymore",")","Notes","--","--","-","-","``","Virus","''","dataset","is","P3.a","and","``","Employees","''","dataset","is","P3.b","-","for","``","Employees","''",",","we","use","the","online","proximity","matrix","-","for","``","Virus","''",",","we","compute","a","proximity","matrix","from","raw","data","(","no","normalization",")"]
code: def from_mlda(
      cls, name: str, rescale: bool = False
  ) -> "SammonMapping":
      """Mapping problem defined in
      Machine Learning and Data Analysis (MLDA) Problem Set v1.0, Gallagher et al., 2018, PPSN
      https://drive.google.com/file/d/1fc1sVwoLJ0LsQ5fzi4jo3rDJHQ6VGQ1h/view
  
      Parameters
      ----------
      name: str
          name of the dataset (initially among "Virus", "Employees", but Employees dataset is not
          available online anymore)
  
      Notes
      -----
      - "Virus" dataset is P3.a and "Employees" dataset is P3.b
      - for "Employees", we use the online proximity matrix
      - for "Virus", we compute a proximity matrix from raw data (no normalization)
      """
      assert name in ["Virus", "Employees"], f"Unkwnown name {name}"
      assert (
          name != "Employees"
      ), "The Employees dataset is not available anymore"
      raw_data: pd.DataFrame = datasets.get_data(name)  # type: ignore
      if name == "Employees":
          if rescale:
              raise ValueError("Impossible to rescale with 'Employees'")
          proximity = np.array(
              raw_data.iloc[:, 1:], dtype=float
          )  # this is alreary the proximity matrix
          # in this proximity matrix, (5, 31) and (8, 41) are identical
      else:
          if rescale:
              raw_data -= np.mean(raw_data, axis=0, keepdims=True)
              raw_data /= np.std(raw_data, axis=0, keepdims=True)
          proximity = scipy.spatial.distance_matrix(
              raw_data, raw_data
          )  # for Virus, the proximity matrix must be computed
      pb = cls(proximity)
      pb.add_descriptors(name=name, rescale=rescale)
      return pb
  
imports: import numpy
  import pandas
  import scipy.spatial
  from nevergrad.parametrization import parameter
  import nevergrad.common.typing
  from ..base import ExperimentFunction
  from .None import datasets
label_desc: Use image node_id 2 for calling the SammonMapping obj's underlying member method code with example usage: obj.from_mlda(cls, name, rescale) and returns: pb