Replicating R glm Trying to replicate the scoring of the glm function in R. 
Preparing the data
library(dplyr)
iris_smp    <- iris %>% filter(Species %in% c('setosa','versicolor'))
iris_smp$target <- ifelse(iris_smp$Species == 'setosa',1,0)

GLM in R
Using the glm function in R to get actual prediction results.
frmla <- as.formula('target ~ Petal.Width + Petal.Length')
model <- glm(frmla,data=iris_smp,family='binomial')
iris_smp$Pred <- predict(model,newdata = iris_smp,type='response')

Viewing the coefficients of the model
coef(model)
  (Intercept)   Petal.Width  Petal.Length 
-2.656607e+01 -4.170420e-14  2.025562e-15

Now we use the coefficients of the model to compute the same manually.
Manual Computation
iris_smp$Y <- -2.656607e+01 + 
              iris_smp$Petal.Width * -4.170420e-14 +
              iris_smp$Petal.Length * 2.025562e-15
iris_smp$P0 <- exp(iris_smp$Y)/(1 + exp(iris_smp$Y))

Comparing the two results
head(iris_smp[,c('P0','Pred')])


  
*
  
*Why are the two different? 
  
*How do I replicate the exact probability computation of glm? 
  
*How do we compute prediction scores using model coefficients alone?
  

 A: There is a statistical issue here although the question is close to be off-topic as being about R. To see what is going on try plotting the two predictor variables against one another and then labelling the points according to the target variable. You will see immediately that there is perfect separation of the two clusters. This phenomenon is called separation and is also known as the Hauck-Donner effect. There is a tag on this site hauck-donner which has many discussions of the issue and its implications.
A: They are different because the glm algorithm did not converge. These are the warning messages (red flag #1) I get.
> model <- glm(frmla,data=iris_smp,family='binomial')
Warning messages:
1: glm.fit: algorithm did not converge 
2: glm.fit: fitted probabilities numerically 0 or 1 occurred 

This is because the model is most likely overfitting. The coefficients are inflated (red flag #2) but they are not significant at all, evident from the p-values (red flag #3):
> coef(summary(model))
              Estimate Std. Error       z value  Pr(>|z|)
(Intercept)   72.73008   70289.29  0.0010347249 0.9991744
Petal.Width  -35.75592  199094.75 -0.0001795925 0.9998567
Petal.Length -18.37346   74002.47 -0.0002482818 0.9998019

I would suggest using penalized models (see glmnet) to check overfitting. 
