R/single_tree_prediction.R

Defines functions single_tree_prediction

Documented in single_tree_prediction

single_tree_prediction <- function(Single_Model,X_test,Variable_number){


  Y_pred=matrix(  0*(1:nrow(X_test)*Variable_number)  ,nrow=nrow(X_test),  ncol=Variable_number)

  for (k in 1:nrow(X_test)){
    xt=X_test[k, ]
    i=1
    Result_temp=predicting(Single_Model,i,xt,Variable_number)
    Y_pred[k,]=unlist(Result_temp)

  }
  #Y_pred1=unlist(Y_pred, recursive = TRUE)
  #Y_pred1=matrix(Y_pred1,nrow=nrow(X_test))
  return(Y_pred)
}

Try the MultivariateRandomForest package in your browser

Any scripts or data that you put into this service are public.

MultivariateRandomForest documentation built on May 2, 2019, 1:05 p.m.