Orange Forum • View topic - using domain to construct continuous data

## using domain to construct continuous data

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

### using domain to construct continuous data

From the document we learnt how to construct discrete data using domain.
Quote:
Code: Select all
`import orange, randomclassattr = orange.EnumVariable("y", values = ["0", "1"])card = [3, 3, 2, 3, 4, 2]values = ["1", "2", "3", "4"]attributes = [  orange.EnumVariable(chr(97+i),                values = values[:card[i]])              for i in range(6)]domain = orange.Domain(attributes + [classattr])loe = [    ["3", "1", "1", "2", "1", "1",  "1"],    ["3", "1", "1", "2", "2", "1",  "0"],    ["3", "3", "1", "2", "2", "1",  "1"]]data = orange.ExampleTable(domain, loe)`

but I have trouble trying to create a continuous data using the similar method. When I use a existing continuous domain and try to create data by adding one value. I will get
[#RNGE, #RNGE, #RNGE, #RNGE, #RNGE, 'act'] when print data[0] for all the continuous part

Is there anyone who can solve my problem. Thank you

Can you explain in more detail how you use the existing domain and construct the data from it. A code example that produces the output would be helpful.

Thanks Ales for trying to help me

I have solved the problem. Just use floatVariable instead of enumVariable to generate a floating domain.