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

Hello JeffMv #4

Open
wyw862788 opened this issue Apr 6, 2024 · 8 comments
Open

Hello JeffMv #4

wyw862788 opened this issue Apr 6, 2024 · 8 comments
Assignees

Comments

@wyw862788
Copy link

I don't know if you're still working on magic3?
But it seems like there are some issues with your code, causing it not to run properly.
Could you simplify your process? It only needs two parts:
First, reading data, training the model, and saving the model.
Second, calling the model to make predictions.
Also, historical data only needs to include 3 winning numbers, nothing else.
I'm a beginner in Python, could you provide assistance? Thank you very much.

@JeffMv
Copy link
Owner

JeffMv commented Apr 6, 2024

thanks for reaching out.
This program does not produce a machine learning model. Rather, it creates the dataset that you feed into a model.
This approach offers advantages : the freedom to try different models, and a simpler, focused code base.

The suggested tools that created the model and visual is an example.
The success I got came from a manual review of the outputed data.

The manual strategy I used to bet was based on Bernouilli trials:

  1. I looked at a feature for the center column (one that outputed true/false)
  2. the feature had a probability (say p) to take value True. (even though p could slightly vary, it was ok for estimating)
  3. I "waited" a few days so that the target feature I tried to predict had taken k times the same value v1 (exemple for k=8 v1=False : the last 8 values were False, and I wanted to estimate probability of the next value being True)
  4. I estimated using Bernouilli trials the approximate chance of the value taking the other value.
  5. I checked how many "number balls" were in the predicted group of favored predicted winning "number balls". See issue just a question #3 for details on number ball groups.
  6. [in my case 3 numbers were in the group of predicted winning balls] It meant that with Bernouilli, I had chance B(k, p) that the winning number for the middle column would be among the 3.
  7. Working out with the expected $ outcome if I got it right, I saw the Expected $ outcome was profitable
  8. So i placed my bids on those numbers inteliggently. (and that's how I got a winning number in it). The rest of the story is in the Readme of the project.

For details on what the feature
Does

@wyw862788
Copy link
Author

Dear JeffMv,

I'm glad to receive your reply.
I'm wondering about the following line of code, located within the function studyUniverseLengths:

previousSize = len(previousFrame)
Is it a typo? Shouldn't it be:

previousSize = len(previousUniverse)
Additionally, I have successfully run your code featuresUpdater.py, and it generated the result file univ-length-over10.tsv.

Now, I'd like to know how to use the generated result file for prediction.
Could you provide an example code for creating a model and making predictions using the result file?

Much appreciated!

@JeffMv
Copy link
Owner

JeffMv commented Apr 7, 2024

Thanks for your contribution. It might be a typo - I will have to check the output.

Ultimately, what a model would produce using the files are recommandations of feature values, and you need to be familiar with these feature to translate them to what numbers are recommanded.
To use the generated file, you might try to make sense of what the features mean (see comments in code regarding each feature, and so one).

I didn't provide a code for generating a model.
The goal of a model is simple:

  • you select a column you would like to predict.
  • the model uses other columns of a row to predict the target column (you selected)

You can start by making a simple model by using the scikit-learn library to get the hand of how to train a model and how the prediction error is supposed to decrease the more you train ("fit") the model. (Lots of tutorials available)

@wyw862788
Copy link
Author

wyw862788 commented Apr 7, 2024 via email

@wyw862788
Copy link
Author

wyw862788 commented Apr 8, 2024 via email

@JeffMv JeffMv self-assigned this Apr 10, 2024
@JeffMv
Copy link
Owner

JeffMv commented Apr 10, 2024

Hi,
regarding

can I construct models for prediction using Rapid Miner software, or can I write my own Python code and use my preferred models for prediction? Is that correct?

yes you can use that approach. as usual in machine learning, divide the dataset (rows) into a training and test set (and validation set). then train the model on the training dataset. test the accuracy on the test set, etc

regarding dividing into magnitude or odd numbers, it keeps equiprobability, so that's a good thing. (even though it has drawbacks in a fully random experiment like a well randomized lottery)
i d say keep a equiprobable subdivision (by odds/magnitude) and the corresponding model at hand for comparing as baseline/benchmark when you'll do more complex subdivisions. (the universe length... is such a more complex subdivision without equiprobability).

there are a few things I will need to review this weekend.

@wyw862788
Copy link
Author

wyw862788 commented Apr 10, 2024 via email

@wyw862788
Copy link
Author

wyw862788 commented Apr 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants