-
Notifications
You must be signed in to change notification settings - Fork 11
Fix LSA naming #161
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
Fix LSA naming #161
Conversation
self.number_output_features = 2 | ||
self.n = 2 | ||
self.trainer = None | ||
self.random_seed = random_seed | ||
self.corpus = corpus | ||
self.algorithm = algorithm or "randomized" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious if there is a difference doing it this way vs the way it was?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It impacts how the feature names are generated. The way feature naming works, parameter values are only included in the feature name if the value is changed from the default value.
With the previous approach the default value was None
and the algorithm was set to "randomzied"
inside __init__
meaning that even though randomized was effectively the default value, it would always be displayed in the resulting feature name because randomized wasn't the actual default value in the function signature.
Doing it the new way means that "randomized"
is the default value in the function signature, and the algorithm info will only show up in the feature name if it is changed to the non-default of "arpack"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Overrides the
get_args_string
method to avoid displaying a full user-defined custom corpus in the feature name and instead just displayscorpus=user_defined
instead.Also updates the algorithm default value to
randomized
instead ofNone
to prevent it from always being displayed in feature name.