35808c2edf30be03ad2bec8264f64ef327fab050,methods/scikit/linear_ridge_regression.py,LinearRidgeRegression,RunMetrics,#LinearRidgeRegression#Any#,118

Before Change


      return metrics_dict

    else:
      Log.Fatal("This method requires three datasets.")

After Change


  def RunMetrics(self, options):
    Log.Info("Perform Linear Ridge Regression.", self.verbose)

    results = self.LinearRidgeRegressionScikit(options)
    if results < 0:
      return results

    // Datastructure to store the results.
    metrics = {"Runtime" : results}

    if len(self.dataset) >= 3:

      trainData, labels = SplitTrainData(self.dataset)

      testData = LoadDataset(self.dataset[1])
      truelabels = LoadDataset(self.dataset[2])
      alpha = re.search("-t (\d+)", options)
      alpha = 1.0 if not alpha else int(alpha.group(1))

      predictedlabels = np.rint(self.BuildModel(trainData, labels, alpha=alpha).predict(testData))

      SimpleMSE = Metrics.SimpleMeanSquaredError(truelabels, predictedlabels)
      metrics["Simple MSE"] = SimpleMSE

    return metrics
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 8

Instances


Project Name: mlpack/benchmarks
Commit Name: 35808c2edf30be03ad2bec8264f64ef327fab050
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/scikit/linear_ridge_regression.py
Class Name: LinearRidgeRegression
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: 35808c2edf30be03ad2bec8264f64ef327fab050
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/scikit/linear_regression.py
Class Name: LinearRegression
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: 35808c2edf30be03ad2bec8264f64ef327fab050
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/scikit/logistic_regression.py
Class Name: LogisticRegression
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: 0412c274d494a63090d8acd15f1cf97f7791cbcc
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/shogun/lasso.py
Class Name: LASSO
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: 0412c274d494a63090d8acd15f1cf97f7791cbcc
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/shogun/logistic_regression.py
Class Name: LogisticRegression
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: 0412c274d494a63090d8acd15f1cf97f7791cbcc
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/shogun/linear_regression.py
Class Name: LinearRegression
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: 6b4cb961e16a69bce108f49872465329b1e3bcec
Time: 2016-07-11
Author: marcus.edel@fu-berlin.de
File Name: methods/mlpy/linear_regression.py
Class Name: LinearRegression
Method Name: RunMetrics