Replies: 1 comment
-
You still need to create a new table with the new domain. It would look approximately like:
Now you would get a new table with still empty values. But then you could edit new_data.Y to fill the values in, with Please read the docs at https://orange3.readthedocs.io/projects/orange-data-mining-library/en/latest/tutorial/data.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
i want to change the domain of a DataTable by adding a target-column.
The problem is : they added a new column, but not the values.
code:
data=copy.deepcopy(in_data)
print(data)
<< [[1.0, 2, 5, 3, 3, 9],
<< [1.0, 5, 10, 2, 4, 9],
<< [3.0, 5, 2, 5, 1, 1],
<< [0.9, 4, 5, 8, 8, 5]]
print(data.domain)
<<[ Jan, Feb, März, Apr, Mai, Juni]
#now add the new target
target_values=('L','kk','24','5')
a=DiscreteVariable(name="KOOO",values=(target_values))
#now add it
data.domain.init(attributes=data.domain.attributes,class_vars=a)
print(daten)
<<[[1.0, 2, 5, 3, 3, 9 | ],
<< [1.0, 5, 10, 2, 4, 9 | ],
<<[3.0, 5, 2, 5, 1, 1 | ],
<<[0.9, 4, 5, 8, 8, 5 | ]]
Beta Was this translation helpful? Give feedback.
All reactions