Package 'PerMat'

Title: Performance Metrics in Predictive Modeling
Description: Performance metric provides different performance measures like mean squared error, root mean square error, mean absolute deviation, mean absolute percentage error etc. of a fitted model. These can provide a way for forecasters to quantitatively compare the performance of competing models. For method details see (i) Pankaj Das (2020) <http://krishi.icar.gov.in/jspui/handle/123456789/44138>.
Authors: Pankaj Das [aut, cre]
Maintainer: Pankaj Das <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-12-12 07:03:04 UTC
Source: CRAN

Help Index


Accuracy of Model

Description

Accuracy of Model

Usage

accuracy(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted/forecasted value of the target variable

Value

Accuracy of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
accuracy(actual, predicted)

Coefficient of Variation of Root Mean Squared Error

Description

Coefficient of Variation of Root Mean Squared Error

Usage

CVRMSE(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted/forecasted value of the target variable

Value

CVRMSE of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
CVRMSE(actual, predicted)

Mean Absolute Error

Description

Mean Absolute Error

Usage

MAE(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted/forecasted value of the target variable

Value

MAE of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
MAE(actual, predicted)

Mean Absolute Percentage Error

Description

Mean Absolute Percentage Error

Usage

MAPE(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted value of the target variable

Value

MAPE of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
MAPE(actual, predicted)

Maximum Error

Description

Maximum Error

Usage

ME(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted value of the target variable

Value

ME of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
ME(actual, predicted)

Normalised Root Mean Squared Error

Description

Normalised Root Mean Squared Error

Usage

NRMSE(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted value of the target variable

Value

NRMSE of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
NRMSE(actual, predicted)

Coefficient of Determination (R-Square)

Description

Coefficient of Determination (R-Square)

Usage

R2(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted value of the target variable

Value

Coefficient of Determination (R-Square) of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
R2(actual, predicted)

Root Mean Squared Error

Description

Root Mean Squared Error

Usage

RMSE(actual, predicted)

Arguments

actual

Actual value of the target variable

predicted

Predicted value of the target variable

Value

RMSE and MSE of the fitted model

Examples

actual <- c(100, 150, 200, 250, 300, 350, 400, 450, 500, 550)
predicted <- c(95, 148, 210, 245, 290, 360, 395, 440, 510, 540)
RMSE(actual, predicted)