Skip to contents

Simulation of Quasi-Anscombe data sets

Functions to simulate data sets with related regression patterns.

sim_quasianscombe_set_1()
Generate quasi Anscombe data sets Type 1
sim_quasianscombe_set_2()
Generate quasi Anscombe data sets Type 2: No linear relationship
sim_quasianscombe_set_3()
Generate quasi Anscombe data sets Type 3: Extreme values (a.k.a Outliers)
sim_quasianscombe_set_4()
Generate quasi Anscombe data sets Type 4: 2 Clusters
sim_quasianscombe_set_5()
Generate quasi Anscombe data sets Type 5: Heteroskedasticity
sim_quasianscombe_set_6()
Generate quasi Anscombe data sets Type 6: Simpson's Paradox

Clustering helpers

Functions to simulate data and explain clustering algorithms.

sim_groups()
Generate data sets to apply clustering algorithms
fit_kmeans()
Fit K-means to klassets_cluster object
fit_hclust()
Fit Hierarchical Clustering to klassets_cluster object using stats::hclust
fit_statskmeans()
Fit K-means to klassets_cluster object using stats::kmeans
kmeans_iterations()
Generate intermediate iterations when performing K-means

Binary classification

Functions to simulate data and explain classification algorithms.

sim_response_xy()
Generate data sets to apply binary classifiers
fit_logistic_regression()
Fit Logistic regression to klassets_response_xy object
fit_classification_tree()
Fit classification tree to klassets_response_xy object
fit_classification_random_forest()
Fit classification random forest to klassets_response_xy object
fit_knn()
Fit K Nearest Neighbours to klassets_response_xy object

Regression

Functions to simulate data and explain regression algorithms.

sim_xy()
Generate data sets to apply regression methods
fit_linear_model()
Fit Linear model to klassets_xy object
fit_regression_tree()
Fit regression tree to klassets_xy object
fit_linear_model_tree()
Fit Linear Model tree to klassets_xy object
fit_regression_random_forest()
Fit regression random forest to klassets_xy object
fit_loess()
Fit Local polynomial regression to klassets_xy object
fit_mars()
Fit Multivariate Adaptive Regression Splines to klassets_xy object

MNIST

Functions and data sets to fit models to MNIST data and compare predictive performance and variable importance.

mnist_train
MNIST train data
mnist_test
MNIST test data
mnist_plot_digits()
Plot some digits from train mnist data

Example data sets

Small data sets used in examples and teaching material.

idyob10k
10,000 observations of ID and year of birth
idyob1k
1000 observations of ID and year of birth