Commits

Miran Levar committed a0f896d

Shortened some lines in code examples.

  • Participants
  • Parent commits 7b1772c

Comments (0)

Files changed (5)

File docs/rst/code/binary.py

 
 data = Orange.data.Table('multitarget:bridges.tab')
 
-cl1 = Orange.multitarget.binary.BinaryRelevanceLearner(learner = Orange.classification.majority.MajorityLearner, name="Binary - Maj")
-cl2 = Orange.multitarget.binary.BinaryRelevanceLearner(learner = Orange.classification.tree.SimpleTreeLearner, name="Binary - Tree")
+cl1 = Orange.multitarget.binary.BinaryRelevanceLearner( \
+	learner = Orange.classification.majority.MajorityLearner, name="Binary - Maj")
+cl2 = Orange.multitarget.binary.BinaryRelevanceLearner( \
+	learner = Orange.classification.tree.SimpleTreeLearner, name="Binary - Tree")
 
 learners = [cl1,cl2]
 

File docs/rst/code/chain.py

 
 data = Orange.data.Table('multitarget:bridges.tab')
 
-cl1 = Orange.multitarget.chain.ClassifierChainLearner(learner = Orange.classification.majority.MajorityLearner, name="CChain - Maj")
-cl2 = Orange.multitarget.chain.ClassifierChainLearner(learner = Orange.classification.tree.SimpleTreeLearner, name="CChain - Tree")
-cl3 = Orange.multitarget.chain.EnsembleClassifierChainLearner(learner = Orange.classification.tree.SimpleTreeLearner, n_chains=50, sample_size=0.25, name="Ensemble CC - Tree")
+cl1 = Orange.multitarget.chain.ClassifierChainLearner( \
+	learner = Orange.classification.majority.MajorityLearner, name="CChain - Maj")
+cl2 = Orange.multitarget.chain.ClassifierChainLearner( \
+	learner = Orange.classification.tree.SimpleTreeLearner, name="CChain - Tree")
+cl3 = Orange.multitarget.chain.EnsembleClassifierChainLearner( \
+	learner = Orange.classification.tree.SimpleTreeLearner, n_chains=50, sample_size=0.25, name="Ensemble CC - Tree")
 
 learners = [cl1,cl2,cl3]
 

File docs/rst/code/mt-evaluate.py

 
 data = Orange.data.Table('multitarget-synthetic')
 
-majority = Orange.multitarget.binary.BinaryRelevanceLearner(learner=Orange.classification.majority.MajorityLearner(), name='Majority')
+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 = Orange.multitarget.earth.EarthLearner(name='Earth')

File docs/rst/code/scoring.py

 
 data = Orange.data.Table('multitarget:bridges.tab')
 
-cl1 = Orange.multitarget.binary.BinaryRelevanceLearner(learner = Orange.classification.majority.MajorityLearner, name="Majority")
+cl1 = Orange.multitarget.binary.BinaryRelevanceLearner( \
+    learner = Orange.classification.majority.MajorityLearner, name="Majority")
 cl2 = Orange.multitarget.tree.ClusteringTreeLearner(name="CTree")
 
 learners = [cl1,cl2]
 
 results = Orange.evaluation.testing.cross_validation(learners, data)
 
-print "%18s  %7s    %6s  %10s   %8s  %8s" % ("Learner    ", "LogLoss", "Brier", "Inf. Score", "Mean Acc", "Glob Acc")
+print "%18s  %7s    %6s  %10s   %8s  %8s" % \
+("Learner    ", "LogLoss", "Brier", "Inf. Score", "Mean Acc", "Glob Acc")
 for i in range(len(learners)):
     print "%18s   %1.4f    %1.4f     %+2.4f     %1.4f    %1.4f" % (learners[i].name,
 
     # Calculate average logloss
-    Orange.multitarget.scoring.mt_average_score(results, Orange.evaluation.scoring.logloss)[i],
+    Orange.multitarget.scoring.mt_average_score(results, \
+        Orange.evaluation.scoring.logloss)[i],
     # Calculate average Brier score
-    Orange.multitarget.scoring.mt_average_score(results, Orange.evaluation.scoring.Brier_score)[i],
+    Orange.multitarget.scoring.mt_average_score(results, \
+        Orange.evaluation.scoring.Brier_score)[i],
     # Calculate average Information Score
-    Orange.multitarget.scoring.mt_average_score(results, Orange.evaluation.scoring.IS)[i],
+    Orange.multitarget.scoring.mt_average_score(results, \
+        Orange.evaluation.scoring.IS)[i],
     # Calculate mean accuracy
     Orange.multitarget.scoring.mt_mean_accuracy(results)[i],
     # Calculate global accuracy

File rdt_requirements

-distutils
-distribute >=0.6.26
 -e hg+http://bitbucket.org/biolab/orange#egg=Orange