generateData | R Documentation |
This function generates data from two logistic regression trees: one with three apparent clusters (in terms of variance of the features) but a single logistic regression generating y | x, and one with a single apparent cluster but three different logistic regressions generating y | x given a categorical feature.
generateData(n = 100, scenario = "tree", visualize = FALSE)
n |
The number of observations to draw. |
scenario |
The "no tree" scenario denotes the first scenario where there is a single logistic regression generating the data. The "tree" scenario generates data from the second data generating mechanism where there are three logistic regressions. |
visualize |
Whether (TRUE) or not (FALSE) to plot the generated data. |
Generates and returns data according to a true logistic regression tree (if scenario = "tree") or a single regression tree (if scenario = "no tree"). Eventually plots this dataset (if visualize = TRUE).
Adrien Ehrhardt
generateData(scenario = "tree")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.