Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Solved

Posted on 2011-03-03

I try to use NNGE algorithm.

When I input this data (one column per day, and range of hours 0-4 for testing just now)

@relation pattern

@attribute hour real

@attribute class {open,closed}

@data

0,closed

1,closed

2,closed

3,closed

4,closed

0,closed

1,closed

2,closed

3,closed

4,closed

I get the correct result class closed IF : 0.0<=hour<=4.0 (10)

If I input this data:

@relation pattern

@attribute hour real

@attribute class {open,closed}

@data

0,closed

1,closed

2,closed

3,closed

4,closed

0,closed

1,open

2,closed

3,closed

4,closed

I get the correct results as well

class closed IF : 2.0<=hour<=4.0 (6)

class open IF : hour=1.0 (1)

class closed IF : hour=0.0 (2)

But when I input this data

@relation pattern

@attribute hour real

@attribute class {open,closed}

@data

0,closed

1,open

2,closed

3,closed

4,closed

0,closed

1,closed

2,closed

3,closed

4,closed

Weka doesn't pick up the open time in day 1 it only picks up open days from the very last day.

class closed IF : 2.0<=hour<=4.0 (6)

class closed IF : 0.0<=hour<=1.0 (3)

Why is this happening? I the layout of the data is wrong but how to sort it out.

When I input this data (one column per day, and range of hours 0-4 for testing just now)

@relation pattern

@attribute hour real

@attribute class {open,closed}

@data

0,closed

1,closed

2,closed

3,closed

4,closed

0,closed

1,closed

2,closed

3,closed

4,closed

I get the correct result class closed IF : 0.0<=hour<=4.0 (10)

If I input this data:

@relation pattern

@attribute hour real

@attribute class {open,closed}

@data

0,closed

1,closed

2,closed

3,closed

4,closed

0,closed

1,open

2,closed

3,closed

4,closed

I get the correct results as well

class closed IF : 2.0<=hour<=4.0 (6)

class open IF : hour=1.0 (1)

class closed IF : hour=0.0 (2)

But when I input this data

@relation pattern

@attribute hour real

@attribute class {open,closed}

@data

0,closed

1,open

2,closed

3,closed

4,closed

0,closed

1,closed

2,closed

3,closed

4,closed

Weka doesn't pick up the open time in day 1 it only picks up open days from the very last day.

class closed IF : 2.0<=hour<=4.0 (6)

class closed IF : 0.0<=hour<=1.0 (3)

Why is this happening? I the layout of the data is wrong but how to sort it out.

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

- Help others & share knowledge
- Earn cash & points
- Learn & ask questions

2 Comments

In the first example, the door was closed all the time. Based on this information, Weka using the NNGE algorithm guesses that the door will be closed all the time in the future, too. If it is tested using the same information that it was trained on then we find that Weka gets it right, ten times out of ten. So far, so good.

Correctly Classified Instances 10 100 %

Incorrectly Classified Instances 0 0 %

In the second example, the door is closed most of the time, but on day two it is open at one o'clock. Weka guesses that in future the door will be closed at 0 and 2 and 3 and 4 o'clock, for obvious reasons, but for one o'clock it faces a dilemma. It can guess "open" or "closed", but either guess is as likely to be wrong as right. It's a coin toss. Weka guesses "open", maybe because that's the most recent information, and recent information is more likely to be correct than old information.

In this case, If Weka is tested using the same information that it was trained on then we find that it gets it right nine times out of ten, which is about as good as can be hoped for:

Correctly Classified Instances 9 90 %

Incorrectly Classified Instances 1 10 %

In the third example, again the door is closed most of the time but again Weka faces a dilemma at one o'clock. This time it guesses "closed".

Correctly Classified Instances 9 90 %

Incorrectly Classified Instances 1 10 %

Weka does exactly as well in the third example as it did in the second, so why would you say that it got it right in the second example but wrong in the third?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed

Join the community of 500,000 technology professionals and ask your questions.