Error rate for models generated in Model Tree!

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error rate for models generated in Model Tree!

AndreiA-3
Somebody could help me to understand the procedure for the calculation
of the error rate for models generated in Model Tree!

Observing the class RuleNode, the root mean square error is calculated
in the following way:
   /**
   * Recursively builds a textual description of the tree
   *
   * @param level the level of this node
   * @return string describing the tree
   */

      text.append("LM" + m_leafModelNum);
      if (m_globalDeviation > 0.0) {
           text .append(" (" + m_numInstances + "/"   +
Utils.doubleToString((100.0 * m_rootMeanSquaredError /
m_globalAbsDeviation), 1, 3)   + "%)\n");
      } else {
            text.append(" (" + m_numInstances + ")\n");
      }

where: m_rootMeanSquaredError is procedure of the class Evaluation.java

   * Returns the root mean squared error.
   *
   * @return the root mean squared error
   */
  public final double rootMeanSquaredError() {

    return Math.sqrt(m_SumSqrErr / m_WithClass);
  }

and

m_SumSqrErr += weight * sumSqrErr / m_NumClasses;
m_WithClass += instance.weight();

In  class instance.

/**
   * Returns the instance's weight.
   *
   * @return the instance's weight as a double
   */
  public final double weight() {

    return m_Weight;
  }

Where
    m_Weight = weight;



I don't understand which are the weights that the procedure refers.  I
thought that they went the coefficients of the variables, even so, in
the practice didn't give right.

Example y'=5.34 + (weight1 * 3) + (weight2 * 4)

If this is a regression model, I don't also understand because
sumSqrErr / m_NumClasses.   In this case is the numbers of generated
models are?


_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: Error rate for models generated in Model Tree!

Eibe Frank
The weights are instance weights, not attribute weights. The number of
classes in m_NumClasses is 1 in the regression case.

Cheers,
Eibe

On Jul 12, 2005, at 3:52 AM, Andreia Vieira wrote:

> Somebody could help me to understand the procedure for the calculation
> of the error rate for models generated in Model Tree!
>
> Observing the class RuleNode, the root mean square error is calculated
> in the following way:
>    /**
>    * Recursively builds a textual description of the tree
>    *
>    * @param level the level of this node
>    * @return string describing the tree
>    */
>
>       text.append("LM" + m_leafModelNum);
>       if (m_globalDeviation > 0.0) {
>            text .append(" (" + m_numInstances + "/"   +
> Utils.doubleToString((100.0 * m_rootMeanSquaredError /
> m_globalAbsDeviation), 1, 3)   + "%)\n");
>       } else {
>             text.append(" (" + m_numInstances + ")\n");
>       }
>
> where: m_rootMeanSquaredError is procedure of the class Evaluation.java
>
>    * Returns the root mean squared error.
>    *
>    * @return the root mean squared error
>    */
>   public final double rootMeanSquaredError() {
>
>     return Math.sqrt(m_SumSqrErr / m_WithClass);
>   }
>
> and
>
> m_SumSqrErr += weight * sumSqrErr / m_NumClasses;
> m_WithClass += instance.weight();
>
> In  class instance.
>
> /**
>    * Returns the instance's weight.
>    *
>    * @return the instance's weight as a double
>    */
>   public final double weight() {
>
>     return m_Weight;
>   }
>
> Where
>     m_Weight = weight;
>
>
>
> I don't understand which are the weights that the procedure refers.  I
> thought that they went the coefficients of the variables, even so, in
> the practice didn't give right.
>
> Example y'=5.34 + (weight1 * 3) + (weight2 * 4)
>
> If this is a regression model, I don't also understand because
> sumSqrErr / m_NumClasses.   In this case is the numbers of generated
> models are?
>
>
> _______________________________________________
> Wekalist mailing list
> [hidden email]
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist


_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist