Skip to content

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

Merged
merged 3 commits into from
Jun 27, 2022
Merged

Fix LSA naming #161

merged 3 commits into from
Jun 27, 2022

Conversation

thehomebrewnerd
Copy link
Contributor

Overrides the get_args_string method to avoid displaying a full user-defined custom corpus in the feature name and instead just displays corpus=user_defined instead.

Also updates the algorithm default value to randomized instead of None to prevent it from always being displayed in feature name.

self.number_output_features = 2
self.n = 2
self.trainer = None
self.random_seed = random_seed
self.corpus = corpus
self.algorithm = algorithm or "randomized"
Copy link
Contributor

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?

Copy link
Contributor Author

@thehomebrewnerd thehomebrewnerd Jun 24, 2022

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".

Copy link
Contributor

@rwedge rwedge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@thehomebrewnerd thehomebrewnerd merged commit f6bb905 into main Jun 27, 2022
@thehomebrewnerd thehomebrewnerd deleted the fix-lsa-name branch June 27, 2022 22:08
@thehomebrewnerd thehomebrewnerd mentioned this pull request Jun 29, 2022
@gsheni gsheni mentioned this pull request Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants