Messed up my stat

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

Messed up my stat

Postby Freeway » Thu Apr 22, 2010 11:58 am

Trying my hand at stats...

My post flop only call % ( ie: the percentage of the time someone calls post flop )
((cnt_f_call + cnt_t_call + cnt_r_call) / (cnt_f_bet + cnt_f_check + cnt_f_raise + cnt_t_bet + cnt_t_check + cnt_t_raise + cnt_r_bet + cnt_r_check + cnt_r_raise)) * 100

I guess its working as written but the result was unexpected.

I played one hand where I called the flop bet and the turn bet.
When the hud did a refresh my value was 200%. See what Im getting at?
Freeway
 
Posts: 191
Joined: Sat Oct 17, 2009 12:56 pm

Re: Messed up my stat

Postby WhiteRider » Thu Apr 22, 2010 12:04 pm

You are not counting calls in the denominator, so the times that you call aren't counting as opportunities to call.
You need to include cnt_x_call in the bit you divide by too.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Messed up my stat

Postby Freeway » Sun Apr 25, 2010 3:17 pm

My fold stat.
What can I add to this so that it only counts the time he folded to a bet and not count the times he faced a bet and a raise.

((cnt_f_fold + cnt_t_fold + cnt_r_fold) / (cnt_f_call + cnt_f_raise + cnt_f_fold + cnt_t_call + cnt_t_raise + cnt_t_fold + cnt_r_call + cnt_r_raise + cnt_r_fold)) * 100
Freeway
 
Posts: 191
Joined: Sat Oct 17, 2009 12:56 pm

Re: Messed up my stat

Postby WhiteRider » Sun Apr 25, 2010 3:30 pm

Have a look at how the "Fold to F Bet" stat is built.
You could either build a pair of columns to count all postflop folds to bets and fold to bet opportunities, or you could use the columns like this from each street in your new stat.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Messed up my stat

Postby Freeway » Tue Apr 27, 2010 12:59 pm

Still messing around with stats trying to an understanding through trial and error. Mostly by duping other columns and stats and making changes and seeing the what happens, if anything :)
I really want to get good at this.
Was going through the forums and found this code and wanted to mess with it and have a question.


Where would this go?
LFI-4EP:PremiPr

Where would this go?
if (cnt_p_lfi_4ep_premipr > 0, 'AA-KK','')


this part would go in the name box of the columns tab
cnt_p_lfi_4ep_premipr


This part would go in the Expression box of the columns tab
sum(if[(holdem_hand_player_statistics.position = 4 OR holdem_hand_player_statistics.position = 5 OR holdem_hand_player_statistics.position = 6 OR holdem_hand_player_statistics.position = 7) AND holdem_hand_player_statistics.flg_p_limp AND holdem_hand_player_statistics.flg_p_open_opp AND (holdem_hand_player_statistics.id_holecard=1 OR holdem_hand_player_statistics.id_holecard=26), 1, 0])
Freeway
 
Posts: 191
Joined: Sat Oct 17, 2009 12:56 pm

Re: Messed up my stat

Postby WhiteRider » Tue Apr 27, 2010 3:31 pm

Freeway wrote:Where would this go?
LFI-4EP:PremiPr
I don't know what that is - do you have a link to where you found it? It's probably just the name of a new stat.

Where would this go?
if (cnt_p_lfi_4ep_premipr > 0, 'AA-KK','')
That looks like it would be in a stat Format Expression. I assume it means: if the player limped first in in EP at least once with a premium pair then display 'AA-KK'.
It might be used in the Value Expression too.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Messed up my stat

Postby Freeway » Thu Apr 29, 2010 2:19 pm

WhiteRider wrote:
Freeway wrote:Where would this go?
LFI-4EP:PremiPr
I don't know what that is - do you have a link to where you found it? It's probably just the name of a new stat.

It's from here
viewtopic.php?f=18&t=18937
Freeway
 
Posts: 191
Joined: Sat Oct 17, 2009 12:56 pm

Re: Messed up my stat

Postby WhiteRider » Thu Apr 29, 2010 2:43 pm

OK, thanks - is there anything else you're not sure about?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Messed up my stat

Postby Freeway » Thu Apr 29, 2010 3:26 pm

WhiteRider wrote:OK, thanks - is there anything else you're not sure about?

yes.
bare with me, I feel like im going in the right direction but...

OK, I made a stat but im not seeing anything. Im using the replayer with hud to check.
This is what I've made and where I put it. everything validates but I think I might be leaving something out.

Columns/name
cnt_p_rfi_bu_premipr

Columns/expression
sum( if[(holdem_hand_player_statistics.position = 0) AND holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open_opp AND (holdem_hand_player_statistics.id_holecard=1 OR holdem_hand_player_statistics.id_holecard=26 OR holdem_hand_player_statistics.id_holecard=49 OR holdem_hand_player_statistics.id_holecard=70), 1, 0])

statistics/definition/name
RFI_BU_Premipr

statistics/definition/value expression
(cnt_p_rfi_bu_premipr / cnt_p_open_opp )

statistics/format/format expression
if (cnt_p_rfi_bu_premipr > 0, 'AA-JJ','')
Freeway
 
Posts: 191
Joined: Sat Oct 17, 2009 12:56 pm

Re: Messed up my stat

Postby WhiteRider » Thu Apr 29, 2010 3:50 pm

Have you been able to add your new stat to the HUD?
Because of the way the format expression works you will only see anything for the stat if cnt_p_rfi_bu_premipr > 0 - are you sure that will be the case for one of the players you're looking at?
You might want to try using the 'normal' format expression of /%.2f to get things going, then change it to how you have it now once you find a player where the condition applies.
You could also try adding your stat to a report to test it there - maybe in the Hands tab, then you'll see it broken up by starting hand, and it should only have a value for those specific starting hands. That's how I'd start testing it.
I'm just about done for the night, but if you're still struggling please post back and I'll look into it further when I have some time.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

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

Who is online

Users browsing this forum: No registered users and 0 guests