-1

I have had a discussion with my brother regarding using Machine Learning to win the lottery. I think it is impossible and want to show him. So i have started to learn python and are totally new to this world

I have the outputdata, but i need the inputdata. The lotterys numbers will generate 95.000.000 lines, and i don't know where to make these lines and how?

The lottery have 5 numbers between 1 and 50, and two numbers between 1 and 10. The 5 numbers can't be the same, and the same with the last two. So (1,2,15,23,54,1,2) is a possible number. I imagine it couls look like this for all combinations (1:50≠1:50≠1:50≠1:50≠1:50,1:10≠1:10)?

Is it necessary to have all the input data, or can i code my way out of it?

I have tried using R and Excel to generate all the numbers, but there are not enough lines.

I hope you can help! Ask if something is unclear.

Thanks in advance

The other brother

  • Why aren't you using Python to generate this list? Are you open to using it? Because generating this list would be quite easy in Python. Also, no ML technique will be able to learn any sort of function from completely randomised samples. The lotto is inherently unpredictable. – Joshua Apr 04 '20 at 10:14
  • Hi Joshua, thank you for your anwer! I didnt know it was a possibility... Do you have know what i have to write in the code to generate the list and what i need to import? I know, but I want to show him, because he wont believe me. And I think that Machine learning is interesting, so at least i learn something. – The other brother Apr 04 '20 at 10:51

2 Answers2

0

You can use the following python code to create a list of non-repeating numbers from 1 to 99 of length 10:

import random
random.sample(random.sample(range(1,100), 10)

Altering this, creating one list from 1 to 50, and one from 1 to 10, length 5 and 2 respectively would be:

a = random.sample(range(1,51), 5)
b = random.sample(range(1,11), 2)

Then, we can concatenate the lists using:

numbers = a+b

you can repeat this to generate n samples with a for loop:

for i in range(n):
    # code to repeat

And learn to write lists to a file here. Or google around to learn how to save lists to .csv format.

Goodluck!

Joshua
  • 162
  • 1
  • 2
  • 9
0

Presumably your arguments would work on a way smaller dataset. Prepare a mini-lottery that is much less computationally expensive.

MickL
  • 25
  • 4