Skip to main content
grammar overhaul, well-formatted formula, add tags
Source Link

SGD Stochastic gradient descent in logistic regression

iI am very new to machine learning and in my first project have stumbled across a lot of issues which iI really want to get through.

i mI'm using logistic regression usingwith R's glmnetglmnet package withand alpha = 0 for ridge regression.

i mI'm using ridge regression actually since lasso deleted all my variables and gave very low Areaarea under Curvecurve (0.52)

  but with ridge also, there aintisn't much of a difference (0.61).

myMy dependent variable/output is probability of click, based on if there is a click or not in historical data.

theThe independent variables are state, city, device, user age, user gender, IP carrier, keyword, mobile manufacturer, ad template, browser version, browser family, OS version, and OS family.

ofOf these, infor prediction i mI'm using state, device, user age, user gender, IP carrier, browser version, browser family, OS version, and OS family,family; I am not using keyword or template since we want to reject a user request before deep diving in our system and selectselecting a keyword or template. I am not using city because they are too many, or mobile manufacturer cuzbecause they are too few.

is it okay or should i be using these the rejected variables?Is that okay or should I be using the rejected variables?

to go aboutTo start, iI create a sparse matrix from my variables which are mapped against the column of clicks that have yes or no values.

so afterAfter training the model, iI save the coefficients and intercept. theseThese are used for new incoming requests using the formula for logistic that is 1/(1+e^-1*sum(a+k(ith)*x(ith))) where aregression:

1 / (1+e^-1*sum(a+k(ith)*x(ith)))

Where a is intercept, kk is the ithith coefficient and xx is the ithith variable value.

please let me know if my approach is correct so far.Is my approach correct so far?

now simple glmSimple GLM in R (that is where there is no regularisedregularized regression, right?) gave me 0.56 AUC with. With regularization iI get 0.61 but there is no distinct threshold thatwhere we could say that okay above 0.xx its mostly 1sones and below it most 0szeros are covered,covered; actually, the max probability of wherethat a click didnt happeneddidn't happen is almost always >greater than the max probability wherethat a click happened.

so basically what should i do?So basically what should I do?

iI have read how stochastic gradient descent is an effective technique in logit so how todo I implement stochastic gradient descent in R? if itsIf it's not straightforward, is there a way to implement this system in pythonPython? isIs SGD implemented after generating a regularized logistic regression model or is it a different process all togetheraltogether?

Also there is an algoalgorithm called follow the regularized leader (FTRL) that is used in ctrclick-through rate prediction. isIs there a sample code and use of itFTRL that iI could go through?

SGD in logistic regression

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 have yes or no values.

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 it that i could go through?

Stochastic gradient descent in logistic regression

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 with R's glmnet package and alpha = 0 for ridge regression.

I'm using ridge regression actually since lasso deleted all my variables and gave very low area under curve (0.52) but with ridge there isn't much of a difference (0.61).

My dependent variable/output is probability of click, based on if there is 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 and OS family.

Of these, for prediction I'm using state, device, user age, user gender, IP carrier, browser version, browser family, OS version and OS family; I am not using keyword or template since we want to reject a user request before deep diving in our system and selecting a keyword or template. I am not using city because they are too many or mobile manufacturer because they are too few.

Is that okay or should I be using the rejected variables?

To start, I create a sparse matrix from my variables which are mapped against the column of clicks that have yes or no values.

After training the model, I save the coefficients and intercept. These are used for new incoming requests using the formula for logistic regression:

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.

Is my approach correct so far?

Simple GLM in R (that is where there is no regularized regression, right?) gave me 0.56 AUC. With regularization I get 0.61 but there is no distinct threshold where we could say that above 0.xx its mostly ones and below it most zeros are covered; actually, the max probability that a click didn't happen is almost always greater than the max probability that a click happened.

So basically what should I do?

I have read how stochastic gradient descent is an effective technique in logit so how do I implement stochastic gradient descent in R? If it's 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 altogether?

Also there is an algorithm called follow the regularized leader (FTRL) that is used in click-through rate prediction. Is there a sample code and use of FTRL that I could go through?

deleted 12 characters in body
Source Link

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 nohave yes or no values.

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/(1+e^-1*sum(a+k(ith)*x(ith))) where where a is intercept, k is the ith coefficientcoefficient 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 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 so how to implement stochastic gradient descent in R? if if its not straightforward, is there a way to implement this system in python? is 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 that i could go through?

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?

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 have yes or no values.

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 it that i could go through?

Source Link

SGD in logistic regression

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?