This Python script performs ARIMA (Autoregressive Integrated Moving Average) time series analysis on a given CSV file and generates predictions for each column. The script uses the pandas
library for data handling, statsmodels
for ARIMA modeling, and sklearn
for evaluating the predictions.
- Clone this repository or download the script directly.
- Make sure you have Python 3.x installed on your system.
- Install the required dependencies by running the following command:
pip install pandas statsmodels scikit-learn
- Place your CSV file in the same directory as the script. Ensure that the file contains numerical data.
- Open the script file (
arima_prediction.py
) in a text editor. - Replace
'pathto.csv'
with the actual path to your CSV file in thecsv_file_path
variable. - (Optional) If you want to limit the number of columns processed, modify the
num_columns
variable to the desired value. - Save the changes to the script file.
- Open a terminal or command prompt and navigate to the script's directory.
- Run the following command to execute the script:
python arima_prediction.py
- The script will generate predictions for each column in the CSV file and display them in the terminal.
- The predictions will be saved in a file named
predictions.csv
in the same directory.
- If you want to change the order of the ARIMA model or the number of forecast steps, you can modify the
order
andforecast_steps
parameters in thefit_arima()
function within the script. - If you need further customization or advanced usage, refer to the documentation of the libraries used: pandas, statsmodels, and scikit-learn.
Feel free to reach out if you have any questions or encounter any issues while using this tool.