Propiedades de logregnode
Última actualización: 12 feb 2025
La regresión logística es una técnica de estadístico para clasificar los registros en función los valores de los campos de entrada. Es análoga a la regresión lineal pero toma un campo objetivo categórico en lugar de uno numérico.
Ejemplo multinomialCopy link to section
Copy link to section
node = stream.create("logreg", "My node")
# "Fields" tab
node.setPropertyValue("custom_fields", True)
node.setPropertyValue("target", "Drug")
node.setPropertyValue("inputs", ["BP", "Cholesterol", "Age"])
node.setPropertyValue("partition", "Test")
# "Model" tab
node.setPropertyValue("use_model_name", True)
node.setPropertyValue("model_name", "Log_reg Drug")
node.setPropertyValue("use_partitioned_data", True)
node.setPropertyValue("method", "Stepwise")
node.setPropertyValue("logistic_procedure", "Multinomial")
node.setPropertyValue("multinomial_base_category", "BP")
node.setPropertyValue("model_type", "FullFactorial")
node.setPropertyValue("custom_terms", [["BP", "Sex"], ["Age"], ["Na", "K"]])
node.setPropertyValue("include_constant", False)
# "Expert" tab
node.setPropertyValue("mode", "Expert")
node.setPropertyValue("scale", "Pearson")
node.setPropertyValue("scale_value", 3.0)
node.setPropertyValue("all_probabilities", True)
node.setPropertyValue("tolerance", "1.0E-7")
# "Convergence..." section
node.setPropertyValue("max_iterations", 50)
node.setPropertyValue("max_steps", 3)
node.setPropertyValue("l_converge", "1.0E-3")
node.setPropertyValue("p_converge", "1.0E-7")
node.setPropertyValue("delta", 0.03)
# "Output..." section
node.setPropertyValue("summary", True)
node.setPropertyValue("likelihood_ratio", True)
node.setPropertyValue("asymptotic_correlation", True)
node.setPropertyValue("goodness_fit", True)
node.setPropertyValue("iteration_history", True)
node.setPropertyValue("history_steps", 3)
node.setPropertyValue("parameters", True)
node.setPropertyValue("confidence_interval", 90)
node.setPropertyValue("asymptotic_covariance", True)
node.setPropertyValue("classification_table", True)
# "Stepping" options
node.setPropertyValue("min_terms", 7)
node.setPropertyValue("use_max_terms", True)
node.setPropertyValue("max_terms", 10)
node.setPropertyValue("probability_entry", 3)
node.setPropertyValue("probability_removal", 5)
node.setPropertyValue("requirements", "Containment")
Copy to clipboard Show more
Ejemplo binomialCopy link to section
Copy link to section
node = stream.create("logreg", "My node")
# "Fields" tab
node.setPropertyValue("custom_fields", True)
node.setPropertyValue("target", "Cholesterol")
node.setPropertyValue("inputs", ["BP", "Drug", "Age"])
node.setPropertyValue("partition", "Test")
# "Model" tab
node.setPropertyValue("use_model_name", False)
node.setPropertyValue("model_name", "Log_reg Cholesterol")
node.setPropertyValue("multinomial_base_category", "BP")
node.setPropertyValue("use_partitioned_data", True)
node.setPropertyValue("binomial_method", "Forwards")
node.setPropertyValue("logistic_procedure", "Binomial")
node.setPropertyValue("binomial_categorical_input", "Sex")
node.setKeyedPropertyValue("binomial_input_contrast", "Sex", "Simple")
node.setKeyedPropertyValue("binomial_input_category", "Sex", "Last")
node.setPropertyValue("include_constant", False)
# "Expert" tab
node.setPropertyValue("mode", "Expert")
node.setPropertyValue("scale", "Pearson")
node.setPropertyValue("scale_value", 3.0)
node.setPropertyValue("all_probabilities", True)
node.setPropertyValue("tolerance", "1.0E-7")
# "Convergence..." section
node.setPropertyValue("max_iterations", 50)
node.setPropertyValue("l_converge", "1.0E-3")
node.setPropertyValue("p_converge", "1.0E-7")
# "Output..." section
node.setPropertyValue("binomial_output_display", "at_each_step")
node.setPropertyValue("binomial_goodness_of_fit", True)
node.setPropertyValue("binomial_iteration_history", True)
node.setPropertyValue("binomial_parameters", True)
node.setPropertyValue("binomial_ci_enable", True)
node.setPropertyValue("binomial_ci", 85)
# "Stepping" options
node.setPropertyValue("binomial_removal_criterion", "LR")
node.setPropertyValue("binomial_probability_removal", 0.2)
Copy to clipboard Show more
Propiedades de
|
Valores | Descripción de la propiedad |
---|---|---|
|
campo | Los modelos de regresión logística requieren un único campo objetivo y uno o más campos de entrada. Los campos de frecuencia y ponderación no se usan. Consulte Propiedades comunes del nodo de modelado para obtener más información. |
|
|
|
|
distintivo | |
|
|
|
|
|
|
|
|
|
|
|
Cuando se especifica como tipo de modelo, los métodos por pasos no se ejecutarán, aunque se especifique. En su lugar, será el método utilizado. Si el tipo de modelo se establece en pero no se ha especificado ningún campo personalizado, se generará un modelo de efectos principales. |
|
[[BP Sexo][BP][Edad]] | |
|
serie | Especifica cómo se determina la categoría de referencia. |
|
serie | |
|
|
Propiedad con clave para la entrada categórica que especifica cómo se determina el contraste. Vea el ejemplo de uso. |
|
|
Propiedad con clave para la entrada categórica que especifica cómo se determina la categoría de referencia. Vea el ejemplo de uso. |
|
|
|
|
número | |
|
distintivo | |
|
|
|
|
número | |
|
distintivo | |
|
número | |
|
|
|
|
|
|
|
número | |
|
número | |
|
número | |
|
número | |
|
|
|
|
número | |
|
número | |
|
|
|
|
|
|
|
número | |
|
distintivo | |
|
número | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
número | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
|
|
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
distintivo | |
|
número | |
|
|
|
|
distintivo | |
|
número | |
|
número | |
|
|
|
|
distintivo | |
|
distintivo |
¿Fue útil el tema?
0/1000