Learn R Programming

moreparty (version 0.4)

PerfsRegression: Performance measures for regressions

Description

Computes various performance measures for regression tasks : sum of the squared errors (SSE), mean squared errors (MSE), root mean squared errors (RMSE), coefficient of determination (R2), Kendall's rank correlation (tau).

Usage

PerfsRegression(pred, actual)

Value

A numeric vector of performance measures.

Arguments

pred

numerical vector of predicted values

actual

numerical vector of actual values

Examples

Run this code
  data(titanic)
  titanic <- titanic[complete.cases(titanic),]
  model <- partykit::ctree(Age ~ Sex + Pclass, data = titanic)
  pred <- predict(model)
  PerfsRegression(pred, titanic$Age)

Run the code above in your browser using DataLab