[R] Scoring and Ranking Methods

David Winsemius dwinsemius at comcast.net
Fri Jul 7 17:47:57 CEST 2017

> On Jul 7, 2017, at 2:29 AM, Dhivya Narayanasamy <dhiv.shreya at gmail.com> wrote:
> Hi,
> I am doing predictive modelling of Multivariate Time series Data of a Motor
> in R using various models such as Arima, H2O.Randomforest, glmnet, lm and
> few other models.
> I created a function to select a model of our choice and do prediction.
> Model1 <- function(){
>  ..
>  return()
> }

That looks like a prescription for serious disappointment. I seriously doubt that you have done any testing using similar code. You would have created a function that returns NULL. I get the sense that you need to study and work through the examples in the "Introduction to R" document.

> Model2 <- function(){
>  ...
>  return()
> }
> Model3 <- function(){
>  ...
>  return()
> }
> main <- function(n){
>  if(n == 1) {
>   Model1()
>  }
>  else if(n == 2){
>    Model2()
>  }
>  else if(n == 3){
>    Model3()
>  }}
> Now I am supposed to automate these models which gives RMSE and MAPE of
> each model. I would like to provide scores (eg. out of 5) for each model
> based on the performance. For example, if Arima gives a low RMSE than other
> models, it will be scored high and the second lowest RMSE model will score
> a less than Arima and so on.
> And every time i run those models with different input Data [motor2, motor3
> ..], it must give the mean score of a model. what I mean to say is,
> 1. for motor1 it will give scores of each model, let's say *s1*.
> 2. for motor2 run it give scores of each model, and let's call it *s2*.
> And i want a mean score of that model every time i run it with different
> input. It is more like scoring and ranking method.
> Are there any methods or packages in R that can give a glimpse of how it is
> done? or any examples? Any suggestions would be very helpful.

The 'switch'-function can dispatch to different functions on the basis of the value of an indicator variable. 

> Thank you.
> Dhivya
> 	[[alternative HTML version deleted]]

Please read the Posting Guide. Rhelp is a plain text mailing list.
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

More information about the R-help mailing list