Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small adjustments #4

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Small adjustments #4

wants to merge 18 commits into from

Conversation

Maroloccio
Copy link

Hi. I am a Duolingo user and got intrigued by the paper you published together with Meeder. I applied some Python adjustments to improve the readability of the code which, in my humble opinion, more people should be reading to learn from. To read the edit history more easily, I recommend considering one commit at the time, as I made them as small and self-contained as possible. If merged, I could contribute more. For now I do not know how open you might be to external contributions. Thanks for sharing the code in the first place and greetings from Europe.

Maroloccio added 18 commits May 28, 2017 04:05
Feature counts is more readable than fcounts.
Learning rate is more readable than lrate.
Regularization weight is more readable than l2wt.
Data instance is more readable than inst.
Feature vector is more readable than fv.
We use iteritems elsewhere, we should be using itervalues here.
Feature and value are more readable than k and x_k.
1e6 is more readable than 1000000, in which one has to count the zeroes.
In the case of a modulo operator, the type change from int to float does
not alter correctness.

1e-4 could subjectively be more readable than 0.0001.
@garfieldnate
Copy link

👍 I double-checked (random.seed(0) and diff the output files) and this doesn't change any of the outputs in any way. The changes do make the code easier to follow, so I would recommend merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants