2013年12月29日星期日

Fwd: An interesting property of AUC

Get definition of AUC here


Property: if you flip ground truth only, or flip prediction only, you will get 1-original AUC as new AUC.

Proof:
Take original ROC curve as function of moving score threshold (x(s),y(s))=(fp(s)/N, tp(s)/P)
Where fp(s) is false positive=number of cases predicted as positive under score threshold s but actually negative.
tp(s) is true postive=number of cases predicted as positive and actually also positive.
N is number of negative cases and P is number of positive cases.

1. Flip ground truth only
You will get P'=N and N'=P. Note that prediction is kept unchanged, so fp'(s)=tp(s), tp'(s)=fp(s).
As a result, (x'(s),y'(s))=(y(s),x(s)), which means the two curves are symmetric to line y=x.
So, the area a is the same as area c.
Note that a+b+c=1, so a+(a+b)=1 where a and a+b are AUC before and after ground truth flip.

2. Flip prediction only
You will get N'=N, P'=P, fp'(s)=N-fp(s) and tp'(s)=P-tp(s). 
As a result, (x'(s),y'(s))=(1-x(s), 1-y(s)), which means the cuve flip according to line x=1/2 and then flip according to line y=1/2.
Note that the flip horizontal never change the area under the curve.
while flip vertical make the curve top down, that is to say, the area under the new curve is the area above the original curve.
So AUC+AUC'=1.
#



    

2013年12月2日星期一

Fwd: Copy path in context menu



Copy, save and click to add into regedit.

 

 

Add Copy as Path Option.reg

-----------

 

 

Windows Registry Editor Version 5.00

 

;Created by Vishal Gupta for AskVG.com

 

[HKEY_CLASSES_ROOT\*\shell\Copy Full Path]

 

[HKEY_CLASSES_ROOT\*\shell\Copy Full Path\command]

@="cmd.exe /c echo %1|clip"

 

 

[HKEY_CLASSES_ROOT\*\shell\Copy Filename]

 

[HKEY_CLASSES_ROOT\*\shell\Copy Filename\command]

@="cmd /c for %%i in (\"%1\") do @echo %%~nxi | clip"

 

 

[HKEY_CLASSES_ROOT\*\shell\Copy Dir Path]

 

[HKEY_CLASSES_ROOT\*\shell\Copy Dir Path\command]

@="cmd /c for %%i in (\"%1\") do @echo %%~dpi | clip"

 

 

[HKEY_CLASSES_ROOT\Directory\shell\Copy Dir Path]

 

[HKEY_CLASSES_ROOT\Directory\shell\Copy Dir Path\command]

@="cmd.exe /c echo %1|clip"

 

=======

 

Remove Copy as Path Option.reg

----------

 

Windows Registry Editor Version 5.00

 

;Created by Vishal Gupta for AskVG.com

 

[-HKEY_CLASSES_ROOT\*\shell\Copy Full Path]

 

[-HKEY_CLASSES_ROOT\*\shell\Copy Filename]

 

[-HKEY_CLASSES_ROOT\*\shell\Copy Dir Path]

 

[-HKEY_CLASSES_ROOT\Directory\shell\Copy Dir Path]

 

 

 

 

 

=======

 

 

Enjoy~