I am geting "Error: `data` and `reference` should be factors with the same levels." i followed the same process and use the same data set. as in the video but my out is not same for ("serviceTrainData.csv") AND ("serviceTestData.csv"). the out come is as shown below > ServiceTrain ServiceTest View(ServiceTrain) > View(ServiceTest) > str(ServiceTrain) 'data.frame': 315 obs. of 6 variables: $ OilQual : num 103.4 26.8 62.4 45.5 104.4 ... $ EnginePerf : num 103.5 26.2 63.7 49.9 103.3 ... $ NormMileage: num 103.1 31.3 59.7 48.8 103.1 ... $ TyreWear : num 106.2 29.2 64.7 48.1 105.8 ... $ HVACwear : num 105.7 31.3 58.6 48 106.5 ... $ Service : chr "No" "Yes" "Yes" "No" ... > str(ServiceTest) 'data.frame': 135 obs. of 6 variables: $ OilQual : num 45.77 4.99 4.99 106.39 104.39 ... $ EnginePerf : num 49.94 7.89 4.89 104.45 103.74 ... $ NormMileage: num 49.78 6.59 7.31 103.05 103.05 ... $ TyreWear : num 48.26 9.49 8.37 106.28 106.13 ... $ HVACwear : num 50.95 3.24 2.78 105.54 105.78 ... $ Service : chr "No" "No" "No" "No" ... if you look at the Service column its coming out to be different for both the data set . please advice.
@manavi Agrawal- but he measured exactly same features for 315 cars also. So if these features are easily measurable then the service centre should not take whole day to complete it.. please correct me if I am wrong somewhere.
Hi Sachin, If I understand your question correctly, your question is how come training and test data have the same number of attributes. In other words, you are expecting the training set to have a large number of attributes than Test data. If you carefully listen from 10.30 to 11.20, you will find the answer that these 6 attributes are easily measurable ones which they can measure for a larger number of cars. For 315 cars they would have manually checked some other parameters which that they don't do for the cars in the test data. Hope that answers your question.