PDA

View Full Version : trying to make custom stat, problem with vpip



zoom7
09-28-2009, 07:36 AM
I copy pasted the VPIP stat directly from the examples at http://www.holdemmanager.net/forum/showthread.php?t=3595 to CustomStats.txt but it doesn't give the correct result.

Here's the stat:


Stat GroupName="Default" ColumnName="VPIP" ValueExpressions="sum(case when didvpip = true then 1 else 0 end) as VPIPHands" Evaluate="VPIPHands*100.0/TotalHands" ColumnHeader="VPIP%" ColumnFormat="0.0" ColumnWidth="61" Tooltip="% of hands player voluntarily put money in"


I did try to change ValueExpressions etc just to make sure the variables had different names than the original VPIP stat so it wouldn't fuck anything up but the results were the same. Here's the modified one:



Stat GroupName="Default" ColumnName="VPIP666" ValueExpressions="sum(case when didvpip = true then 1 else 0 end) as VPIPHands666" Evaluate="VPIPHands666*100.0/TotalHands" ColumnHeader="VPIP666%" ColumnFormat="0.0" ColumnWidth="61" Tooltip="666% of hands player voluntarily put money in"


If it's any help, the VPIP displayed by this copied stat is smaller than the the real one displayed by inbuilt VPIP stat.

EDIT: CODE tag doesn't work, grrrr

fozzy71
09-28-2009, 09:03 AM
I have forwarded this thread to the developer for a reply.

TheZepper
09-29-2009, 08:33 PM
Zoom7: I'll bet that 99.99% of time your problem is because of the way HEM counts hands in the BB. Hard to explain why this number is different from what you probably expect (but is mostly due to posting out of position and I think the BB is the default position when HEM has inadequate or corrupted data on hero's position), but the difference is insignificant most of the time. However, you can adjust for it with a custom stat (which, unfortunately, I can't find right now...Sorry).
Hope this helps.

p.s. Just remembered - look to number of hands BB sees flop without VPIP........

zoom7
09-30-2009, 02:54 AM
Zoom7: I'll bet that 99.99% of time your problem is because of the way HEM counts hands in the BB. Hard to explain why this number is different from what you probably expect (but is mostly due to posting out of position and I think the BB is the default position when HEM has inadequate or corrupted data on hero's position), but the difference is insignificant most of the time. However, you can adjust for it with a custom stat (which, unfortunately, I can't find right now...Sorry).
Hope this helps.
Thanks but think about it: I copy pasted the VERY SAME VPIP STAT that is (or should be) used by HEM in to CustomStats, and it gave a different result. It should definitely give the same result as the built in one. The only explanations I can think of are 1) CustomStats are handled differently from built in ones 2) The stat at http://www.holdemmanager.net/forum/showthread.php?t=3595 is outdated

Oh and I guess I should also mention all hands I'm testing with are heads up.


p.s. Just remembered - look to number of hands BB sees flop without VPIP........
I don't understand what would this have to do with it... flop shouldn't matter when calculating preflop VPIP/PFR.

TheZepper
10-03-2009, 06:40 PM
Just sayin - I ran into exact same problem (6 max - don't know if HU would make any difference). The BB VPIP stat IS different when run as a custom stat because the DENOMINATOR is different than when run as a DEFAULT STAT. Can't explain why the denominators vary, but I did manage to write a custom VPIP stat that matched the HEM stat (still haven't run into it but when I do I'll post it).
Its not the flop that maters, its that BB is only position that can see the flop w/o VPIP that counts (affects denominator).

TheZepper
10-03-2009, 07:58 PM
Found it. I believe that in HU might make a difference... like a humungous difference!

Try: ColumnName="xPF BB ADJ VPIP% " ValueExpressions="sum(case when ph.PositionType_ID = 1 and ph.didvpip = true then 1 else 0 end) as xBBVPIPTOT;
sum(case when ph.PositionType_ID = 1 then 1 else 0 end) as xBBVPIPGrossNUMHds;
sum(case when ph.PositionType_ID = 1 and ph.netamountwon > 0 and ph.maxstreetseen = 0 and ph.didvpip = false then 1 else 0 end) as xBBVPIPNUMHdsADJ;" Evaluate="xBBVPIPTOT/(xBBVPIPGrossNUMHds-xBBVPIPNUMHdsADJ)" ColumnHeader="BB VPIP\n ADJ%"

Its not just that BB can see flop w/o VPIP, its that BB only position that can WIN HAND w/o VPIP that matters.... Its a hand played (TotalHands = 1) but can't be counted as a hand where VPIP is possible (VPIPHands = 0).

zoom7
10-04-2009, 03:36 AM
It works (with minor changes), thanks :)

I didn't fully understand your explanation yet tho but I'll look into it.

Rvg72
10-06-2009, 06:27 PM
Hi guys, as you discovered, we modified the formula for a couple of stats - most notably VPIP and PFR since you shouldn't count hands where you were in the BB and it was folded to you.

<Stat GroupName="Default" ColumnName="VPIP" ValueExpressions="sum(case when didvpip = true then 1 else 0 end) as VPIPHands; sum(case when ph.preflopaction_id <> -1 then 1 else 0 end) as TotalPlayableHands" Evaluate="VPIPHands*100.0/TotalPlayableHands" ColumnHeader="VPIP%" ColumnFormat="0.0" ColumnWidth="61" Tooltip="% of hands player voluntarily put money in" />

<Stat GroupName="Default" ColumnName="PFR" ValueExpressions="sum(case when didpfr = true then 1 else 0 end) as PFRHands; sum(case when ph.preflopaction_id <> -1 then 1 else 0 end) as TotalPlayableHands" Evaluate="PFRHands*100.0/TotalPlayableHands" ColumnHeader="PFR%" ColumnFormat="0.0" ColumnWidth="61" Tooltip="% of hands player raised" />"

TheZepper
10-06-2009, 11:23 PM
Had to laugh - When I got zoom7's reply today (re: minor changes) I looked at my stat more closely and realized by how poorly it was written that I wrote it quite a while ago and that I needed to review several reports and amend if necesary. So I rewrote stat and logged on only to see that I was beaten to the punch......

Just wondering - would it be possible to post any stats that have been changed (OR ADDED) since last year?

Thanks