Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save prediction details and their outcomes. #133

Open
FirstThread opened this issue Feb 2, 2023 · 5 comments
Open

Save prediction details and their outcomes. #133

FirstThread opened this issue Feb 2, 2023 · 5 comments
Assignees
Labels
🧱 enhancement New feature or request

Comments

@FirstThread
Copy link

Is your feature request related to a problem? Please describe.
I want to make a prediction based on a supervised classification model. I need data from the predictions:
image
Something like this:

id streamer_name 0_points 0_conversion_rate 0_people_count 0_highest_bet 1_points 1_conversion_rate 1_people_count 1_highest_bet outcome
1 rax1337 415793 2.46 33 250000 606477 1.69 11 250000 (0 for Gewonnen, 1 for Verloren)

Describe the solution you'd like
I would like to be able to log these results after the prediction is finished. This can be done with pandas in a DataFrame. The DataFrame would be saved as a csv.

Describe alternatives you've considered
If you have better alternatives, i am looking forward to read them.

Additional context
If i am able to implement the Machine Learning Model the predictions would hopefully be better that SMART, because the ML-Model is adjusting to the given Data.

@Rakambda
Copy link

Rakambda commented Feb 2, 2023

Some stuff that can guide you. On my version someone made an outcome picker that is based on "trusted" users on a channel. Trusted is simply people that bet well. As he did that he has to record predictions made. The following PR may help with some table structures maybe.

What is in the issue description won't work I think. Predictions can have more than 2 outcomes.

RakambdaOrg/ChannelPointsMiner#259, in more details: https://github.com/Rakambda/ChannelPointsMiner/blob/develop/miner/src/main/resources/db/migrations/mariadb/V1_0_0__base.sql (ResolvedPrediction, PredictionUser, UserPrediction)


Personal opinion:

If you have data only on the prediction, I'm not sure the ML will be that interesting. Basically you just try to guess an outcome based on the fact a streamer opened a prediction.
However what is more interesting is to make a ML that is able to know which betters to "follow", how much to place etc. You'd have to provide it with way more data than what is described (but ML is hungry so it's good). For that you can have another table that records all predictions made by all users in a table with : username, bet reference, amount placed, outcome picked. I think it's not much more harder to implement (if it's accepted) but for your purpose would add much more value to it.

@FirstThread
Copy link
Author

I've never had a prediction that had more than two outcomes. Maybe this is a new feature? Any other strategy doesn't have the function of participating in a bet with more than two outcomes I think.

If you have data only on the prediction, I'm not sure the ML will be that interesting. Basically you just try to guess an outcome based on the fact a streamer opened a prediction.

I believe that if you train a machine learning model on each streamer, just by the number of people who bet on a page plus the points bet on each page, a machine learning model on a higher dimension can see a correlation .

But I have to say that your approach is also very interesting and I think it has more value. However, you would then have to be careful that we don't overfit the model and don't build in a bias. It would be the first ML model that I implement properly. I am currently in my exam phase and would like to implement such a feature after my exam phase. However, I wanted to collect data during this time so that I could start training the ML model straight away.

I'm in the process of starting and trying out your version of a Twitch Miner, but I'm still running into a few errors.

@Rakambda
Copy link

Rakambda commented Feb 2, 2023

I've never had a prediction that had more than two outcomes. Maybe this is a new feature? Any other strategy doesn't have the function of participating in a bet with more than two outcomes I think.

Been months that it's like this. By the issue it's from around may 2022: Tkd-Alex#497
I agree that very few streamers use it, but it's available. Here's a screen when you setup a prediction:
image

I believe that if you train a machine learning model on each streamer, just by the number of people who bet on a page plus the points bet on each page, a machine learning model on a higher dimension can see a correlation .

Maybe but still feels kinda wanky. What if a prediction happens at a time of the day where only "bad betters" are present? The ML doesn't take into account the time of the day. I don't know what could come out of it but personally I feel like just the history of bets with their outcomes isn't really enough (just a feeling tho).

But I have to say that your approach is also very interesting and I think it has more value. However, you would then have to be careful that we don't overfit the model and don't build in a bias. It would be the first ML model that I implement properly. I am currently in my exam phase and would like to implement such a feature after my exam phase. However, I wanted to collect data during this time so that I could start training the ML model straight away.

To be honest I'm not a ML expert at all, never really worked with them. But yeah choosing your data carefully is important. However I think it's easier if you collect more data and then trim it down to what you want for a given training ; rather than collecting too less and cannot "regenerate" that lost data.

I'm in the process of starting and trying out your version of a Twitch Miner, but I'm still running into a few errors.

Mine is far less easy than the python one x)
However if you want some starting data I can share you what I have in my DB.

  • UserPrediction is empty because it stores only the currently opened predictions, so sadly I can't provide all the prediction history for each users
  • ResolvedPrediction which contains 8k predictions among all the channels I watch
  • PredictionUser which contains around 170k users that placed a bet at least once in a prediction, storing the number of times the won, bet, their ROI

This is a rather small dataset for ML but well, can be a starting point. Though I don't have what you originally wanted, that is the total bet points on each outcome.

@FirstThread
Copy link
Author

To be honest I'm not a ML expert at all, never really worked with them. But yeah choosing your data carefully is important. However I think it's easier if you collect more data and then trim it down to what you want for a given training ; rather than collecting too less and cannot "regenerate" that lost data.

I totally agree.

However if you want some starting data I can share you what I have in my DB.

UserPrediction is empty because it stores only the currently opened predictions, so sadly I can't provide all the prediction history for each users
ResolvedPrediction which contains 8k predictions among all the channels I watch
PredictionUser which contains around 170k users that placed a bet at least once in a prediction, storing the number of times the won, bet, their ROI
This is a rather small dataset for ML but well, can be a starting point. Though I don't have what you originally wanted, that is the total bet points on each outcome.

This is definitely a good start, with this data you could see if such an approach brings any success at all. When I have time again after my exams, I will continue to work on the topic.

@rdavydov rdavydov self-assigned this Feb 8, 2023
@rdavydov rdavydov added the 🧱 enhancement New feature or request label Feb 8, 2023
@1v
Copy link

1v commented Feb 10, 2023

I added option always_bet to my strategy so there always be bet with at least 10 points. Then I parse logs to extract data. It goes slow but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧱 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants