Skip to content

Instantly share code, notes, and snippets.

@cseidman

cseidman/trainDecisionTree.R Secret

Created Jan 24, 2018
Embed
What would you like to do?
TrainDecisionTree
# 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
You can’t perform that action at this time.