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
!Urgent! How to use map operator to map a numerical value in range to a string??
I'm using Titanic dataset, i want to map the ages value < 20 to be "Young", it doesn't work when i add map operator and choose this values:
replace what: < 20
replace by: young
Any body can help please?
replace what: < 20
replace by: young
Any body can help please?
Tagged:
0
Answers
Dortmund, Germany
Thanks for you reply,
I have to work on the same attribute later because its the label and to add a decision tree also..
Why we can't use Map operator to do the following:
< 20
Young
> 20
Old
do you have any idea please?
Thank you
Dortmund, Germany
I did GenAttr and gave it a name but the resulting decision tree then is not accurate!
I'm trying to use the Map operator for mapping the old value of the domain of integer to some words like young or old..
have you any idea about this method please?
Thank you
don't use the Map operator for this, it is simply not meant for it. Map is used for changing nominal values in existing nominal attributes. Age is not a nominal attribute, so Map is not appropriate for it.
Martin's Generate Attributes solution is what you need if you want to define age ranges.
Or you could use Discretize by User Specification:
Regards,
Balázs
Thank you for reply, but in this case the age between 20 and 40 which value will take? can you tell me this value for example?
age 25, age 30, age 35 ==?
this operator works by defining the upper boundary for the classes.
Leave the default "first: -Infinity" and "last: Infinity" as they are and then add your classes.
The example is set up like this:
0 - 20: young
> 20 - 40: middle
> 40 - 100: old
You can define your own boundaries. Read the help and look at the example process if necessary.
Regards,
Balázs