Fixed 2 games both with empty collections resulting in 0 similarity#505
Fixed 2 games both with empty collections resulting in 0 similarity#505Jeshibu wants to merge 4 commits intodarklinkpower:masterfrom
Conversation
|
Changes like this should be done in the control game matching algorithm and not to that method, since it calculates the Jaccard Similarity and this change would make it inaccurate. I'm also not sure if the best approach is to give a fixed number in such cases but I'm open to suggestions to improve the algorithm and if you've checked that it works fine. |
|
I've changed it so that it only uses fields that have values for at least one of the games. I've also tweaked the minimum similarity threshold, but I want to put that in an advanced settings tab, along with the field weights, if you think this is the right way to go. |
source/Generic/GameRelations/PlayniteControls/GameRelationsBase.xaml.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
|
Added settings. If this is about right I'll add localization too. |
| settings.SimilarGamesControlSettings.FieldSettings.Add(new SimilarGamesFieldSettings(GameField.TagIds, GetResourceString("LOCTagsLabel"), true, 1)); | ||
| settings.SimilarGamesControlSettings.FieldSettings.Add(new SimilarGamesFieldSettings(GameField.GenreIds, GetResourceString("LOCGenresLabel"), true, 1.2)); | ||
| settings.SimilarGamesControlSettings.FieldSettings.Add(new SimilarGamesFieldSettings(GameField.CategoryIds, GetResourceString("LOCCategoriesLabel"), true, 1.3)); |
There was a problem hiding this comment.
I don't think the names should be set during their creation. This creates the issue that if language or source string changes, they'll stay the previous incorrect name so it would be better to resolve at runtime.
| <Expander Margin="0,10,0,0" Header="Advanced"> | ||
| <StackPanel> | ||
| <StackPanel Orientation="Horizontal" Margin="0,10,0,0"> | ||
| <TextBlock VerticalAlignment="Center">Jacard similarity requirement per field:</TextBlock> |
There was a problem hiding this comment.
Missing translation string
There was a problem hiding this comment.
I think the string should remain only as "Minimum similarity to match games" with a more detailed explanation in a tooltip, including saying that it uses Jacard.
| Width="200" VerticalAlignment="Center"/> | ||
| </StackPanel> | ||
|
|
||
| <TextBlock Text="Fields enabled/weights:" Margin="0,10,0,0"/> |
There was a problem hiding this comment.
I don't like much the text here. Perhaps it should say "Individual fields settings"
source/Generic/GameRelations/PlayniteControls/GameRelationsBase.xaml.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
source/Generic/GameRelations/PlayniteControls/SimilarGamesControl.cs
Outdated
Show resolved
Hide resolved
bac70a3 to
1d40c3b
Compare

This fixes #469
I have verified that:
masterbranch.