I was going through this article and they have this log likelihood given by $ LL = \sum_{i=1}^n A_i\log p_i + \sum_{i=1}^n A'_i\log(1-p_i).$
Basically this is the loglikelihood of a logistic regression where pi is the output from the sigmoid function and Ai is the number of entries at $i$ having y value 1 and $A'_i$ is the number of entries at $i$ having y value $0$.
Now the close form solution of this is given by
$p_i = \frac{A_i}{A_i+A'_i}$
I didn't get this. Where the above solution came from?