Custom Stat Help

Questions and discussion about PokerTracker 4 for Windows

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: Custom Stat Help

Postby mannue » Thu Feb 16, 2012 11:45 pm

antneye wrote:
kraada wrote:anteeye:

(1) Ok in that case these can be built very easily as custom stats. For example, on the flop:
cnt_f_bet_fold: sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.flg_f_fold, 1, 0])
cnt_f_bet_face_raise: sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.flg_f_face_raise, 1, 0])

Put the former over the latter and multiply by 100 to get the stat. You can also substitute _t_ or _r_ for _f_ to get turn and river, respectively.

(2) Start with the stat from (1) - that should help you get used to the way things work. Create those columns in the Player section then build the flop stat - that is almost entirely copy and paste. Then alter then to make the turn and river version and you'll be starting on your way. The main structure adds up each time some set of tests is true and when it is, it adds 1 and when it is false it adds 0. You can see lots of other things to test for in the other columns that exist and these can be mixed and matched however you like.

(3/4) I'll discuss this with the development team but I can't guarantee that these will necessarily be added as default statistics.


OK....kind of psyched....I think I as able to build B/Fold (item 1 above) for the Flop, Turn and River but I won't know for sure if I have gotten it EXACTLY right until I finish building the other possibilities....Bet/Call and Bet/Raise. Taken together these should add to 100% and represent the full range of villains possible actions when he bets and faces a raise. I'm slowly getting the hand of this but could use some help creating the cnt_f_bet_call and cnt_f_bet_raise expressions....would it be as simple as the following?

cnt_f_bet_call:sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.flg_f_call, 1, 0])

and

cnt_f_bet_raise:sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.flg_f_raise, 1, 0])

That seems right to me if I am understanding this properly


Thanks for all of your help!

Edit: Bah....it must be wrong because I am getting a not valid sql error. any clues?


If u would have read the instruction of white rider, one site before, you would know, that the blue part is the recommended name of the stat and the red one only the expression
mannue
 
Posts: 32
Joined: Wed Dec 16, 2009 7:52 am

Re: Custom Stat Help

Postby antneye » Thu Feb 16, 2012 11:56 pm

mannue wrote:If u would have read the instruction of white rider, one site before, you would know, that the blue part is the recommended name of the stat and the red one only the expression


I did.....the expression is what is getting the error. The one provided to me worked, the one i tried to infer failed.
antneye
 
Posts: 37
Joined: Mon Feb 18, 2008 7:01 pm

Re: Custom Stat Help

Postby mannue » Fri Feb 17, 2012 2:15 am

ok sry, yeah tried it too, and also got an SQl error
mannue
 
Posts: 32
Joined: Wed Dec 16, 2009 7:52 am

Re: Custom Stat Help

Postby WhiteRider » Fri Feb 17, 2012 5:41 am

Calls and raises are not stored in the database as flags (flg_xxx) because they can happen more than once - they are therefore stored as counts (cnt_xxx).

So instead of:
cash_hand_player_statistics.flg_f_call
..you need to use
cash_hand_player_statistics.cnt_f_call > 0

i.e. If the number of times the player called on the flop was more than zero.
Similarly for raises you need to use:
cash_hand_player_statistics.cnt_f_raise > 0

"cash_hand_player_statistics.flg_f_bet" is fine because you can only "bet" once, so this is a "flag" value.

So you need:

cnt_f_bet_call =
sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.cnt_f_call > 0, 1, 0])

and

cnt_f_bet_raise =
sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.cnt_f_raise > 0, 1, 0])
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Custom Stat Help

Postby antneye » Fri Feb 17, 2012 11:09 am

WhiteRider wrote:Calls and raises are not stored in the database as flags (flg_xxx) because they can happen more than once - they are therefore stored as counts (cnt_xxx).

So instead of:
cash_hand_player_statistics.flg_f_call
..you need to use
cash_hand_player_statistics.cnt_f_call > 0

i.e. If the number of times the player called on the flop was more than zero.
Similarly for raises you need to use:
cash_hand_player_statistics.cnt_f_raise > 0

"cash_hand_player_statistics.flg_f_bet" is fine because you can only "bet" once, so this is a "flag" value.

So you need:

cnt_f_bet_call =
sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.cnt_f_call > 0, 1, 0])

and

cnt_f_bet_raise =
sum(if[cash_hand_player_statistics.flg_f_bet and cash_hand_player_statistics.cnt_f_raise > 0, 1, 0])


Thanks! One minor issue that I am hoping you can help me with. The formula is almost perfect except for the fact that it double counts an occurrence as B/F AND B/R when the line goes B/R/C which is what happens when you bet, get raised, 3! and then villain caps...remember, this is old fart Limit :)

So the Q is how can I add to the expression to make sure this only gets counted as Bet/Raise, and not also in the Bet/Call category?
antneye
 
Posts: 37
Joined: Mon Feb 18, 2008 7:01 pm

Re: Custom Stat Help

Postby antneye » Fri Feb 17, 2012 11:27 am

kraada wrote:(2) This statistic can be built and is definitely much more applicable to limit than no limit as you get to showdown much more in limit. The easiest place to start here would be with the check raise stats and duplicate the check raise column and use it to build two new versions - one for check raise and get to showdown, one for check raise and win at showdown (see WSD for how those work), then use those two new columns to build your stat.


Attempting to move on to #2 while I wait on final clarification on the post above....

For this one I tried to build the first column for Check raise and win at showdown and came up with this:

sum(if[cash_hand_player_statistics.flg_f_check_raise, 1, 0])and sum(if[cash_hand_player_statistics.flg_showdown, 1, 0])

I received an error stating you cannot use miltiple aggregate functions in a single column. Where am I going wrong?

To clarify I m trying to build stats for Win % at showdown when c/r flop and then do the same for turn and river.
antneye
 
Posts: 37
Joined: Mon Feb 18, 2008 7:01 pm

Re: Custom Stat Help

Postby kraada » Fri Feb 17, 2012 11:32 am

There are several ways you can go - the custom stats area is pretty flexible.

(1) The easiest might be just to specify the exact line - we have an actions string which tells you exactly what actions someone did.

For example:

sum(if[lookup_actions_f.action LIKE 'BC%', 1, 0])

means his actions were bet, then call, then anything (% means anything can follow but doesn't have to follow).

So you could use sum(if[lookup_actions_f.action LIKE 'BR%', 1, 0]) for bet/raise. You would use the same column for opportunities since facing a raise is still facing a raise.

(2) You can use other columns to narrow things down - if you bet and face a raise and call, you had a chance to 3bet but did not do so. So you can use not(cash_hand_player_statistics.flg_f_3bet) on the bet/call line to make sure you didn't bet/raise. You might also want to use not(cash_hand_player_statistics.flg_f_4bet) too to eliminate weird edge cases where you bet and call and someone else makes the 3bet which gets called then you cap - but that seems pretty rare. For the other way around you can affirmatively say that you did make the 3bet - then you bet and raised and your raise was definitely a 3bet so it was clearly a B/R line.

There are probably other configurations you could do too - those are the first two that come to mind that should be easy to grasp :)

For the checkraise column you want to put the AND inside the if statement like this:

sum(if[cash_hand_player_statistics.flg_f_check_raise and cash_hand_player_statistics.flg_showdown, 1, 0])
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Custom Stat Help

Postby antneye » Fri Feb 17, 2012 12:03 pm

kraada wrote:There are several ways you can go - the custom stats area is pretty flexible.

(1) The easiest might be just to specify the exact line - we have an actions string which tells you exactly what actions someone did.

For example:

sum(if[lookup_actions_f.action LIKE 'BC%', 1, 0])

means his actions were bet, then call, then anything (% means anything can follow but doesn't have to follow).

So you could use sum(if[lookup_actions_f.action LIKE 'BR%', 1, 0]) for bet/raise. You would use the same column for opportunities since facing a raise is still facing a raise.

(2) You can use other columns to narrow things down - if you bet and face a raise and call, you had a chance to 3bet but did not do so. So you can use not(cash_hand_player_statistics.flg_f_3bet) on the bet/call line to make sure you didn't bet/raise. You might also want to use not(cash_hand_player_statistics.flg_f_4bet) too to eliminate weird edge cases where you bet and call and someone else makes the 3bet which gets called then you cap - but that seems pretty rare. For the other way around you can affirmatively say that you did make the 3bet - then you bet and raised and your raise was definitely a 3bet so it was clearly a B/R line.

There are probably other configurations you could do too - those are the first two that come to mind that should be easy to grasp :)

For the checkraise column you want to put the AND inside the if statement like this:

sum(if[cash_hand_player_statistics.flg_f_check_raise and cash_hand_player_statistics.flg_showdown, 1, 0])


So would you recommend I totally change my approach to all three versions of this to use the action string of BC, BF, and BR for Bet/Call, Bet/Fold and Bet/Raise? Or should I just use it for the one instance I am having troubles with? Is one approach more efficient than the other?
antneye
 
Posts: 37
Joined: Mon Feb 18, 2008 7:01 pm

Re: Custom Stat Help

Postby mannue » Fri Feb 17, 2012 9:28 pm

Hi,

Did u got my support ticket with the Hand histories of 4b/f stat!?
mannue
 
Posts: 32
Joined: Wed Dec 16, 2009 7:52 am

Re: Custom Stat Help

Postby WhiteRider » Sat Feb 18, 2012 6:48 am

anteye - if you want to check for exactly bet/call and rule out bet/raise/call (and for the other combinations) then using the actions strings as kraada suggests will get you what you want. That is the approach I would use.

mannue - please bear with us as we catch up with the tickets; we've had a large volume of support requests with the expansion of the PT4 beta program and we're not quite back on top of the tickets yet. If you post your ticket number here I'll check it's in the right place.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

PreviousNext

Return to PokerTracker 4

Who is online

Users browsing this forum: No registered users and 160 guests

cron