For example, to use 1
as True
and 0
as False
:
LogitModelFit[{{300, 0, 0}, {400, 0, 0}, {450, 1, 0}, {460, 1, 1}}, {x, y}, {x, y}]
where y
is boolean parameter.
You can check the documentation about the option NominalVariables
http://reference.wolfram.com/language/ref/NominalVariables.html
NominalVariables is an option for machine learning functions such as LinearModelFit or Classify that specifies which variables should be treated as having discrete values specified by names.
So
LogitModelFit[{{300, 0, 0}, {400, 0, 0}, {450, 1, 0}, {460, 1, 1}}, {x, y}, {x, y},
NominalVariables -> y ]
shoud do the job.
You ae not required to use 0 and 1 for your binary variables, you can use more meaningful symbol and strings, like True/False or "Male"/"Female", and so on.