Orange Forum • View topic - Test Learners vs Data Sampler

Test Learners vs Data Sampler

A place to ask questions about methods in Orange and how they are used and other general support.

Test Learners vs Data Sampler

Postby oleczek » Tue Jan 24, 2012 18:18

Hi

Do I have to use Data Sampler, if there are similar options in Test Learners?

What is the proper way of connecting elements: input (file), test-learners, classification-tree, c4.5?

I would like to be able to learn trees from sample prepared by data sampler and then test them with the rest of the dataset.

I have tried with both presented setups, but I am not sure which is correct or maybe both or maybe none? :)

My initial setups I was trying to deploy: http://imgur.com/6pyvi

Setup on the left - I am not sure if it works.
Setup on the right makes the "test on test data" inactive, until I double click the connection and add new line (not sure if correctly).

This is how I connect data sampler and test learners: http://imgur.com/Pzz4r

Then, the setup on the right looks like this: http://imgur.com/N4jRy

Unfortunately, when the option "test on test data" becomes active (in test learners), when I click it, I receive an error:

Code: Select all
There were problems importing the following widgets:
   OWModelMap: No module named scipy.stats
   OWRScript: No module named rpy2.robjects
   OWLinearRegression: No module named scipy.stats
   OWDiscretizeQt: No module named orangeqt
   OWDistributionsQt: No module named orangeqt
   OWLinProj3D: No module named orangeqt
   OWLinProjQt: No module named orangeqt
   OWMDSQt: No module named orangeqt
   OWModelMapQt: No module named scipy.stats
   OWNxExplorer3D: No module named orangeqt
   OWNxExplorerQt: No module named orangeqt
   OWParallelCoordinatesQt: No module named orangeqt
   OWPolyvizQt: No module named orangeqt
   OWRadvizQt: No module named orangeqt
   OWScatterPlot3D: No module named orangeqt
   OWScatterPlotQt: No module named orangeqt
   OWSphereviz3D: No module named orangeqt
   OWMoleculeVisualizer: need more than 1 value to unpack
   OWANOVA: No module named scipy.stats
   OWApproxProfiles: No module named scipy.stats
   OWDataDistance: No module named qt
   OWExampleSelector: No module named qttable
   OWHypTest: No module named qt
The following widgets could not be imported and will not be available: OWSphereviz3D, OWModelMapQt, OWParallelCoordinatesQt, OWLinProj3D, OWScatterPlotQt, OWNxExplorer3D, OWRadvizQt, OWNxExplorerQt, OWMDSQt, OWMoleculeVisualizer, OWLinProjQt, OWLinearRegression, OWDistributionsQt, OWScatterPlot3D, OWDiscretizeQt, OWPolyvizQt.
The following prototype widgets could not be imported and will not be available: OWModelMap, OWRScript, OWANOVA, OWApproxProfiles, OWHypTest, OWExampleSelector, OWDataDistance.

Unhandled exception of type NameError occured at 18:11:41:
Traceback:
  File: OWTestLearners.py, line 148 in <lambda>
  Code: callback=lambda f=True: self.recompute(f))
    File: OWTestLearners.py, line 535 in recompute
    Code: self.score([l.id for l in self.learners.values()])
      File: OWTestLearners.py, line 327 in score
      Code: res = orngTest.learnAndTestOnTestData(learners, self.data, self.testdata, storeExamples = True, callback=pb.advance)
        File: testing.py, line 861 in learn_and_test_on_test_data
        Code: learnset, testset = preprocess_data(learnset, testset, preprocessors)
          NameError: global name 'preprocessors' is not defined


My platform is OS X Lion. Build Nov 3, 2011, v. 2.0b.

Thank you for your suggestions and help.

Regards,
oleczek

Re: Test Learners vs Data Sampler

Postby Ales » Wed Jan 25, 2012 12:20

Your last setup is the correct one.

Unfortunately the learner testing module in Orange recently underwent some refactoring, which temporarily introduced some errors in the code. The error you received should be fixed in the latest snapshot. Can you update your Orange installation?

Re: Test Learners vs Data Sampler

Postby oleczek » Wed Jan 25, 2012 17:18

Hello!

Thank you very much. I can now confirm that it works!

BTW: The link, that is displayed when informing about C4.5 is to be installed is not valid anymore.

Thanks one more time.

Regards,
Oleczek


Return to Questions & Support