Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. library(caret)
  2.  
  3. d<-twoClassSim(10000, intercept = -10, linearVars = 10, noiseVars = 10 )
  4. c<-trainControl(method="cv",summaryFunction=twoClassSummary,classProbs=T,allowParallel = F)
  5. train(Class~.,data=d, method="rpart", trControl=tc, tuneGrid = expand.grid(cp=c(2^-seq(1:24),0)), metric="ROC")
  6.  
  7. CART
  8.  
  9. 10000 samples
  10. 25 predictor
  11. 2 classes: 'Class1', 'Class2'
  12.  
  13. No pre-processing
  14. Resampling: Cross-Validated (10 fold)
  15. Summary of sample sizes: 9001, 9001, 9000, 9000, 9000, 9000, ...
  16. Resampling results across tuning parameters:
  17.  
  18. cp ROC Sens Spec
  19. 0.000000e+00 0.8720221 0.9175038 0.6351468
  20. 5.960464e-08 0.8693352 0.9178879 0.6338036
  21. 1.192093e-07 0.8693352 0.9178879 0.6338036
  22. 2.384186e-07 0.8693352 0.9178879 0.6338036
  23. 4.768372e-07 0.8693352 0.9178879 0.6338036
  24. 9.536743e-07 0.8693352 0.9178879 0.6338036
  25. 1.907349e-06 0.8693352 0.9178879 0.6338036
  26. 3.814697e-06 0.8693352 0.9178879 0.6338036
  27. 7.629395e-06 0.8693352 0.9178879 0.6338036
  28. 1.525879e-05 0.8693352 0.9178879 0.6338036
  29. 3.051758e-05 0.8693352 0.9178879 0.6338036
  30. 6.103516e-05 0.8693352 0.9178879 0.6338036
  31. 1.220703e-04 0.8688977 0.9184034 0.6338036
  32. 2.441406e-04 0.8695238 0.9190479 0.6333571
  33. 4.882812e-04 0.8683167 0.9199503 0.6346964
  34. 9.765625e-04 0.8642201 0.9234327 0.6275635
  35. 1.953125e-03 0.8502711 0.9358066 0.6061528
  36. 3.906250e-03 0.8170988 0.9421235 0.5776111
  37. 7.812500e-03 0.7992001 0.9391563 0.5624742
  38. 1.562500e-02 0.7309271 0.9416099 0.4928790
  39. 3.125000e-02 0.7279783 0.9249799 0.5267897
  40. 6.250000e-02 0.7279783 0.9249799 0.5267897
  41. 1.250000e-01 0.6607248 0.9497346 0.3688948
  42. 2.500000e-01 0.5000000 1.0000000 0.0000000
  43. 5.000000e-01 0.5000000 1.0000000 0.0000000
  44.  
  45. ROC was used to select the optimal model using the largest value.
  46. The final value used for the model was cp = 0.0002441406.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement