The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Changing data type of label
Hello everybody,
I am trying to change the data type from int to boolean of a CSV data source. When I apply Numerical2Binomial operator on the data, it converts the features but leaves the label. Thus I am unable to run Naive Bayes on it.
How can I change the data type of label to boolean (for classification tasks).
Thanks in advance.
I am trying to change the data type from int to boolean of a CSV data source. When I apply Numerical2Binomial operator on the data, it converts the features but leaves the label. Thus I am unable to run Naive Bayes on it.
How can I change the data type of label to boolean (for classification tasks).
Thanks in advance.
0
Answers
Suppose your data are:
label x1 x2
0 1 0.5
0 2 0.7
1 3 0.8
1 4 0.9
You can use the following code. Note that in the AttributeSubsetPreprocessing I've cheched "Process_Special_Attributes". Labels are special attributes.
It was really helpful.
Nice