How to do it...
In this recipe, we will show how to do basic preprocessing with caret. We will use simulated data as if it had originated from a chemical test. The target will be each metal-sample strength, and the features will be the amount of each chemical/metal that is contained. Some of the features will have missing values, and the intention will be to impute them. We will use median imputation to fix them (the median for each feature will be used to fix each missing value). We have eight numeric features with missing values. The intention will be to create support vector machines (SVMs) for regression. SVMs are models that can be used for either regression or classification (we will explain how they work later in this recipe). For ...
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