Options

Creating If Statements in RapidMiner

MaureenMaureen Member Posts: 1 Contributor I
edited November 2018 in Help
The problem I face is what algorithm is the best one to use for my experiment.


iHi,

I am new to RapidMiner and would like to know if there is a way to create your own rules within the application.

I have imported a CSV file and tried all the built in algorithms but none of them give me what I need to achieve.  My problem is outlined below, which I can achieve using excel if I need to.

Rule 1: Using election data, see if candidates need to be in the frame after the first count.  That is if there are four seats in any election and 8 people running, the first 4 people after the first count win the election.  I refer to an Irish election where people can vote by preference meaning that they vote 1,2,3 etc.

The only way I can think of proving this, is to firstly sort the result column into ascending order and add a counter to the column.
If Rank  <= (Seats) and ActualResult <> Yes Then
    Concept Class = Win
    Rule Accuracy: 100%
ElseIf
    Rank <= (Seats) and Elected = No Then
    Concept Class = ExceptionToRule
ElseIf
  Concept Class = Loose
  Rule Accuracy: 100%
End If

Any help or guidlines of where I can find informaton on building my own mode would be greatly appreciated. :o

Answers

  • Options
    MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hi,

    you are right, that way it is doable:

    1. Sort the data with the Sort operator
    2. create an Id with Generate Id
    3. Use Generate Attributes to create a new attribute based on your rules

    Best,
    Marius
Sign In or Register to comment.