need help with custom stat - % folded after flop

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

Re: need help with custom stat - % folded after flop

Postby squeebo » Thu Nov 11, 2010 8:54 pm

As far as this suggestion given to narrow it down by how often a player had an opportunity to fold:

cnt_postflop_fold_opp =
sum( if[ (holdem_hand_player_detail.amt_f_bet_facing + holdem_hand_player_detail.amt_f_raise_facing + holdem_hand_player_detail.amt_t_bet_facing + holdem_hand_player_detail.amt_t_raise_facing + holdem_hand_player_detail.amt_r_bet_facing + holdem_hand_player_detail.amt_r_raise_facing) > 0), 1, 0 ] )


There's too many closed parentheses in that, so it can't be validated, so I removed one and used this:

cnt_postflop_fold_opp =
Code: Select all
sum( if[ (holdem_hand_player_detail.amt_f_bet_facing + holdem_hand_player_detail.amt_f_raise_facing + holdem_hand_player_detail.amt_t_bet_facing + holdem_hand_player_detail.amt_t_raise_facing + holdem_hand_player_detail.amt_r_bet_facing + holdem_hand_player_detail.amt_r_raise_facing) > 0, 1, 0 ] )


And that doesn't work. One player has stats that he folded postflop 120% (6/5) of the time. I get the point that I don't want to include hands he checked down. The cnt_fold_postflop column is right, but the cnt_postflop_fold_opp column is wrong. Any idea?

Does it have anything to do with the fact that one column uses holdem_hand_player_statistics and the other uses holdem_hand_player_detail?
squeebo
 
Posts: 29
Joined: Fri Dec 04, 2009 4:22 am

Re: need help with custom stat - % folded after flop

Postby WhiteRider » Fri Nov 12, 2010 5:23 am

It will fall down if a player folds when they don't need to - i.e. if they fold when not facing a bet or raise.
To avoid that you'll need to use the same check as the opportunities column in the actions column:

cnt_postflop_fold =

sum( if[ (holdem_hand_player_detail.amt_f_bet_facing + holdem_hand_player_detail.amt_f_raise_facing + holdem_hand_player_detail.amt_t_bet_facing + holdem_hand_player_detail.amt_t_raise_facing + holdem_hand_player_detail.amt_r_bet_facing + holdem_hand_player_detail.amt_r_raise_facing) > 0 AND holdem_hand_player_statistics.enum_folded != 'N', 1, 0 ] )
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: need help with custom stat - % folded after flop

Postby antiguy » Tue Dec 21, 2010 2:21 pm

I made my own fold % postflop and bet, raise, and call postflop (or I thought i did till this post). I'm brand new to both postgres and pokertracker but I'm learning.

The code is valid but I need to know if it gets the job done.
value expression for column cnt_total_actions_postflop
Code: Select all
cnt_f_total_actions + cnt_t_total_actions + cnt_r_total_actions

value expression for stat Post Flop Fold %
Code: Select all
100 * (cnt_f_fold + cnt_t_fold + cnt_r_fold) / cnt_total_actions_postflop


I just used the same basic idea for the other postflop actions. Seems to work fine, they all generate data, no 0's out of place or anything like that. I am most likely missing something small that throws everything off. Please check it out and tell me what you think. It would be sick if I got it right. Thank You ahead of time.
antiguy
 
Posts: 10
Joined: Mon Aug 09, 2010 9:37 pm

Re: need help with custom stat - % folded after flop

Postby kraada » Tue Dec 21, 2010 2:36 pm

That will work but it's important to point out that while it gives you data you need to know what you're getting.

If a player bets the flop and folds to a raise, with your stat he'll have a 50% fold percentage - because of his actions (1 bet, 1 fold), 50% of them were folds. If that's what you want, that's great and you're all set, but if that's not what you want, then this construction is not going to work for you.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: need help with custom stat - % folded after flop

Postby antiguy » Wed Dec 22, 2010 6:32 pm

I guess that is a bit vague huh. Well lets see what you think of this one.

Column cnt_f_postflop_fold_after_vpip
Code: Select all
sum( if[ holdem_hand_player_statistics.flg_vpip AND(holdem_hand_player_detail.amt_f_bet_facing + holdem_hand_player_detail.amt_f_raise_facing + holdem_hand_player_detail.amt_t_bet_facing + holdem_hand_player_detail.amt_t_raise_facing + holdem_hand_player_detail.amt_r_bet_facing + holdem_hand_player_detail.amt_r_raise_facing) > 0 AND holdem_hand_player_statistics.enum_folded != 'N', 1, 0 ] )

Column cnt_f_postflop_fold_after_vpip_opp
Code: Select all
sum(if[ holdem_hand_player_statistics.flg_vpip AND holdem_hand_player_statistics.flg_f_saw AND holdem_hand_player_statistics.enum_folded != 'N', 1, 0])

Stat Fold Flop/Postflop Range VP$IP
Code: Select all
(cnt_vpip / cnt_hands) / (100 * (cnt_f_postflop_fold_after_vpip / cnt_f_postflop_fold_after_vpip_opp))


Not to bad eh? I put the vp flag in use guyses columns so it wont count bb checks or folds after bb checks and i hope that does the trick.

So am I catching on?
antiguy
 
Posts: 10
Joined: Mon Aug 09, 2010 9:37 pm

Re: need help with custom stat - % folded after flop

Postby kraada » Wed Dec 22, 2010 6:59 pm

One note: In the first column you're requiring that you face some kind of bet - if you bet and get raised and fold, it won't count here, but it will count as an opportunity.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: need help with custom stat - % folded after flop

Postby antiguy » Wed Dec 22, 2010 9:31 pm

Well that won't do. I just noticed I did the columns wrong...sheesh. No No I am not catching on. FAIL. :?
antiguy
 
Posts: 10
Joined: Mon Aug 09, 2010 9:37 pm

Re: need help with custom stat - % folded after flop

Postby kraada » Thu Dec 23, 2010 9:42 am

Practice makes perfect - you'll get it :)
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

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

Who is online

Users browsing this forum: No registered users and 11 guests

cron
highfalutin