CART
A CART is a classification algorithm that divides the feature space (or independent variable space) into several sections and assigns classes to each subsection. We will not discuss this in detail and will be using R to achieve the classification of areas.
We will now split data into training and testing sets. Training data is normally 70% or 80% of the original dataset that is selected randomly, and this is what's used for fitting the model. After we fit the model, we evaluate our model by fitting it on the remaining 30% or 20% of the data, which we call the test data.
Now, we will import the landslide dataset that we exported at the end of our data-preprocessing steps. We will delete the unnecessary X column and convert hazard into ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access