bfbc7582aa9e6a3e1fde6679663232f1f3f1d1fa,methods/shogun/lda.py,SHOGUN_LDA,__init__,#SHOGUN_LDA#Any#Any#,23

Before Change


    if "store" in method_param:
      self.store = bool(method_param["store"])

    distinct_labels = list(set(self.data_split[1]))
    mapping = {}
    self.reverseMapping = {}
    idx = 0
    for label in distinct_labels:
      mapping[label] = idx
      self.reverseMapping[idx] = label
      idx += 1
    for i in range(len(self.data_split[1])):
      self.data_split[1][i] = mapping[self.data_split[1][i]]

    self.train_feat = RealFeatures(self.data_split[0].T)
    self.train_labels = MulticlassLabels(self.data_split[1])
    self.test_feat = RealFeatures(self.data[1].T)

  def __str__(self):

After Change


  @param run_param - Path option for executing the benchmark. Not used for
  Shogun.
  """
  def __init__(self, method_param, run_param):
    self.info = "SHOGUN_LDA ("  + str(method_param) +  ")"

    // Assemble run model parameter.
    self.data = load_dataset(method_param["datasets"], ["csv"])
    self.data_split = split_dataset(self.data[0])

    self.train_feat = RealFeatures(self.data_split[0].T)

	// Encode the labels into {0,1,2,3,......,num_classes-1}
    self.train_labels, self.label_map = label_encoder(self.data_split[1])
    self.train_labels = MulticlassLabels(self.train_labels)

    if len(self.data) >= 2:
      self.test_feat = RealFeatures(self.data[1].T)

    self.tolerance = 1e-4
    if "tolerance" in method_param:
      self.tolerance = float(method_param["tolerance"])

    self.store_cov = False
    if "store-covar" in method_param:
      self.store_cov = bool(method_param["store-covar"])

    self.solver = "auto"
    if "solver" in method_param:
      self.solver = str(method_param["solver"])

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 21

Instances


Project Name: mlpack/benchmarks
Commit Name: bfbc7582aa9e6a3e1fde6679663232f1f3f1d1fa
Time: 2019-04-24
Author: rukman.sai2@gmail.com
File Name: methods/shogun/lda.py
Class Name: SHOGUN_LDA
Method Name: __init__


Project Name: mlpack/benchmarks
Commit Name: bfbc7582aa9e6a3e1fde6679663232f1f3f1d1fa
Time: 2019-04-24
Author: rukman.sai2@gmail.com
File Name: methods/shogun/lda.py
Class Name: SHOGUN_LDA
Method Name: __init__


Project Name: mlpack/benchmarks
Commit Name: 55bef1eea344a530ebda48d1a5d0c2456f0c3fc1
Time: 2019-04-24
Author: rukman.sai2@gmail.com
File Name: methods/shogun/nbc.py
Class Name: SHOGUN_NBC
Method Name: __init__


Project Name: mlpack/benchmarks
Commit Name: 18530bab8f49b7a40a4d8793d4b6b5090941c3e7
Time: 2019-04-24
Author: rukman.sai2@gmail.com
File Name: methods/shogun/qda.py
Class Name: SHOGUN_QDA
Method Name: __init__