title: How to calculate the weights of logistic regression?
body: <p>I want to use logistic regression for a machine learning problem. The formula this algorithm is P(y=1)=1/(1+ e^(-(b0+ b1 x1+b2 x2+⋯+bn xn))). How do you calculate the b0, b1,...,bn? </p>
  
  <p><img src="https://i.stack.imgur.com/FwcVI.png" alt="enter image description here"></p>
  
  <p>When this table is the training set, what are b0, b1 and b2 in the formula? And how do you calculate that? </p>
  
  <p>Is the predicted class of a new object 0 when p(y=0) > p(y=1)?</p>