amueller / kaggle_insults

Kaggle Submission for "Detecting Insults in Social Commentary"
150 stars 89 forks source link

Update models.py #2

Closed prhbrt closed 9 years ago

prhbrt commented 9 years ago

I found these sniplets of code, suggesting the rho-parameter you used here, was renamed to l1_ratio

if penalty_type == L2: rho = 1.0 elif penalty_type == L1: rho = 0.0

if penalty_type >= L2: w.scale(1.0 - (rho * eta * alpha))

if penalty_type == L1 or penalty_type == ELASTICNET: u += ((1.0 - rho) * eta * alpha) l1penalty(w, q_data_ptr, x_ind_ptr, xnnz, u)

amueller commented 9 years ago

True. This code is really quite old ;)

prhbrt commented 9 years ago

I imagine, yet I wanted to run it and thought it would be two seconds to suggest the changes I made to do so here.

amueller commented 9 years ago

thanks :)