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
AttrbuteCreation IF Syntax
Hi,
I tried to make an Operator that creates a new Attribute (e.g. CLASS) that is "ACTIVE" for entries with an (numerical) activity higher than 50 and "INACTIVE" for entries with an activity below 50.
My first attempt was using the AttributeConstruction Operator, but I couldn't figre out how I make a function that distinguishes between actives and inactives.
Can anybody help me with this?
Thanks in advance.
Markus
I tried to make an Operator that creates a new Attribute (e.g. CLASS) that is "ACTIVE" for entries with an (numerical) activity higher than 50 and "INACTIVE" for entries with an activity below 50.
My first attempt was using the AttributeConstruction Operator, but I couldn't figre out how I make a function that distinguishes between actives and inactives.
Can anybody help me with this?
Thanks in advance.
Markus
0
Answers
the AttributeConstruction Operator is the right tool to achieve this. Here's how it works: Greetings,
Sebastian
That works great for an active/inactive switch. But what if I want more than two categories. For example I want to distinguish between low, medium, heavy and very heavy depending on the activity. So I have boundaries for each category. Do I have to nest some if clauses, is there a way to program multiple switches or is there a special operator that does the classification for me.
As always thx in advance.
Markus
take a look at the UserBasedDiscretization. This should solve your problems...
Greetings,
Sebastian
So I figures out that this code will do the classification I want: I put a AttributeSubsetPreprocessing Operator in front, because I don't want to cluster all (numeric) columns. This works fine, but actually it removes all other column although the option for "keep subset only" is not checked.
So how do I classify according to one column and just change this one column without removing all others?
Best wishes,
Markus
it doesn't do this. Since there was a breakpoint within the AttributeSubsetPreprocessing, I assume, that you have look at the data before the AttributeSubsetPreprocessing finished and merged the examplesets again.
Greetings,
Sebastian
Markus
Again I searched for an appropriate Operator but I couldn't find it.
Best wishes,
Markus
each learner needs a labeled example set. If your new attribute should be the label, use ChangeAttributeRole Operator to define this attribute as label. This is then the target of the ongoing analysis.
Greetings,
Sebastian
Cubist (by Rulequest) is doing something like this (at least as far as I understand) and I want to implement this with RM.
Best wishes,
Markus
each learner produces a model. You then might apply this model onto an exampleset by using trara...the "ModelApplier".
Since it doesn't make much sense applying a model on the training data, this isn't done automatically.
Greetings,
Sebastian
Best wishes,
Markus