import(ggplot2)
import(methods)

importClassesFrom(kernlab, ksvm)
importClassesFrom(party, RandomForest)

importFrom(abind, abind, adrop)
importFrom(foreach, "%dopar%", foreach, registerDoSEQ)
importFrom(graphics, plot)
importFrom(Hmisc, rcorr.cens)
importFrom(irr, kappa2)
importFrom(magrittr, "%>%")
importFrom(MLmetrics, PRAUC)
importFrom(ModelMetrics, auc, brier, ce, kappa, mae, rmse, sensitivity,
           specificity)
importFrom(recipes, bake, juice, prep)
importFrom(rsample, assessment, bootstraps, initial_split, prepper,
           rsample2caret, testing, vfold_cv)
importFrom(Rsolnp, solnp)
importFrom(stats, aggregate, approx, coef, complete.cases, cor, formula,
           get_all_vars, median, model.frame, model.matrix, model.response,
           model.weights, na.fail, na.omit, na.pass, p.adjust, pchisq, predict,
           quantile, reformulate, reshape, sd, t.test, terms, vcov)
importFrom(survival, is.Surv, Surv, survfit)
importFrom(survivalROC, survivalROC)
importFrom(utils, combn, head, stack, tail)


export(.,
       calibration,
       dependence,
       fit,
       lift,
       ModelFrame,
       resample,
       Resamples,
       response,
       tune,
       varimp)

export(BootControl,
       CVControl,
       OOBControl,
       SplitControl,
       TrainControl)

exportClasses(MLControl)

export(MLModel,
       C50Model,
       CForestModel,
       CoxModel,
       CoxStepAICModel,
       GBMModel,
       GLMModel,
       GLMStepAICModel,
       GLMNetModel,
       KNNModel,
       NNetModel,
       PLSModel,
       POLRModel,
       RandomForestModel,
       StackedModel,
       SuperModel,
       SurvRegModel,
       SurvRegStepAICModel,
       SVMModel,
       SVMANOVAModel,
       SVMBesselModel,
       SVMLaplaceModel,
       SVMLinearModel,
       SVMPolyModel,
       SVMRadialModel,
       SVMSplineModel,
       SVMTanhModel,
       XGBModel,
       XGBDARTModel,
       XGBLinearModel,
       XGBTreeModel)

exportMethods(modelmetrics)

S3method(diff, MLModelTune)
S3method(diff, Resamples)
S3method(fit, ModelFrame)
S3method(fit, formula)
S3method(fit, recipe)
S3method(ModelFrame, formula)
S3method(ModelFrame, matrix)
S3method(print, MLModelFit)
S3method(plot, MLModelTune)
S3method(plot, PartialDependence)
S3method(plot, Resamples)
S3method(plot, ResamplesCalibration)
S3method(plot, ResamplesLift)
S3method(plot, VarImp)
S3method(predict, MLModelFit)
S3method(resample, ModelFrame)
S3method(resample, formula)
S3method(resample, recipe)
S3method(response, formula)
S3method(summary, MLModelFit)
S3method(summary, MLModelTune)
S3method(summary, Resamples)
S3method(t.test, ResamplesDiff)
S3method(tune, ModelFrame)
S3method(tune, formula)
S3method(tune, recipe)
