Page 1 of 1

Special Items: Top10 assigned category patterns

Posted: Sat Jun 06, 2020 11:31 am
by nji9
I recently discovered by chance that some of my category patterns
have been assigned to really many items, without any more "sub-specification".
(For example "cartoon" + "politics").
So it would be very helpful if XnViewMP would support in identifying
those patterns so one has the chance to find a "seperation category" for them.
An improvement of the Special item "Uncategorized" (= pattern "all none").

It should be not too difficult to identify the patterns:
A row for every item.
The columns are of all existing categories.
Sort (stable!) the list from column 1 to last.
Count the occurences of the category patterns.
Show the top 10.
If the users clicks on top6:
in the category filter pane the corresponding categorys are bold
and the assigned items are shown.

Cool?

Re: Special Items: Top10 assigned category patterns

Posted: Fri Dec 02, 2022 7:56 pm
by nji9
2 years later...

I corrected an error in the description of the algorithm above,
so it may be better understandable.
("A row for every item")

Also I recently realized the "algorithm" by myself (in C++).
The field it is operating in is the rows (= objects)
and the columns (categories). Bit-wise entry for every category.
Determing the max values takes less than a second
for 1e6 objects, 1e3 categories, 50% assigments.
With SQLite it might be realized similar (I don't know).

Pierre, I could send you the c++ code if you like.

But I have the impression my suggestion for improvement
have to be explained?

Re: Special Items: Top10 assigned category patterns

Posted: Mon Dec 19, 2022 5:15 pm
by Gwenael Q.
Hello,

Thanks for suggesting !

I personnally don't understand what is the issue and the suggestion... But I am absolutly not in the developper team !!

Re: Special Items: Top10 assigned category patterns

Posted: Thu Mar 30, 2023 3:54 pm
by nji9
I was curious so I developped the DB analysis for myself in C++ (mingw),
the CLI is in German.
I enclosed the binary files. Place a copy of your XnView.db beside it.
Type an X for choosing XnViewMP mode, E is for generating a random db.
The output should be self-explanatory.

I was quite surprised about the results it reveals for my cat system.
Hopefully Pierre will be motivated to implement it in XnViewMP with SQLite?

EDIT:
There was a minor bug in calculating the optimal partition
- I exchanged the exe.