This project aims to predict lottery numbers using various data science approaches, including time series analysis and Markov chains. The goal is to explore and compare different methodologies to model the behavior of lottery draws, acknowledging that lottery outcomes are inherently random and predictions are for experimental purposes only.
loterias/
├── data/ # Historical lottery data
├── notebooks/ # Jupyter notebooks for exploratory analysis
├── src/ # Source code for models and utilities
│ ├── time_series/ # Time series prediction scripts
│ ├── markov_chains/ # Markov chain-based prediction scripts
│ └── utils/ # Helper functions and utilities
├── results/ # Output predictions and visualizations
├── tests/ # Unit tests for the code
└── README.md # Project documentation
- Time Series Analysis: Models lottery numbers as a time series to identify patterns or trends using techniques like ARIMA or Prophet.
- Markov Chains: Treats lottery draws as a Markov process, predicting future numbers based on transition probabilities between states.
-
Clone the repository:
git clone https://github.com/SPQR14/loterias.git
-
Move to repository directory
cd loterias
-
Install dependencies:
pip install -r requirements.txt
-
Ensure you have Python 3.8+ and the following libraries:
- pandas
- numpy
- statsmodels
- prophet
- matplotlib
- scikit-learn
- Place historical lottery data in the
data/
directory (CSV format expected). - Run exploratory analysis:
jupyter notebook notebooks/exploratory_analysis.ipynb
- Train and evaluate models:
python src/time_series/predict.py python src/markov_chains/predict.py
- View results in the
results/
directory.
- Historical lottery data should be in CSV format with columns for draw date and numbers.
- Example datasets can be sourced from public lottery websites (ensure compliance with data usage terms).
- Preprocessed data is stored in
data/processed/
.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m "Add feature"
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.