NearestNeighbors

kinkounio
kinkounio New Altair Community Member
edited November 5 in Community Q&A
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.
Tagged:

Answers

  • haddock
    haddock New Altair Community Member
    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.

  • kinkounio
    kinkounio New Altair Community Member
    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.

  • haddock
    haddock New Altair Community Member
    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.
    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?
    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.
  • kinkounio
    kinkounio New Altair Community Member
    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
  • kinkounio
    kinkounio New Altair Community Member
    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?
  • land
    land New Altair Community Member
    Might be.

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


    Greetings,
      Sebastian