How to predict class labels in test data which does not contain the class labels

r
boosting

#1

hello,

I am trying to use boosting for prediction using the below code:

control.boost=rpart.control(maxdepth = 30,xval = 5)
model.boost=boosting(class ~.,data = training,mfinal = 500,control = control.boost)
#Now on testData:
pred.model.boost=predict(model.boost,newdata = testData)

The test data does not contain the Y label class and I guess that is why I am getting the error:

I think because boosting using instances of missclassified instances for weighting this error is occurring.The same is not happening when I am using random forest.
can someone please help me on this??


#2

Hello @pagal_guy,

One of the motive of using machine learning is to get predictions. You are given a training dataset, which contains one or more independent variables (aka X) and a dependent variable (aka Y), whereas on the test set, you are given the same number of independent variables but not the dependent variable. i.e. in testset you are given X, but not Y.

Your task is to build a machine learning model, which will be trained on the trainset and will give output Y on testset.

PS: To understand more about machine learning, I suggest you to go through this article
https://www.analyticsvidhya.com/blog/2015/08/common-machine-learning-algorithms/