Can someone explain me what is the difference between Classify[trainingset, Method -> "LogisticRegression"]
function and LogitModelFit[trainingset, x, x]
function in Wolfram Mathematica.
For example:
trainingset = {1 -> "A", 2 -> "A", 3.5 -> "B", 4 -> "B"};
c = Classify[trainingset, Method -> "LogisticRegression"];
c[2.6, "Probabilities"]
<|"A" -> 0.979033, "B" -> 0.0209672|>
But:
trainingset1 = {{1, 0}, {2, 0}, {3.5, 1}, {4, 1}};
c1 = LogitModelFit[trainingset1 , x, x] // Normal;
c1 /. {x -> 2.6}
0.0178003
Obviously, probabilities are not exactly the same. I also tried with ProbitModelFit
, but again, probabilities are different.
Why is this the case?
a /. {x -> 2.6}
should bec1 /. {x->2.6}
. $\endgroup$