[SOLVED] No R Squared for Linear Regression?

diannej6
diannej6 New Altair Community Member
edited November 5 in Community Q&A
I have been using Excel's Regression tool, but switch to RapidMiner when I have too many independent variables to use Excel.
I am accumstomed to review the p-Value for each indepedent variable and the R Square(d) for the dataset.
I do not see an R Square(d) result within RapidMiner's results, in the Table View or the Text View.
Is there any way for me to get this information?

Thank you.

Answers

  • earmijo
    earmijo New Altair Community Member
    In RapidMiner you have to ask for it explicitly. In the process below I ask RM for the performance metrics available for a prediction problem. R^2 is called Squared Correlation.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.005">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Root">
        <description>This learner creates a linear regression model allowing numerical predictions for the loaded data set.</description>
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="5.3.005" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
            <parameter key="repository_entry" value="../../data/Polynomial"/>
          </operator>
          <operator activated="true" class="linear_regression" compatibility="5.3.005" expanded="true" height="94" name="LinearRegression" width="90" x="179" y="75"/>
          <operator activated="true" class="apply_model" compatibility="5.3.005" expanded="true" height="76" name="Apply Model" width="90" x="380" y="75">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="performance_regression" compatibility="5.3.005" expanded="true" height="76" name="Performance" width="90" x="514" y="30">
            <parameter key="absolute_error" value="true"/>
            <parameter key="relative_error" value="true"/>
            <parameter key="relative_error_lenient" value="true"/>
            <parameter key="relative_error_strict" value="true"/>
            <parameter key="normalized_absolute_error" value="true"/>
            <parameter key="root_relative_squared_error" value="true"/>
            <parameter key="squared_error" value="true"/>
            <parameter key="correlation" value="true"/>
            <parameter key="squared_correlation" value="true"/>
            <parameter key="prediction_average" value="true"/>
            <parameter key="spearman_rho" value="true"/>
            <parameter key="kendall_tau" value="true"/>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="LinearRegression" to_port="training set"/>
          <connect from_op="LinearRegression" from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_op="LinearRegression" from_port="exampleSet" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
          <connect from_op="Performance" from_port="performance" 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"/>
        </process>
      </operator>
    </process>
  • diannej6
    diannej6 New Altair Community Member
    Thank you so much for your help!