This function produces an objective function with y=f(x) from a provided model fit.
Important note: this function expects predict(object,newdata) to return
a list. The object$target parameter is a string that determins which list item
is returned by the created function. If not set (NULL), object$target is set to "y".
evaluateModel(object)fit created by a modeling function, e.g., buildRandomForest
a function in the style of y=f(x), which uses the fitted object to predict y for sample x.