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
Please guide me. I am stuck in a very minor problem :( HELP
HI,
I am a final year student of master's of engineering in computer science & currently doing thesis work in Association rule data mining. I am stuck in a small problem regarding rapid miner. I want to apply FP- growth algorithm on 2 simple java programs using rapid miner to find Association rules, but i am not able to do so. :-[
I want to apply FP growth algorithm on 2 java programs and find the association rules from them.
What i have done till now:-
1. Saved the two programs in .txt files (Copied programs to notepad and saved it as program1.txt and program2.txt)
2. Selected the Process document from Files operator in rapid miner.
3. Then applied Tokenize operator, Filter token , Stem(snowball) and Transform cases operator [for processing the text].
4. After processing the text , I used Numerical to Binomial conversion operator.
5. After it, I aplied FP growth operator and lastly Create association rules operator.
6. Linked everything correctly.
All these steps were followed but "No rules found" comes up everytime.
I tried the same procedure on a group of six simple C programs and it worked well. Rules were also framed well
. I don't understand why it is not working for two Java programs. If anybody there can help and guide me, i would be more than grateful.
The 2 java programs I am taking as input are stated below:
Program 1 :-
package codeclone;
import java.util.Scanner;
public class Example1 {
public static void main(String[] args) {
int input;
System.out.println("The super insano calculator");
System.out.println("enter the corresponding number:");
Scanner reader3 = new Scanner(System.in);
System.out.println("1. Add | 2. Subtract | 3. Divide | 4.Multiply");
input=reader3.nextInt();
int a , b;
Scanner reader = new Scanner(System.in);
System.out.println("Enter the first number");
//get user input for a
a=reader.nextInt();
Scanner reader1 = new Scanner(System.in);
System.out.println("Enter the second number");
//get user input for a
b=reader1.nextInt();
switch (input){
case 1: System.out.println(a + " plus " + b + " equals " + add(a, b)); break;
case 2: System.out.println(a + " minus " + b + " equals " + subtract(a, b)); break;
case 3: System.out.println(a + " divided by " + b + " equals " + divide(a, b)); break;
case 4: System.out.println(a + " times " + b + " equals " + multiply(a, b)); break;
default: System.out.println("your input is invalid!"); break;
}
}
public static int add(int first, int second) {
return first + second;
}
public static int subtract(int first, int second) {
return first - second;
}
public static int divide(int first, int second) {
return first / second;
}
public static int multiply(int first, int second) {
return first * second;
}
}
Program 2 :-
package codeclone;
import java.util.Scanner;
public class Example2 {
public static void main(String[] args) {
int input;
System.out.println("The super insano calculator");
System.out.println("enter the corresponding number:");
Scanner reader3 = new Scanner(System.in);
System.out.println("1. Add | 2. Subtract | 3. Divide | 4.Multiply");
input=reader3.nextInt();
int c , d;
Scanner reader = new Scanner(System.in);
System.out.println("Enter the first number");
//get user input for c
c=reader.nextInt();
Scanner reader1 = new Scanner(System.in);
System.out.println("Enter the second number");
//get user input for d
d=reader1.nextInt();
switch (input){
case 1: System.out.println(c + " plus " + d + " equals " + ad(c, d)); break;
case 2: System.out.println(c + " minus " + d + " equals " + sub(c, d)); break;
case 3: System.out.println(c + " divided by " + d + " equals " + div(c, d)); break;
case 4: System.out.println(c + " times " + d + " equals " + mul(c, d)); break;
default: System.out.println("your input is invalid!"); break;
}
}
public static int ad(int fir, int sec) {
return fir + sec;
}
public static int sub(int fir, int sec) {
return fir - sec;
}
public static int div(int fir, int sec) {
return fir / sec;
}
public static int mul(int fir, int sec) {
return fir * sec;
}
}
Can anybody please tell me what's wrong and why i am not able to find association rules.
Thank you for your consideration. Hope I get the response soon. It is urgent. A video or if not then a little bit of guidance will also help. I shall be more than grateful.
Regards
Umang
I am a final year student of master's of engineering in computer science & currently doing thesis work in Association rule data mining. I am stuck in a small problem regarding rapid miner. I want to apply FP- growth algorithm on 2 simple java programs using rapid miner to find Association rules, but i am not able to do so. :-[
I want to apply FP growth algorithm on 2 java programs and find the association rules from them.
What i have done till now:-
1. Saved the two programs in .txt files (Copied programs to notepad and saved it as program1.txt and program2.txt)
2. Selected the Process document from Files operator in rapid miner.
3. Then applied Tokenize operator, Filter token , Stem(snowball) and Transform cases operator [for processing the text].
4. After processing the text , I used Numerical to Binomial conversion operator.
5. After it, I aplied FP growth operator and lastly Create association rules operator.
6. Linked everything correctly.
All these steps were followed but "No rules found" comes up everytime.
I tried the same procedure on a group of six simple C programs and it worked well. Rules were also framed well
. I don't understand why it is not working for two Java programs. If anybody there can help and guide me, i would be more than grateful.
The 2 java programs I am taking as input are stated below:
Program 1 :-
package codeclone;
import java.util.Scanner;
public class Example1 {
public static void main(String[] args) {
int input;
System.out.println("The super insano calculator");
System.out.println("enter the corresponding number:");
Scanner reader3 = new Scanner(System.in);
System.out.println("1. Add | 2. Subtract | 3. Divide | 4.Multiply");
input=reader3.nextInt();
int a , b;
Scanner reader = new Scanner(System.in);
System.out.println("Enter the first number");
//get user input for a
a=reader.nextInt();
Scanner reader1 = new Scanner(System.in);
System.out.println("Enter the second number");
//get user input for a
b=reader1.nextInt();
switch (input){
case 1: System.out.println(a + " plus " + b + " equals " + add(a, b)); break;
case 2: System.out.println(a + " minus " + b + " equals " + subtract(a, b)); break;
case 3: System.out.println(a + " divided by " + b + " equals " + divide(a, b)); break;
case 4: System.out.println(a + " times " + b + " equals " + multiply(a, b)); break;
default: System.out.println("your input is invalid!"); break;
}
}
public static int add(int first, int second) {
return first + second;
}
public static int subtract(int first, int second) {
return first - second;
}
public static int divide(int first, int second) {
return first / second;
}
public static int multiply(int first, int second) {
return first * second;
}
}
Program 2 :-
package codeclone;
import java.util.Scanner;
public class Example2 {
public static void main(String[] args) {
int input;
System.out.println("The super insano calculator");
System.out.println("enter the corresponding number:");
Scanner reader3 = new Scanner(System.in);
System.out.println("1. Add | 2. Subtract | 3. Divide | 4.Multiply");
input=reader3.nextInt();
int c , d;
Scanner reader = new Scanner(System.in);
System.out.println("Enter the first number");
//get user input for c
c=reader.nextInt();
Scanner reader1 = new Scanner(System.in);
System.out.println("Enter the second number");
//get user input for d
d=reader1.nextInt();
switch (input){
case 1: System.out.println(c + " plus " + d + " equals " + ad(c, d)); break;
case 2: System.out.println(c + " minus " + d + " equals " + sub(c, d)); break;
case 3: System.out.println(c + " divided by " + d + " equals " + div(c, d)); break;
case 4: System.out.println(c + " times " + d + " equals " + mul(c, d)); break;
default: System.out.println("your input is invalid!"); break;
}
}
public static int ad(int fir, int sec) {
return fir + sec;
}
public static int sub(int fir, int sec) {
return fir - sec;
}
public static int div(int fir, int sec) {
return fir / sec;
}
public static int mul(int fir, int sec) {
return fir * sec;
}
}
Can anybody please tell me what's wrong and why i am not able to find association rules.
Thank you for your consideration. Hope I get the response soon. It is urgent. A video or if not then a little bit of guidance will also help. I shall be more than grateful.
Regards
Umang
Tagged:
0
Answers
did you create the process in RapidMiner Studio? If so, can you please post the process XML? I guess you have tried lowering the min support/confidence for FPGrowth and Association Rules?
Regards,
Marco
just noticed you posted the the same topic in 4 different forums. Please don't do that, it just creates a mess and provides no benefit.
Topic continues here: http://rapid-i.com/rapidforum/index.php/topic,8585.0.html
Regards,
Marco