Pages: [1]
  Print  
Author Topic: NearestNeighbors  (Read 1898 times)
kinkounio
Newbie
*
Posts: 9


« on: February 26, 2009, 12:34:07 AM »

Hi.

I have a problem with a NearestNeighbors project.

My code is :

<operator name="Root" class="Process" expanded="yes">
    <operator name="ExampleSource" class="ExampleSource">
        <parameter key="attributes"   value="/home/kinkounio/Descargues/Projectes/pfc/f_historic.aml"/>
        <parameter key="sample_size"   value="1"/>
    </operator>
    <operator name="FeatureRangeRemoval" class="FeatureRangeRemoval">
        <parameter key="first_attribute"   value="1"/>
        <parameter key="last_attribute"   value="5"/>
    </operator>
    <operator name="NearestNeighbors" class="NearestNeighbors">
    </operator>
    <operator name="ExampleSource (2)" class="ExampleSource">
        <parameter key="attributes"   value="/home/kinkounio/Descargues/Projectes/pfc/f_diari.aml"/>
        <parameter key="sample_size"   value="1"/>
    </operator>
    <operator name="ModelApplier" class="ModelApplier">
        <list key="application_parameters">
        </list>
    </operator>
</operator>

and the problem say: 

 [Warning] KNNRegression: The order of attributes is not equal for the training and the application example set. This might lead to problems for some models.
[Warning] KNNRegression: The given example set does not contain a regular attribute with name 'dades12.txt ( 7 )'. This might cause problems for some models depending on this particular attribute.
[Warning] KNNRegression: The given example set does not contain a regular attribute with name 'dades12.txt ( 8 )'. This might cause problems for some models depending on this particular attribute.
[Warning] KNNRegression: The given example set does not contain a regular attribute with name 'dades12.txt ( 9 )'. This might cause problems for some models depending on this particular attribute.

...

The result is the first line of the one file.

Help me !!  Thanks.
Logged
haddock
Hero Member
*****
Posts: 853



WWW
« Reply #1 on: February 26, 2009, 11:23:41 AM »

Hi,

What your code does is pretty simple.

1. Load training examples.
2. Remove some attributes.
3. Make a model.
4. Load test examples.
5. Apply the model.

But if your test and training examples are not in the same form problems are to be expected. Therefore, if your assignment training and test sets are of the same form, you will need to repeat step 2 on the test set.

Logged

Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?

T.S.Eliot ~ Choruses from the Rock 1934
kinkounio
Newbie
*
Posts: 9


« Reply #2 on: February 26, 2009, 04:39:44 PM »

Hi.

In my Load training examples I have a 9000 rows and the load test example there is a one rows. It is the problem?

The Columns of the 2 examples are the same.

If the problem is the number of rows, how to create a decision tree for compare one multiple row file with a one row file?

Thanks.

Logged
haddock
Hero Member
*****
Posts: 853



WWW
« Reply #3 on: February 26, 2009, 09:52:36 PM »

Quote
In my Load training examples I have a 9000 rows and the load test example there is a one rows. It is the problem?
No.

Quote
The Columns of the 2 examples are the same.
So the training set, after removing the attributes, has the same number of columns as the test set?


Quote
If the problem is the number of rows, how to create a decision tree for compare one multiple row file with a one row file?
The problem is not the number of rows.
Logged

Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?

T.S.Eliot ~ Choruses from the Rock 1934
kinkounio
Newbie
*
Posts: 9


« Reply #4 on: February 27, 2009, 08:40:01 AM »

After the Filter, the rows of two examples set are same.

The error of the program always is the same. the order of the example set are not equal and the value of the columns is a not regular value or atribute.

I have a 2 files, one content the value of the 30 years and the other content the value of the one day, I compare 2 files for obtain the value of file one day in the value of 30 years.

It is posible ??

thanks
Logged
kinkounio
Newbie
*
Posts: 9


« Reply #5 on: March 04, 2009, 06:11:05 PM »

I have a two files and the atribute of the first files are real and integer and the atributes of second file are real.

This is the problem of the warning?
Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2426


« Reply #6 on: March 06, 2009, 02:58:00 PM »

Might be.

You have to check that the columns of your data are of the same type and have the same order.


Greetings,
  Sebastian
Logged
Pages: [1]
  Print  
 
Jump to: