Weights not being calculated

ally_ansari
ally_ansari New Altair Community Member
edited November 2024 in Community Q&A

Hi - 

I'm trying to select the weights that were created by the correlations. The correlation works, but the weights are empty.

Do you know what I'm doing wrong?

 

Screen Shot 2017-12-18 at 6.12.09 PM.pngProcessex.pngExample is EmptyScreen Shot 2017-12-18 at 6.12.55 PM.pngWeights are emptyScreen Shot 2017-12-18 at 6.13.05 PM.pngCorrelation works

Tagged:

Answers

  • earmijo
    earmijo New Altair Community Member

    Use the operator Weight by Correlation instead of the correlation matrix. 

     

    Screen Shot 2017-12-18 at 6.31.03 PM.png

     

    Take a look at the attached process. 

     

    <?xml version="1.0" encoding="UTF-8"?><process version="7.6.002">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Root">
    <process expanded="true">
    <operator activated="true" class="retrieve" compatibility="7.6.002" expanded="true" height="68" name="Retrieve Polynomial" width="90" x="179" y="136">
    <parameter key="repository_entry" value="//Samples/data/Polynomial"/>
    </operator>
    <operator activated="true" class="weight_by_correlation" compatibility="7.6.002" expanded="true" height="82" name="Weight by Correlation" width="90" x="313" y="136"/>
    <operator activated="true" class="select_by_weights" compatibility="7.6.002" expanded="true" height="103" name="Select by Weights" width="90" x="447" y="136">
    <parameter key="weight_relation" value="less equals"/>
    <parameter key="weight" value="0.4"/>
    </operator>
    <connect from_op="Retrieve Polynomial" from_port="output" to_op="Weight by Correlation" to_port="example set"/>
    <connect from_op="Weight by Correlation" from_port="weights" to_op="Select by Weights" to_port="weights"/>
    <connect from_op="Weight by Correlation" from_port="example set" to_op="Select by Weights" to_port="example set input"/>
    <connect from_op="Select by Weights" from_port="example set output" to_port="result 2"/>
    <connect from_op="Select by Weights" from_port="weights" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    <portSpacing port="sink_result 3" spacing="0"/>
    </process>
    </operator>
    </process>
  • ally_ansari
    ally_ansari New Altair Community Member

    Thanks for the reply.  With the configuration you suggested I get a 'label is missing' errror. 

    What I'd like to do is create correlations - and then isolate the variables that are highly correlated. 

    I'm following this youtube video and attempting to re-create this process flow

     

    https://www.youtube.com/watch?v=zoycFvkB3SU

  • ally_ansari
    ally_ansari New Altair Community Member

    Ooops - 

  • earmijo
    earmijo New Altair Community Member

    That means you haven't defined roles for the different variables. Which is the varaible you are trying to predict? That is the label. Stick a Set Role operator between the ReadCSV and the Correlation Matrix.

  • Pavithra_Rao
    Pavithra_Rao New Altair Community Member

    Hi Ally,

     

    Would you mind sharing the dataset you are trying to analyze? The issue may be specific to the dataset.

     

    Attached is the similar process that I have built with a sample dataset for your reference. Also here is the instruction on How to Import a repository in RapidMiner

     

    Cheers