Description Usage Arguments Value Examples
View source: R/indicator_max.R
Search for the set of parameters that maximize the indicator (equivalent to Spearman correlation). For a given set of factors scaled between 0 and 1 and a zero-inflated proportions response.
1 2 3 4 5 6 7 8 9 10 | indicator_max(
DT,
ColNameFactor,
ColNameWeight = "weight",
bounds = c(-10, 10),
max_generations = 200,
hard_limit = TRUE,
wait_generations = 50,
other_class = NULL
)
|
DT |
a data table contains the factors and the response. |
ColNameFactor |
a char vector with the name of the selected factor. |
ColNameWeight |
a char with the name of the ZI response. |
bounds |
default is $[-10;10]$. Upper and Lower bounds. |
max_generations |
default is 200 see genoud for more information. |
hard_limit |
default is TRUE see genoud for more information. |
wait_generations |
default is 50 see genoud for more information. |
other_class |
a char vector with the name of other classes than numeric (factor or char). |
Return a list of two elements with the value of the indicator and the associate set of parameters (beta).
1 2 3 4 5 6 7 8 9 | library(data.table)
data(example_data)
# For real cases increase max_generations and wait_generations
I_max = indicator_max(example_data,
names(example_data)[c(4:8, 14:18)],
ColNameWeight = "proba",
max_generations = 20,
wait_generations = 5)
print(I_max)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.