- Practical Predictive Analytics
- Ralph Winters
- 89字
- 2025-04-04 19:02:43
Generating your own data
Not sure which data source to use when testing a predictive model? No problem. Generate your own data with the built-in sample() function, as well as generating random observations based upon distributions such as runif (uniform), rnorm (normal), mvrnorm (multivariate normal), or rpois (poisson counts). We will also be using a specialized package called wakefield, which generates typical random values that you would find in many data sources, such as age, gender, education, and customer satisfaction scores, without having to worry about the underlying distributions.