Orange Forum • View topic - Using new Data to test accuracy

Using new Data to test accuracy

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

Using new Data to test accuracy

Postby julianogv » Thu Nov 22, 2012 20:45

Hi, a simple question:

I have:

Code: Select all
import orange, orngTree
data = orange.ExampleTable("voting")

tree = orngTree.TreeLearner(data, sameMajorityPruning=1, mForPruning=2)
p = tree(data[0], orange.GetProbabilities)


Ok, everything is all right until here, but, what if I want to use a new input to test my classifier with a input that do not exists on voting.tab?

suppose that I've the following input:
republican n n n y y y n y y y y y y n y

how can I create a new data object with this new input without loading it from a file like
"data = orange.ExampleTable("voting")" ?

Thanks.

Re: Using new Data to test accuracy

Postby Ales » Mon Nov 26, 2012 9:49

Code: Select all
orange.Example(data.domain, ["n", "n", "n", "y", "y", "y", "n", "y", "y", "y", "y", "y", "y", "n", "y", "y", "republican"])

Re: Using new Data to test accuracy

Postby julianogv » Tue Nov 27, 2012 13:46

This is exactly what I was looking for, Thanks.


Return to Questions & Support



cron