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

#109: Make maximum and default grades configurable. #111

Merged
merged 11 commits into from
Mar 25, 2020

Conversation

mattflax
Copy link
Contributor

This PR makes the following changes, as per this comment on the issue: #109 (comment)

  • Adds the maximum and default (missing) grades to the Maven configuration for the four evaluation plugins, with defaults of 3 and 2 respectively (as per current behaviour);
  • Adds maximum and default grades to constructors for ExpectedReciprocalRank, ReciprocalRank, NDCGAtK;
  • Makes the metric names for ERR, RR, NDCG@K configurable in the parameterized metric configuration, with current values as defaults;
  • Adds a singleton class for instantiating the MetricClassManager instance, and holding the configured max and missing grades specified in the pom.xml - this simplifies the MetricClassManager creation, and makes the grades available from anywhere.

Please let me know of any feedback on these changes!

Matt Pearce added 10 commits March 16, 2020 10:33
- Make fairgrade configurable at construction time;
- Use floating point grade values in gain();
- Add default grade values to Metric.
- Make maxgrade and fairgrade configurable at construction time;
- Use floating point grade values in gain function.
…de to be set via Maven pom.xml:

- Add singleton factory for instantiating MetricClassManager instances;
- Allow access to default grade values via factory class.
- Modify Maven plugins to use factory.
…RR, NDCG, RR to add consistency with pom.xml parameters.
// Private constructor
}

public static MetricClassConfigurationManager getInstance() {
Copy link
Member

Choose a reason for hiding this comment

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

The constructor is empty so we could do

private final static MetricClassConfigurationManager INSTANCE = new MetricClassConfigurationManager();

what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I've just made that change. My thinking was to not create before it is required, but it is used at the very beginning, and is not a big class either, so it's a sensible change to make.

@agazzarini
Copy link
Member

Great stuff @mattflax (or @mattoscln ?), I put just one trivial comment.

@mattflax
Copy link
Contributor Author

Thanks @agazzarini - I've responded above.

(It's @mattflax btw - any commits from the other account were by accident!)

@epugh
Copy link
Contributor

epugh commented Mar 24, 2020

Hi @agazzarini hope things are going well! I'm writing up details for deploying RRE, and wanted to include the changes created by this PR in the documentation. Wanted to see if there was anything I or @mattflax can do to help get this reviewed and merged? I know everything is crazy! Very happy to update the Wiki once this is merged for you ;-)

@agazzarini
Copy link
Member

Hi @epugh many thanks, everything is doing fine here, even we are living in a surreal context. Hope the same there.
I'll check and merge this PR tomorrow morning, and about the Wiki, feel free to add update.

Thanks again for everything

@agazzarini agazzarini merged commit b2ab270 into SeaseLtd:master Mar 25, 2020
@agazzarini
Copy link
Member

@mattflax @epugh: merged, thanks again

@mattflax mattflax deleted the GH109 branch March 25, 2020 09:25
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.

3 participants