Add usage information and a note on prediction
This commit is contained in:
1 parent
839d7f4a51
commit
61f407979e
1 file changed
+77
@@ -2,6 +2,83 @@
|
||||
|
||||
A Python project to analyze and pick lottery numbers using past draw results to predict future draws.
|
||||
|
||||
## Usage
|
||||
|
||||
### Top Level
|
||||
```bash
|
||||
usage: main.py [-h] {update,record-count,generate-ticket,predict} ...
|
||||
|
||||
A lottery prediction tool.
|
||||
|
||||
positional arguments:
|
||||
{update,record-count,generate-ticket,predict}
|
||||
update Update database records
|
||||
record-count Get record counts by table in the database
|
||||
generate-ticket Generate a random ticket for the specified game
|
||||
predict Predict the next drawing
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
```
|
||||
|
||||
### Update
|
||||
|
||||
Scrape the game data from the source site and insert records into the database that are not present. A specific year can be selected as the starting year.
|
||||
|
||||
```bash
|
||||
usage: main.py update [-h] [-y YEAR] [-d]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-y, --year YEAR Year to start updates with
|
||||
-d, --dryrun Run the update process without actually making any database or API calls
|
||||
```
|
||||
|
||||
### Record Count
|
||||
|
||||
Return a count of records in each game table. A date to start the count from can be specified.
|
||||
|
||||
```bash
|
||||
usage: main.py record-count [-h] [-f FROM_DATE]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-f, --from-date FROM_DATE
|
||||
Date from which to base the count on (ex. 2026-01-01). The default value is rule-change for the date when game rules last changed
|
||||
```
|
||||
|
||||
### Generate Ticket
|
||||
|
||||
Generates a random ticket for the game specified.
|
||||
|
||||
```bash
|
||||
usage: main.py generate-ticket [-h] --game {MegaMillions,Powerball}
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--game {MegaMillions,Powerball}
|
||||
The game to predict the next result for
|
||||
```
|
||||
|
||||
### Predict
|
||||
|
||||
Due to the lottery drawings being as randomized as possible, generating an accurate prediction is not possible. Many window sizes have been tried during testing
|
||||
and none of them have yielded any hopeful results. The same numbers will most likely be generated with the same window size until the sample changes enough to
|
||||
cause changes in the selections. A different random seed number is chosen for each run to attempt to combat this behavior.
|
||||
cause changes in the selections. A different random seed number is chosen for each run to attempt to combat this behavior.
|
||||
|
||||
```bash
|
||||
usage: main.py predict [-h] --game {MegaMillions,Powerball} [--window-size WINDOW_SIZE] [--test]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--game {MegaMillions,Powerball}
|
||||
The game to predict the next result for
|
||||
--window-size WINDOW_SIZE
|
||||
The number of records to use in the prediction model, defaults to 10, use -1 for all records
|
||||
--test Use the most recent drawing as a test subject to find the right window_size
|
||||
```
|
||||
|
||||
## Draw Dates
|
||||
|
||||
Mega Millions drawings are held every Tuesday and Friday. Powerball drawings are held every Monday,
|
||||
|
||||
Reference in new issue
Block a user