Page 2 of 2

Re: relative age

Posted: 30 Jul 2018 18:10
by kunkel321
Hey very cool Highend!!!
Thanks for your work on this. I always dig these customization tools. :ugeek:

Regarding standard deviations (SD) as opposed to top/bottom %age: My thought was that sometimes you'd want to identify the files that stood out as significantly newer/older than the overall group of files in that folder. Sometimes that might be just one file, but other times it might be multiple files. So for example, imagine there are 100 files and most of them are fairly old, but 13 of them are relatively new (but I don't know that there are exactly 13, only that there are several). If I highlight the newest 10%, then I miss three of the ones from that subgroup of newer files. If I highlight 15% then I erroneously get some of the older ones too. But if I highlight the files that have an age = +1SD, then I get those 13 outliers.

In truth, percentage would probably work just as well for most purposes. Also, when there's a small number of files, there might not be a difference. With a perfect bell curve frequency distribution, +1SD would be about 16% of the items. So if the ages are evenly-distributed (no sub-groups of really old or new outliers), or if there is a small number of files, then using "top 16%" and "+1SD" would probably return the same results.

It's been a while since I took a statistics class -- and I wasn't a particularly good student even then. :mrgreen:
I can probably help you work out the calculations though if you do want to add an SD just for the heck of it.
There's a good review here: https://www.mathsisfun.com/data/standar ... mulas.html
I see that xyscripting doesn't directly support SDs.

Gotta run for now.

EDIT: Here are some additional colors for the .INI file, in case folks don't want to look them up. :wink:

Code: Select all

Colors=Red:FC7268|Orange:FF9900|Yellow:FFFF00|Green:CCFFCC|Blue:00CCFF|Purple:CC99FF
Recommendation: Regarding Type: I'll probably always use "colorfilter," but folks that use "label" will probably like to have a button at the bottom to clear previously applied labels.

Re: relative age

Posted: 31 Jul 2018 21:34
by highend
Here are some additional colors for the .INI file, in case folks don't want to look them up.
Used the list for _newly_ .ini files
I'll probably always use "colorfilter," but folks that use "label" will probably like to have a button at the bottom to clear previously applied labels
v0.2 will now save a .log file (only when using labels) that lists all files that were labeled. If the .log file exists the GUI will then display a "Remove labels" button. More in the changelog...

Apart from that, here is a new version that supports standard deviation lookups...
The attached helper tool is necessary! It does the number crunching (and it is very fast, even with thousands of files. E.g. on my
system it takes ~165ms to do the whole processing of ~37.000 files)...
To use the whole thing, run the new script once. After that, change the path to the helper app
in the .ini file to where you've extracted the .zip...

I did NOT test values other than 1 because I'm not completely sure if the math is correct...

Code: Select all

If date < (mean - (sd * stdDeviation))
This is e.g. the calculation for "oldest".
sd is the value from the "Number:" field in the GUI
It is limited to 1 - 9 (other values are reset to 1 automatically).

Files:
Colorize files v0.2.xys
XY_Date deviation helper v2018.07.31.zip
Changelog:

Code: Select all

v0.2
  ! The (highlight) type wasn't read from the .ini file correctly. Fixed
  + If labels are used, a log file is written after pressing "Colorize". It
    contains all files that were labelled. If this file exists, the GUI will
    show an additional "Remove labels" button. Clicking it will unlabel all
    files from the log file, delete the log file itself and close the GUI
    afterwards
  + Standard deviation is now supported
    The value from number is taken. Allowed values are 1-9. If a different
    value is used, 1 is taken by default. This feature is able to colorize
    "outliers". File(s) that are far newer / older than the median of file(s)
    are. This feature is only visible in the GUI if the necessary helper tool
    is found!

Re: relative age

Posted: 01 Aug 2018 16:39
by silentDriver
you guys rock :appl:

I'm learning lots from your scripts @highend. thank you.

Re: relative age

Posted: 01 Aug 2018 20:25
by kunkel321
Pretty cool!

I briefly double-checked the math: Tested the script on a Paperfolder of 1592 files. Tested 1 SD, 2 SD, 3 SD, and 4 SD. Then exported a report to Excel and got the same numbers of items meeting the criteria. 8)

It occurs to me that a person needs to have some idea of the range of dates in the the folder before using the standard deviation feature. If there are really outliers, then it is the right tool, but if there's not a lot of variability in the dates, or if they are skewed in the other direction, then anything higher than 1 SD is likely not to "find" any files.

Thoughts:
* It might be good to allow increments of point-one, starting at zero... Eg. 0, 0.1, 0.2, 0.3, .... 8.9, 9

* It might be good to have a screen tip tooltip pop up with with something like, "Found no files meeting this criteria," when no files are found.

* Don has a tooltip on hover of the the Instant Color Filter toolbar icon. It shows the last-applied ICF. After using the Colorize Files script though, it merely lists the names of the files that were selected (see screenshot). Would if be possible for the tooltip to show the parameters of the filter that was applied? (I'm not sure if hardcoded tool tips are even scriptable.)
Maybe it could have something like:

Colorize Files Script
Newest 1 SD > CC99FF


Image

Anyway, gotta run.
Thanks again for your work on this Highend! Cool stuff.

Re: relative age

Posted: 02 Aug 2018 07:42
by highend
It might be good to allow increments of point-one, starting at zero... Eg. 0, 0.1, 0.2, 0.3, .... 8.9, 9
Done, new files attached
It might be good to have a tooltip pop up with with something like, "Found no files meeting this criteria," when no files are found.
It displays it in the status bar (and I made a small change so that it now displays the number of files that were colorized (if there were any))
A (tray icon) tooltip would only be possible (through the helper app) and atm it's only used for standard deviation calculation...
* Don has a tooltip on hover of the the Instant Color Filter toolbar icon
I have no control over what this button displays internally, sorry
Colorize files v0.3.xys
XY_Date deviation helper v2018.08.02.zip

Code: Select all

v0.3
  + Standard deviation now supports numbers from 0.0 up to 9.9 (with a single)
    digit fraction. You can either use a "." or a "," as the delimiter
  + Displays the number of files that were colorized in the statusbar when
    finished

Re: relative age

Posted: 02 Aug 2018 07:52
by jupe
@highend: really impressive script!

@kunkel321: I noticed that you are using a CTB for this script so if you wanted you could modify the end of the script and set your buttons tooltip with ctbname() to what you wanted it to display.