55bef1eea344a530ebda48d1a5d0c2456f0c3fc1,methods/shogun/nbc.py,SHOGUN_NBC,__init__,#SHOGUN_NBC#,23
Before Change
self.data = load_dataset(method_param["datasets"], ["csv"])
self.data_split = split_dataset(self.data[0])
self.build_opts = {}
if "algorithm" in method_param:
self.build_opts["solver"] = str(method_param["algorithm"])
if "epsilon" in method_param:
self.build_opts["epsilon"] = float(method_param["epsilon"])
if "max_iterations" in method_param:
self.build_opts["max_iter"] = int(method_param["max_iterations"])
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):
return self.info
After Change
@param run_param - Path option for executing the benckmark. Not used for
Shogun.
"""
def __init__(self, method_param, run_param):
self.info = "SHOGUN_NBC (" + 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.solver = "auto"
if "solver" in method_param:
self.solver = str(method_param["solver"])
"""
Return information about the benchmarking instance.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 22
Instances
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: 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__