MTT information stats

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

MTT information stats

Postby sam_hawkins » Tue Oct 13, 2020 3:00 am

Hi!

I have been looking around the forum and could not find an answer to my question, so I decided to ask it myself.

I am trying to build an MTT statistic that will be calculated for every hand (so I suppose it would be a T(ourney)/hand statistic) so that I can plot it on a graph as an overlay stat.

The formula I am trying to write down should calculate the amount of chips won scaled by some coefficient that takes into account some sort of money value and should look something like this:

custom_stat = amt_chips_won * amt_buyin/ starting_stack

What I need:

The information I cannot find is the 'starting_stack' amt. I found the code for how to get the number for summaries (for example here) but not as a hand statistic. Can somebody help me how to write a starting stack stat that can be accessed in the above calculation?

Thank you!!
sam_hawkins
 
Posts: 6
Joined: Tue Oct 13, 2020 2:39 am

Re: MTT information stats

Postby Flag_Hippo » Tue Oct 13, 2020 7:47 am

sam_hawkins wrote:I am trying to build an MTT statistic that will be calculated for every hand (so I suppose it would be a T(ourney)/hand statistic) so that I can plot it on a graph as an overlay stat.

If you want a statistic calculated for every hand and display results in a graph it will need to be a player statistic and not a hand statistic. A hand statistic is for use in a hand report (listing individual hands) and only player statistics are available for graphs.
sam_hawkins wrote:The information I cannot find is the 'starting_stack' amt. I found the code for how to get the number for summaries (for example here) but not as a hand statistic. Can somebody help me how to write a starting stack stat that can be accessed in the above calculation?

A players starting stack isn't something that is stored directly in the database schema but there is SQL in the thread you linked however creating/using that type of SQL is beyond my own knowledge I'm afraid.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: MTT information stats

Postby sam_hawkins » Tue Oct 13, 2020 5:55 pm

Thank you for your reply! I expected that some sort of modification of the SQL code I linked will be the answer to my question but unfortunately I only know python myself. Do you think anyone will be able to help from the PT4 team?
sam_hawkins
 
Posts: 6
Joined: Tue Oct 13, 2020 2:39 am

Re: MTT information stats

Postby sam_hawkins » Wed Oct 14, 2020 2:05 am

Or, alternatively, where can I found the SQL codes for other stats so I can try to figure it out myself? For example, where can I find the code for 'amt_chips_won' ?
sam_hawkins
 
Posts: 6
Joined: Tue Oct 13, 2020 2:39 am

Re: MTT information stats

Postby Flag_Hippo » Wed Oct 14, 2020 1:27 pm

You can see the code for all existing columns in 'Configure -> Statistics -> Columns'.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: MTT information stats

Postby sam_hawkins » Wed Oct 14, 2020 3:05 pm

Yeah I found that, thanks! I think I managed to create the proper column for amt_starting_stack but when I create the custom stat, I cannot find it as an overlay stat in the graph (I think this is related to where the information comes from in the database) so I'm not sure I can do this on my own.
sam_hawkins
 
Posts: 6
Joined: Tue Oct 13, 2020 2:39 am

Re: MTT information stats

Postby Flag_Hippo » Thu Oct 15, 2020 5:16 am

Please export your custom statistic, compress it and attach it here.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: MTT information stats

Postby sam_hawkins » Sat Oct 17, 2020 5:24 am

Here is the statistic, dunno if it is correct. The column starting stack is
Code: Select all
first_value(tourney_hand_player_statistics.amt_before) over
(partition by tourney_hand_player_statistics.id_tourney order by tourney_hand_player_statistics.date_played)
Attachments
Chips won value adj.rar
(665 Bytes) Downloaded 104 times
sam_hawkins
 
Posts: 6
Joined: Tue Oct 13, 2020 2:39 am

Re: MTT information stats

Postby WhiteRider » Sat Oct 17, 2020 8:40 am

I'm don't think that that will work as a Player stat. Your expression wants to have a single value, but across all hands for a player there would be multiple values so the result would be undefined.
For example in a Player stat "amt_won" is the total amount of chips won or lost across all of the hands, but your "amt_starting_stack" is [trying to be] the starting stack in a single hand, and that won't work.

You may be able to get it to work by doing the whole calculation in a column, but you're mixing different levels of data (hand data and overall tournament data) and I think that still won't work.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: MTT information stats

Postby sam_hawkins » Sun Oct 18, 2020 4:49 am

WhiteRider wrote:I'm don't think that that will work as a Player stat. Your expression wants to have a single value, but across all hands for a player there would be multiple values so the result would be undefined.
For example in a Player stat "amt_won" is the total amount of chips won or lost across all of the hands, but your "amt_starting_stack" is [trying to be] the starting stack in a single hand, and that won't work.

You may be able to get it to work by doing the whole calculation in a column, but you're mixing different levels of data (hand data and overall tournament data) and I think that still won't work.


Thank you, that's the kind of insight into how the stats work I was looking for. Could you please explain why exactly is it a problem that the stat takes different values across different hands? I think I am not exactly understanding what is different from 'amt_won' -- there, my understanding is that it calculates the amt of chips won in each single hand and then when graphing you just want to graph a cumulative sum. Still, if I check amt_won for several individual hands, it will return the amt of chips individually for each hand. Am I mistaken somehow? Because that is exactly how I would like the amt_starting_stack column to work, a value assigned to each hand separately (but with the added property that this value will be the same for all hands for a given tourney), except it would not make sense to plot the cumulative sum.

I do understand the mixing of 'summary' data with 'hand' data, but I would be surprised if that was not possible, just define the summary data as hand data that is stationary over some subset of hands, right?
sam_hawkins
 
Posts: 6
Joined: Tue Oct 13, 2020 2:39 am

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: Google [Bot] and 29 guests

cron
highfalutin