Doubt in Algorithm Tunning?

machine_learning

#1
  1. Is it correct to say that Algorithm tunning is performed only after algorithm is finalized?
    But how to use tunning results to fit in the selected algorithm.
    i know how to calculate “Alpha” while tunning but don’t know to fit in final algo any of :SVM / KNN etc…
    "…

Create model with default paramters

trainControl <- trainControl(method=“repeatedcv”, number=10, repeats=3)
seed <- 7
metric <- “Accuracy"
set.seed(seed)
mtry <- sqrt(ncol(x))
tunegrid <- expand.grid(.mtry=mtry)
rfDefault <- train(Class~., data=dataset, method=“rf”, metric=metric, tuneGrid=tunegrid,
trControl=trainControl)
print(rfDefault)
…”

can please someone take a minute to mae me understand this?

Best Regards,
Ankit


#2

The optimization function from the caret package outputs a model with the results of each iteration and already includes the best parameter choice. You can just call predict(rfDefault, newdata = testdata) to make a prediction with the optimized parameters. For more information, I recommend reading the caret docs (which are superb, by the way).

About optimization of specific models, see this list of learning algorithms supported.


#3

Thanks caiotaniguchi for the knowledge.