Orange Forum • View topic - Create dataset without orange.ExampleTable('file')

Create dataset without orange.ExampleTable('file')

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

Create dataset without orange.ExampleTable('file')

Postby aonlazio » Tue Mar 24, 2009 11:44

I have some issue with creating dataset.
I want to create a data object without using orange.ExampleTable() method since this method requires a file as an input

for example:
If I'd like to create data object from these objects
a = [ [0, 1, 1], [0, 1, 0], [1, 1, 0] ] #Feature Vectors
b = [ 0, 2, 1] #Class list corresponding to each vector in a

I want to do something like
data = ConstructDataset(a,b)

but I don't know whether orange has the function like that or not because all I saw in the tutorial is that all data objects are constructed using orange.ExampleTable('file')

Thanks in advance


Postby eiei » Thu Mar 26, 2009 9:22


Postby Blaz » Sat Mar 28, 2009 18:04

Example tables do not need to be read from file, they can easily constructed from the code. See documentation for ExampleTable class. Quite often you would mix the two concepts, and read the ExampleTable from the file, then remove some attributes and construct some new attributes (both in code).

Return to Questions & Support