orange-multitarget / docs / rst / code /

import Orange

data ='multitarget-synthetic')

majority = Orange.multitarget.binary.BinaryRelevanceLearner(learner=Orange.classification.majority.MajorityLearner(), name='Majority')
tree = Orange.multitarget.tree.ClusteringTreeLearner(min_MSE=1e-10, min_instances=3, name='Clust Tree')
pls = Orange.multitarget.pls.PLSRegressionLearner(name='PLS')
earth ='Earth')

learners = [majority, tree, pls, earth]
res = Orange.evaluation.testing.cross_validation(learners, data)
rmse = Orange.evaluation.scoring.RMSE
scores = Orange.multitarget.scoring.mt_average_score(
            res, rmse, weights=[5,2,2,1])
print 'Weighted RMSE scores:'
print '\n'.join('%12s\t%.4f' % r for r in zip(res.classifier_names, scores))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.