Skip to main content
Tweeted twitter.com/StackMma/status/952620986008047617
added 1 character in body
Source Link
Luka
  • 135
  • 4

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;

ac1 /. {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?

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;

a /. {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?

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?

edited tags
Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
added 32 characters in body
Source Link
Luka
  • 135
  • 4

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];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;

a /. {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?

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];

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;

a /. {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?

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;

a /. {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?

Source Link
Luka
  • 135
  • 4
Loading