Soft Decision Tree with ARMA features. The parameters are validated and the best params are fitted. Now, the training and testing procedures are end to end. The example experiments conducted on Weekly M4 datasets. You can apply our code to all time series data by using the code.
- https://www.kaggle.com/datasets/sumanthvrao/daily-climate-time-series-data?select=DailyDelhiClimateTrain.csv
- https://www.investing.com/currencies/hkd-usd-historical-data
- https://www.kaggle.com/datasets/yogesh94/m4-forecasting-competition-dataset explanation of the M4 dataset please go to https://paperswithcode.com/dataset/m4
- Creating a Conda Environment: To create a Conda environment, you typically use the conda create command followed by the name of the environment and the packages you want to install. Here's how you can create a Conda environment named sdt-arma:
conda create --name my_env
- Activating the Environment: After creating the environment, you need to activate it. You can activate the environment using the following command:
conda activate --name my_env
- Installing Packages from requirements.txt: A requirements.txt file typically contains a list of dependencies along with their versions. To install packages listed in the requirements.txt file, you can use the following command.
conda install --file requirements.txt
- Verifying Installation: For a final step, you can verify that all dependencies have been installed correctly by running:
conda list
Sample fature extraction code to extract label related feature if you need. It is in feature_extraction.ipynb file
python main.py --exp_name exp --data_path csv_data.csv --label_name y --test_size 0.3 --depth 3 --lamda 1e-3 --lr 1e-2 --epochs 30 --date_column_name date
--exp_name to give experiment name
--data_path to choose dataset from any csv.
--label_name to understand the column name of the label in the csv of your dataset, default label name is y.
--test_size to allocate the test from the whole dataset as ratio. 0.3 means th3 30 % of the whole dataset
--depth soft decision tree depth
--lamda to choose coefficient of the regularization term
--lr to choose learning rate.
--epochs to give number of training epochs
--date_column_name to understand whether there is date column or not to drop it before data converting to tensor
If you want to run other state of the art models, you can use model_comparision.ipynb file
For our base models soft decision tree implementation https://github.com/xuyxu/Soft-Decision-Tree