i am very new to machine learning and in my first project have stumbled across a lot of issues which i really want to get through. i m using logistic regression using R's glmnet package with alpha = 0 for ridge regression i m using ridge regression actually since lasso deleted all my variables and gave very low Area under Curve (.52) but with ridge also, there aint much of a difference (.61) my dependent variable/output is probability of click, based on if there a click or not in historical data the independent variables are state, city, device, user age, user gender, IP carrier, keyword, mobile manufacturer, ad template, browser version, browser family, OS version, OS family of these, in prediction i m using state, device, user age, user gender, IP carrier, browser version, browser family, OS version, OS family, I am not using keyword or template since we want to reject a user request before deep diving in our system and select a keyword or template. I am not using city because they are too many, or mobile manufacturer cuz they are too few is it okay or should i be using these the rejected variables? to go about, i create a sparse matrix from my variables which are mapped against the column of clicks that has yes or no yes or no. so after training the model, i save the coefficients and intercept. these are used for new incoming requests using the formula for logistic that is 1/(1+e^-1*sum(a+k(ith)*x(ith))) where a is intercept, k is the ith coefficient and x is the ith variable value please let me know if my approach is correct so far. now simple glm in R (that is where there is no regularised regression, right?) gave me .56 AUC with regularization i get .61 but there is no distinct threshold that we could say that okay above 0.xx its mostly 1s and below it most 0s are covered, actually max probability of where click didnt happened is almost always > max probability where click happened so basically what should i do? i have read how stochastic gradient descent is an effective technique in logit so how to implement stochastic gradient descent in R? if its not straightforward, is there a way to implement this system in python? is SGD implemented after generating a regularized logistic regression model or is it a different process all together? Also there is an algo called follow the regularized leader (FTRL) that is used in ctr prediction. is there a sample code and use of that it i could go through?