Analyze population

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: Analyze population

Postby myeari » Tue Mar 12, 2024 7:27 pm

I found something in the forum.
I attached two screenshots for the new column and the new stat.
Are they correct?
I cannot check it because for some reason i cannot applying it and see it in my stat list.
Attachments
new stat.png
new column.png
myeari
 
Posts: 10
Joined: Sun Nov 26, 2023 6:08 am

Re: Analyze population

Postby Flag_Hippo » Wed Mar 13, 2024 6:59 am

myeari wrote:attached a screenshot

Those are built-in statistics which cannot be deleted. There are two types of statistics ('Player' statistics & 'Hand' statistics) and you are in the wrong section since the custom statistics you downloaded (which will be in blue) are 'Player' statistics.
myeari wrote:I saw that for the made_hand stat there is a use with lookup_from_id.
Should I use something similar? If yes, which function should I use, and how?

'Made Hand' is a 'Hand' statistic for use in a hand report displaying individual hands.
myeari wrote:OR can you shorten my learning time, and build one stat as an example (e.g. top pair) that I can import, and then I will duplicate and change that for the other strengths?

You need to create a 'Player' statistic and the groupings for each hand value you want will need to be specified within a custom column. Start by looking at and duplicating the custom columns used for the custom statistics you downloaded instead as they can be the basis of a new statistic.
myeari wrote:Also, the guides are not sufficient for building stats for identifying draws, because I don't know which functions and columns I should use.
I will need more help on that as well.

The database schema (schema.postgres.sql) is available in "C:\Program Files (x86)\PokerTracker 4\Data\Schemas". We have not published the schema like we did for PokerTracker 3 however the meaning of database fields haven't changed in any significant way.
myeari wrote:I found something in the forum.
I attached two screenshots for the new column and the new stat.
Are they correct?
I cannot check it because for some reason i cannot applying it and see it in my stat list.

That's a 'Hand' statistic again which cannot be used in a 'Player' report.
Flag_Hippo
Moderator
 
Posts: 15186
Joined: Tue Jan 31, 2012 7:50 am

Re: Analyze population

Postby myeari » Fri Mar 15, 2024 9:09 am

Hi,
I think I made a very good progress with the construction of the stat I needed.
However, there is still a minor problem, which I don't know how to fix.
Similar labels (e.g., two pairs) were given to multiple equations (e.g. when (flg_f_2pair=7 AND id_f_hand_strength=7) and also when (flg_f_2pair=7 AND flg_f_2pair=8), but the report does not count them as one.
You can see what I mean in the picture I attached.
I also tried to attach the stat itself, but not sure it was successful. How can I send you a stat?
So I attach screen shots of the stat and column.

One more question, I would like to add also draws, and I found the relevant schemas (e.g., flg_t_straight_draw).
However, I think I will have the same problem again - this schemas would not differ between a straight draw with one or more of the player's hold cards and between a possible straight draw which exist on the board, using only board cards.
Is there a way to differ between those using another schema, as I used for made hand (i.e., id_f_hand_strength).
Also, If there is a schema like that, I would also need the numbers that are assigned to the various strength.
If there is not such a schema, maybe I can use the val_x_hole_cards_used?

One last questions, where can I find a detailed information about the proper and various use of functions (e.g. IF) and Oprators (e.g. NOT)?
For example, I had to find by myself that I can use string 'XX' for IF function.
And now I'm trying to use NOT next to a schema in the stat or column, and it doesn't let me (e.g., NOT of flg_showdown) in order to exclude all cases which the players exposed its hole cards, although he didn't reach showdown (and my stat count it as a made hand).

Thanks a lot!!!
Attachments
Screenshot 2024-03-15 150718.png
Screenshot 2024-03-15 150637.png
Screenshot 2024-03-15 150326.png
myeari
 
Posts: 10
Joined: Sun Nov 26, 2023 6:08 am

Re: Analyze population

Postby Flag_Hippo » Sun Mar 17, 2024 7:34 am

myeari wrote:I think I made a very good progress with the construction of the stat I needed.
However, there is still a minor problem, which I don't know how to fix.
Similar labels (e.g., two pairs) were given to multiple equations (e.g. when (flg_f_2pair=7 AND id_f_hand_strength=7) and also when (flg_f_2pair=7 AND flg_f_2pair=8), but the report does not count them as one.
You can see what I mean in the picture I attached.
I also tried to attach the stat itself, but not sure it was successful. How can I send you a stat?
So I attach screen shots of the stat and column.

You need to specify the groupings you want using an expression within a custom column. As I suggested before take a look at and duplicate the custom columns used for the original custom statistics you downloaded instead as they can be the basis of a new statistic since they use a similar format. For example the column expression for the 'Made Hand Flop' player statistic is this:

val_f_hand_group
Code: Select all
if[ NOT cash_hand_player_statistics.flg_f_saw, 0, if[ cash_hand_player_combinations.flg_f_highcard, 9, if[ cash_hand_player_combinations.flg_f_1pair, 8 , if[ cash_hand_player_combinations.flg_f_2pair, 7, if[ cash_hand_player_combinations.flg_f_threeoak, 6, if[ cash_hand_player_combinations.flg_f_straight, 5 , if[ cash_hand_player_combinations.flg_f_flush, 4, if[ cash_hand_player_combinations.flg_f_fullhouse, 3, if[ cash_hand_player_combinations.flg_f_fouroak, 2, if[ cash_hand_player_combinations.flg_f_strflush, 1, 0]]]]]]]]]]

This column has 10 different groupings but yours will need more however bear in mind that each hand can only appear in one grouping. When the column has been created then you can create the labels for each grouping in the format expression of the custom statistic.
myeari wrote:One more question, I would like to add also draws, and I found the relevant schemas (e.g., flg_t_straight_draw).
However, I think I will have the same problem again - this schemas would not differ between a straight draw with one or more of the player's hold cards and between a possible straight draw which exist on the board, using only board cards.
Is there a way to differ between those using another schema, as I used for made hand (i.e., id_f_hand_strength).
Also, If there is a schema like that, I would also need the numbers that are assigned to the various strength.
If there is not such a schema, maybe I can use the val_x_hole_cards_used?

val_x_hole_cards_used is only used for made hands and there isn't an equivalent for straight draws.
myeari wrote:One last questions, where can I find a detailed information about the proper and various use of functions (e.g. IF) and Oprators (e.g. NOT)?
For example, I had to find by myself that I can use string 'XX' for IF function.

The use of IF is covered here.
myeari wrote:And now I'm trying to use NOT next to a schema in the stat or column, and it doesn't let me (e.g., NOT of flg_showdown) in order to exclude all cases which the players exposed its hole cards, although he didn't reach showdown (and my stat count it as a made hand).

I can't see exactly how you are using it but the NOT would just get placed at the front like this:

Code: Select all
NOT cash_hand_player_statistics.flg_showdown
Flag_Hippo
Moderator
 
Posts: 15186
Joined: Tue Jan 31, 2012 7:50 am

Re: Analyze population

Postby myeari » Sun Mar 17, 2024 9:47 am

Flag_Hippo wrote:You need to specify the groupings you want using an expression within a custom column. As I suggested before take a look at and duplicate the custom columns used for the original custom statistics you downloaded instead as they can be the basis of a new statistic since they use a similar format. For example the column expression for the 'Made Hand Flop' player statistic is this:

val_f_hand_group
Code: Select all
if[ NOT cash_hand_player_statistics.flg_f_saw, 0, if[ cash_hand_player_combinations.flg_f_highcard, 9, if[ cash_hand_player_combinations.flg_f_1pair, 8 , if[ cash_hand_player_combinations.flg_f_2pair, 7, if[ cash_hand_player_combinations.flg_f_threeoak, 6, if[ cash_hand_player_combinations.flg_f_straight, 5 , if[ cash_hand_player_combinations.flg_f_flush, 4, if[ cash_hand_player_combinations.flg_f_fullhouse, 3, if[ cash_hand_player_combinations.flg_f_fouroak, 2, if[ cash_hand_player_combinations.flg_f_strflush, 1, 0]]]]]]]]]]

This column has 10 different groupings but yours will need more however bear in mind that each hand can only appear in one grouping. When the column has been created then you can create the labels for each grouping in the format expression of the custom statistic.


I'm sorry, but this doesn't help me! and I need much more significant help, than sending me partial responses. Duplication is not enough when I don't have sufficient experience and knowledge in adapting the original stat. Let me explain it in more detail.
How the assignment of made hands to these grouping numbers (1, 2, 3...) translate into the correct labels (i.e., one pair, set, etc.) using the "lookup_from_id( this, 'finalgroup' )" function in the format expression of the stat?
In my case I will need different labels for a conjunction of schemas. How should I do it?
For example, which number should I assign to the conjunction of (cash_hand_player_combinations.flg_f_highcard AND cash_hand_player_combinations.val_f_hand_strength=2) in order to present the label of 'Two Overcards'?
where are these labels come from, and more important, can I create labels of my own by using a string ('xxx') instead of using numbers? this will be very helpful for my needs (e.g., for draws). And if yes, how the "lookup_from_id" will function?

I should also note that each hand will be assigned to one group, however, multiple conjunctions will be assigned to the same group. For example, both (val_f_hand_group=8 AND val_f_hand_strength=6) and (val_f_hand_group=7 AND val_f_hand_strength=6) will be assigned to 'Over Pair'.

Could you please build a simple column and a stat for the examples above, so I can duplicate it for the others?


Flag_Hippo wrote:val_x_hole_cards_used is only used for made hands and there isn't an equivalent for straight draws.


I understand from this answer that I could not differ between a draw on a board (player has AK and the board is 6789) from a draw that uses player's hole cards (player has AT and the board us 789K)?
This is of course very problematic. What should I do to differ between these two types of draws?

It will be highly helpful if you would insert a conjunction for a draw hand as well in the example stat (for example, high card with flush draw).
myeari
 
Posts: 10
Joined: Sun Nov 26, 2023 6:08 am

Re: Analyze population

Postby Flag_Hippo » Sun Mar 17, 2024 2:48 pm

myeari wrote:How the assignment of made hands to these grouping numbers (1, 2, 3...) translate into the correct labels (i.e., one pair, set, etc.) using the "lookup_from_id( this, 'finalgroup' )" function in the format expression of the stat?
In my case I will need different labels for a conjunction of schemas. How should I do it?
For example, which number should I assign to the conjunction of (cash_hand_player_combinations.flg_f_highcard AND cash_hand_player_combinations.val_f_hand_strength=2) in order to present the label of 'Two Overcards'?
where are these labels come from, and more important, can I create labels of my own by using a string ('xxx') instead of using numbers? this will be very helpful for my needs (e.g., for draws). And if yes, how the "lookup_from_id" will function?

You would define the groupings, numbers and labels yourself in your custom column/statistic.
myeari wrote:Could you please build a simple column and a stat for the examples above, so I can duplicate it for the others?

You can start with this custom column:

val_f_hand_group_myeari
Code: Select all
if[ NOT cash_hand_player_statistics.flg_f_showdown, 0, if[ cash_hand_player_combinations.flg_f_highcard AND cash_hand_player_combinations.id_f_hand_strength = 1, 1, if[ cash_hand_player_combinations.flg_f_highcard AND cash_hand_player_combinations.id_f_hand_strength = 2, 2 ,999]]]

You would then add to this column with your required groupings instead of duplicating and creating additional columns. In the format expression of the custom statistic you can set what names you want displayed for each grouping. For the column as it is now then this is an example:

Code: Select all
if(this = 0, format('No Showdown'), if(this = 1, format('High Card 1 Over'), if(this = 2, format('High Card 2 Overs'), if(this = 999, format('Error'), ignore_formatting(this)))))

Statistic as is attached:

Made Hand Flop myeari.zip
(688 Bytes) Downloaded 149 times

The final 'Error' condition will capture hands that don't fall into any grouping. If you create conditions which overlap then a hand can only go into one of those groupings.
myeari wrote:I understand from this answer that I could not differ between a draw on a board (player has AK and the board is 6789) from a draw that uses player's hole cards (player has AT and the board us 789K)?
This is of course very problematic. What should I do to differ between these two types of draws?

That would only be possible by comparing/testing the players hole cards/board cards but testing for all possible scenarios would be complex and unfortunately I don't have a simple method that can be used for this.
myeari wrote:It will be highly helpful if you would insert a conjunction for a draw hand as well in the example stat (for example, high card with flush draw).

A high card with a flush draw on the flop would be:

Code: Select all
cash_hand_player_combinations.flg_f_highcard and cash_hand_player_combinations.flg_f_flush_draw

If you add this as an additional condition in the example column then you should specify that the other high card groupings don't have flush draws so there isn't overlap between the groups.
Flag_Hippo
Moderator
 
Posts: 15186
Joined: Tue Jan 31, 2012 7:50 am

Previous

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 29 guests

cron
highfalutin