-
-
Save cseidman/73eed0b914f4669c5aab00ede4290ed4 to your computer and use it in GitHub Desktop.
TrainDecisionTree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get 80% of the data for training | |
rowCount <- nrow(ds) | |
endRange <- round(rowCount*0.80,0) | |
trainingData <- ds[1:endRange,] | |
tr <- rxDTree( | |
IsCardUser~ | |
Gender+ | |
Occupation+ | |
MaritalStatus+ | |
IsHomeOwner+ | |
TotalChildren+ | |
NumberCarsOwned+ | |
AgeRanges+ | |
CommuteDistance+ | |
IncomeCategories+ | |
CountryRegionCode+ | |
Education, | |
data=trainingData, | |
method="class", | |
overwrite = TRUE, | |
reportProgress = 0 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment