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
Predicting ints on titanic dataset.
VenomSwitch
Member Posts: 5 Learner III
Excuse my noob level of understanding please, I'm brand new.
I am trying to predict mortality on the titanic dataset using cross-validation and linear regression. As you can only use numbers with linear regression, I have converted selected attributes (such as survived) using the 'nominal to numerical' operator. I can see it is working most of the time from looking at the data and rounding it to 1 or 0 however the predicted value is coming back as a double so it's showing as 0 correct predictions.
I suppose my question is how do I make rapidminer return an int instead of a double? I have tried using the 'real to integer' operator but it doesn't like me putting it anywhere!
Open to any suggestions.
1
Best Answer
-
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data ScientistHi,First, if you use a GLM operator it can handle binominal data. it uses the same trick you are doing here but without any hazzle for you.Then, why exactly do you want a int over a double?Anyway, one way to do it is to use Generate Attributes with
round([prediction(Survived=Yes)])
Best,Martin- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany8
Answers
Dortmund, Germany
Dortmund, Germany
Dortmund, Germany