Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #366 from karlnapf/master
added print_modsel_params method
- Loading branch information
Showing
18 changed files
with
327 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
examples/undocumented/python_modular/evaluation_meansquaredlogerror_modular.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from tools.load import LoadMatrix | ||
from numpy import random | ||
lm=LoadMatrix() | ||
|
||
N = 100 | ||
|
||
random.seed(17) | ||
ground_truth = abs(random.randn(N)) | ||
predicted = abs(random.randn(N)) | ||
|
||
parameter_list = [[ground_truth,predicted]] | ||
|
||
def evaluation_meansquarederror_modular(ground_truth, predicted): | ||
from shogun.Features import Labels | ||
from shogun.Evaluation import MeanSquaredLogError | ||
|
||
ground_truth_labels = Labels(ground_truth) | ||
predicted_labels = Labels(predicted) | ||
|
||
evaluator = MeanSquaredLogError() | ||
mse = evaluator.evaluate(predicted_labels,ground_truth_labels) | ||
|
||
return mse | ||
|
||
|
||
if __name__=='__main__': | ||
print 'MeanSquaredLogError' | ||
evaluation_meansquarederror_modular(*parameter_list[0]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.