R/gradGeneric.R

Defines functions gradGeneric

gradGeneric <- function(Y, Y_hat, weight=NULL){
  if(is.null(weight)){
    Y_hat - Y
  } else{
    weight * (Y_hat - Y)
  }
}
EdwinGraham/EdNet documentation built on May 6, 2019, 12:22 p.m.