RFI by Position

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

RFI by Position

Postby andyakb » Tue Sep 09, 2008 11:48 pm

Hi I'm having trouble creating a stat that would return the % a player raise first in by position. I know RFI returns the amount of hands raised first in but how can I narrow it down to positions? thank you.
andyakb
 
Posts: 6
Joined: Tue Sep 02, 2008 7:45 pm

Re: RFI by Position

Postby WhiteRider » Wed Sep 10, 2008 9:02 am

Someone has already built PFR and VP$IP by position stats, and they are available on page 1 of the stats section of the Repository.

You should be able to see how to adapt these for RFI.

See also, the Custom Statistics and Reports FAQ.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RFI by Position

Postby andyakb » Wed Sep 10, 2008 11:46 pm

so how does this look? im not sure how to make it work.

SUM(if[cnt_p_first_raise AND holdem_hand_player_statistics.position = 0,1,0]) / SUM(if[holdem_hand_player_statistics.position = 0,1,0]) * 100

this would be for the button FIR
andyakb
 
Posts: 6
Joined: Tue Sep 02, 2008 7:45 pm

Re: RFI by Position

Postby WhiteRider » Thu Sep 11, 2008 5:44 am

No, you will need to use the content of the RFI columns, not the value of the column itself.
I was sure I'd posted this somewhere, but I can't find it now..
Ah, there it is:
viewtopic.php?f=19&t=1559&p=55010&hilit=cnt_p_raise_first_in#p55010
I'll link that thread back here too.

You would need to do this:
cnt_p_raise_first_in_p0 =
sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 0, 1, 0])

Do the same for the cnt_p_open_opp column.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RFI by Position

Postby andyakb » Thu Sep 11, 2008 3:05 pm

WhiteRider wrote:No, you will need to use the content of the RFI columns, not the value of the column itself.
I was sure I'd posted this somewhere, but I can't find it now..
Ah, there it is:
viewtopic.php?f=19&t=1559&p=55010&hilit=cnt_p_raise_first_in#p55010
I'll link that thread back here too.

You would need to do this:
cnt_p_raise_first_in_p0 =
sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 0, 1, 0])

Do the same for the cnt_p_open_opp column.


Why do we need the open_opp column? In the stat documentation it says that the RFI stat is "The percentage of time a player raised and was the first one in the pot" so doesnt that basically make the addition of the open opportunity stat redundant?

So for the stat it would be:
sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.position = 0, 1, 0])

Sorry if Im way off here, Ireally do appreciate your help.

Also, I couldnt find the cnt_p_open_opp column
andyakb
 
Posts: 6
Joined: Tue Sep 02, 2008 7:45 pm

Re: RFI by Position

Postby WhiteRider » Thu Sep 11, 2008 5:36 pm

RFI *is* raised first in, but the way to count instances of that happening is to count how often you made the first raise (note, not first action, there could have been a call before you) and you had the opportunity to open the action (i.e. there were no calls before you).
If you leave out the open_opp check, it would count hands where you made the first raise including those with limpers.

cnt_p_open_opp is a Column in the same section 'holdem cash player statistics' which is used to count the opportunities a player has to open the pot. Pretty straightforward.
= sum(if[holdem_hand_player_statistics.flg_p_open_opp, 1, 0])
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RFI by Position

Postby andyakb » Thu Sep 11, 2008 6:20 pm

WhiteRider wrote:RFI *is* raised first in, but the way to count instances of that happening is to count how often you made the first raise (note, not first action, there could have been a call before you) and you had the opportunity to open the action (i.e. there were no calls before you).
If you leave out the open_opp check, it would count hands where you made the first raise including those with limpers.

cnt_p_open_opp is a Column in the same section 'holdem cash player statistics' which is used to count the opportunities a player has to open the pot. Pretty straightforward.
= sum(if[holdem_hand_player_statistics.flg_p_open_opp, 1, 0])

Hmm, alright, I remember reading a thread where it seemed it wasnt clear what exactly it stood for. When I looked at the end user documentation it said that the RFI stat is when you raise AND are the first player in the pot, so that made me think you didnt need the open opportunity. I guess that documentation isnt accurate, so i appreciate the clarification
andyakb
 
Posts: 6
Joined: Tue Sep 02, 2008 7:45 pm

Re: RFI by Position

Postby WhiteRider » Fri Sep 12, 2008 4:51 am

No, you're right, RFI (raise first in) IS when you raise AND are the first player in the pot, but that's not what the database field:
holdem_hand_player_statistics.flg_p_first_raise
..records.
It records whether you made the first raise, not whether that raise was the first action in the hand.

So to build the RFI stat (and the cnt_p_raise_first_in Column) you also need to check whether you are first to act when you make that raise.

holdem_hand_player_statistics.flg_p_first_raise will be true in both the following cases:

1.
UTG call
UTG+1 (hero) raise

2.
UTG fold
UTG+1 (hero) raise

But only 2 is a RFI.
holdem_hand_player_statistics.flg_p_open_opp will be false for hand 1, but true for hand 2.

Does that make sense?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: RFI by Position

Postby andyakb » Sun Sep 14, 2008 11:58 pm

so how does this look?
Code: Select all
cnt_p_raise_first_in_p0 =
sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 0, 1, 0])/sum( if[holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position = 0, 1, 0])
andyakb
 
Posts: 6
Joined: Tue Sep 02, 2008 7:45 pm

Re: RFI by Position

Postby WhiteRider » Mon Sep 15, 2008 4:49 am

You can't do the division in the Column, you need to create 2 columns which count ("Sum") the 2 sets of figures (actions and opportunities) then in the Statistic you can divide one column by the other - like the RFI stat does.

The Column is going through each stat and summing up a 1 or 0 for each hand - your Column is summing up ( (1 or 0) / (1 or 0) ), which won't produce the correct results..

I'll write up an explanation of how Sum() and if[] work in the Custom Stats FAQ later, when I have time - I thought I'd already done that..
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 2 guests