Derive a new attribute
Contemno
New Altair Community Member
Hello there.
How can I derive a new atrribute from a given one?
For example:
atrribute A with the values high, medium, low
new attribute B with T or F
derive like this: high -> T / medium & low -> F
Thanks for any help in advance.
Greetings,
Sebastian
How can I derive a new atrribute from a given one?
For example:
atrribute A with the values high, medium, low
new attribute B with T or F
derive like this: high -> T / medium & low -> F
Thanks for any help in advance.
Greetings,
Sebastian
Tagged:
0
Answers
-
Hi Sebastian,
this could be done easily by a combination of the two operators "AttributeCopy" and "AttributeValueMapper". For your problem copy attribute A to the new attribute B. Then use the Mapping Operator on Attribute B by typing B into parameter attributes. Map value high to T, medium to F and low to F.
Greetings,
Sebastian, too0 -
Thank you for your answer.
But it is not what I'm looking for. I've allready tried it that way.
The problem is the following. I need three knots to map the old attribute on the new one.
The result is, that the first attribute "high" is mapped correctly to T and the second "medium" correctly to F. The values of the third attribute were mapped correctly to F but the parameter value "low" isn't deleted. So I've got the values T, F and Low. Low accurs zero times.
But I need an atrribute with only the values T and F.
I hope thats understandable.
Greets0 -
To be honest: It wasn't understandable
Lets figure it out: You said you have an attribute A with three different values. Attributes are the columns in the data view, values are the entries in the cells of the dataview. If thats the case, my suggestion should work quite well.
If you have really three different attributes, you have a problem, since theres no possibility to solve your problem easily, as far as I know.
Greetings,
Sebastian0 -
Hi Sebastian (Comtemno ;-)),
as far as I understand you, all works well with the exception, that the resulting attribute after the mapping still has a value "low" as can be seen from the meta data view, but it occurs zero times. Is that right? Then what is the problem, since an occurance frequency of zero does not hurt in any subsequent analysis, although I agree that it would be nice to delete this attribute value from the attribute domain since it does not occur in the examples any more. This is however not possible with the AttributeValueMapper. But eventually we extend this operator for the next release.
Regards,
Tobias0 -
Hello Tobias.
Yes, you are right.
The occurrence of the value "low" becomes a problem, when creating a decisiontree.
The value is splitting a knot. So the value "low" is an extra knot. With zero attributes in it, of course.
Would be nice if theres a knot in RapidMiner soon that solves this problem.
Greets0 -
Hello,
I could be mistaken but it might be that there already is such an operator: the operator "GuessValueTypes" guesses all value types of the attributes but it also performs some "clean-up" by removing empty, i.e. non-used, nominal values.
Cheers,
Ingo0