Made my own position stats, but weird numbers

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Made my own position stats, but weird numbers

Postby Beck » Thu Nov 18, 2010 8:12 pm

I use the following stats for 6 max. I want Button to be LP, CO to be MP, and UTG and UTG+1 to be EP. So in several hands there will be no EP for instance.

VPIP blinds
    sum(if[holdem_hand_player_statistics.flg_vpip and (holdem_hand_player_statistics.flg_blind_b OR holdem_hand_player_statistics.flg_blind_s), 1, 0])

VPIP Early position
Code: Select all
sum(if[holdem_hand_player_statistics.flg_vpip and
((holdem_hand_summary.cnt_players = 5 and holdem_hand_player_statistics.position = 2) or
(holdem_hand_summary.cnt_players = 6 and holdem_hand_player_statistics.position = 3 or holdem_hand_player_statistics.position = 2)), 1, 0])


VPIP MP
Code: Select all
sum(if[holdem_hand_player_statistics.flg_vpip and
((holdem_hand_summary.cnt_players > 3 and holdem_hand_player_statistics.position = 1)), 1, 0])


VPIP LP
Code: Select all
sum(if[holdem_hand_player_statistics.flg_vpip and  ((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_statistics.position = 0)), 1, 0])


Now I just looked through a session, that gives me weird numbers in the replayer. After 17 hands, playing 4 and 5 handed, I've been in the following positions:
Blind 8 times (VPIP blind 8)
Button 4 times (VPIP LP 4)
CO 1 time when four handed, and 2 times when 5 handed (VPIP MP 3)
UTG 2 times when 5 handed (VPIP EP 2)

Now, when looking at the hud, it show the following:
VPIP EP 0% (0/3) (when hovering mouse: This session 0% (0/3) 0/2)
VPIP MP 0% (0/0) (Hover mouse: This session 0% (0/0)(1/3)
VPIP LP 50% (3/6) (Hover mouse: This session 50% (3/6) (2/4)
VPIP Blind (0% (0/8) (Hover mouse: This session 0% (0/8)(0/8)
I put in money 2 times on the button, and 1 time on CO when 5 handed, so it appears the numbers in the second set of parenthesis are correct, but why isnt that shown? Is my HUD setup wrong?
Beck
 
Posts: 58
Joined: Tue Jun 10, 2008 3:27 am

Re: Made my own position stats, but weird numbers

Postby WhiteRider » Fri Nov 19, 2010 4:20 am

What are you dividing those columns by? If you add new actions columns,then you will need to add new opportunities columns too.
E.g. if you have:
cnt_vpip_lp =
sum(if[holdem_hand_player_statistics.flg_vpip and ((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_statistics.position = 0)), 1, 0])
..then you also need
cnt_vpip_lp_opp =
sum(if[(holdem_hand_summary.cnt_players > 2 and holdem_hand_player_statistics.position = 0), 1, 0])
..with a stat Value Expression of:
(cnt_vpip_lp / cnt_vpip_lp_opp) * 100

If you're seeing two sets of opportunities brackets then it's possible you have something in the Format Expression which is giving the wrong values. Try changing that to
%/.2f
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Made my own position stats, but weird numbers

Postby Beck » Fri Nov 19, 2010 6:52 pm

Have upgraded to 3.07.9Beta, and cache is 100% but same problem.

VPIP EP stat
Code: Select all
(cnt_vpip_ep_6max / cnt_hands_ep_6max) * 100


cnt_vpip_ep_6max
Code: Select all
sum(if[holdem_hand_player_statistics.flg_vpip and
((holdem_hand_summary.cnt_players = 5 and holdem_hand_player_statistics.position = 2) or
(holdem_hand_summary.cnt_players = 6 and holdem_hand_player_statistics.position = 3 or holdem_hand_player_statistics.position = 2)), 1, 0])


cnt_hands_ep_6max
Code: Select all
sum(if[((holdem_hand_summary.cnt_players = 5 and holdem_hand_player_statistics.position = 2) or
(holdem_hand_summary.cnt_players = 6 and holdem_hand_player_statistics.position = 3 or holdem_hand_player_statistics.position = 2))
, 1, 0])


VPIP MP stat
Code: Select all
(cnt_vpip_mp_6max / cnt_hands_mp_6max) * 100


cnt_vpip_mp_6max
Code: Select all
sum(if[holdem_hand_player_statistics.flg_vpip and
((holdem_hand_summary.cnt_players > 3 and holdem_hand_player_statistics.position = 1)), 1, 0])


cnt_hands_mp_6max
Code: Select all
sum(if[((holdem_hand_player_statistics.position = 1)), 1, 0])


VPIP LP stat
Code: Select all
(cnt_vpip_lp_6max / cnt_hands_lp_6max) * 100


cnt_vpip_mp_6max
Code: Select all
sum(if[holdem_hand_player_statistics.flg_vpip and  ((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_statistics.position = 0)), 1, 0])


cnt_hands_lp_6max
Code: Select all
sum(if[((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_statistics.position = 0)), 1, 0])


VPIP LP format expression
Code: Select all
format( '{1}% ({2}/{3})', format_number((cnt_vpip_lp / cnt_hands_lp) * 100 ,0,false,false), cnt_vpip_lp, cnt_hands_lp )

Is this wrong? What would I have to change here?

EDIT: Looks like theres something wrong in the format expression, since it refers to cnt_vpip_lp and cnt_hands_lp, where it should be cnt_vpip_lp_6max and cnt_hands_lp_6max
Does the rest of the format expression look correct? I'm pretty sure I just copied it and altered t a bit form an existing stat, as I didnt know, exactky how they should be made,

EDIT: Changed the format expression to refer to the correct columns, no change. Also tried changing the format expression to /%.2f , but still no change. Do I need to rebuild the cache or anything first?
Beck
 
Posts: 58
Joined: Tue Jun 10, 2008 3:27 am

Re: Made my own position stats, but weird numbers

Postby kraada » Fri Nov 19, 2010 8:24 pm

That sort of particular formatting to get the times and opportunities option is no longer really necessary - you can just use the Show Times/Opportunities setting in the HUD directly. You also may want to add some sort of players qualifier to cnt_hands_mp_6max - right now it's the same as the number of hands you played in the cutoff no matter how many players were involved in the hand.

You definitely want to make sure the Value Expression is pointing to all of the correct columns - if that had the wrong columns picked out that would definitely cause strange results in your popup.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Made my own position stats, but weird numbers

Postby Beck » Sat Nov 20, 2010 2:59 am

They are all pointing to the right columns now. I changed it to format expression /%.2f but it's still the same. Any suggestions?
Beck
 
Posts: 58
Joined: Tue Jun 10, 2008 3:27 am

Re: Made my own position stats, but weird numbers

Postby WhiteRider » Sat Nov 20, 2010 5:10 am

Did you restart since then? If the HUD was still running when you updated your stats then the changes wouldn't be applied to the HUD.

If you're still having problems with the stats please export one of them and attach it to a Support ticket so that we can investigate.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests