How to Use InceptionTime for Time Series Classification

Jul 22, 2022 | Data Science

Welcome to your step-by-step guide on how to utilize InceptionTime for classifying time series data! Based on our paper InceptionTime: Finding AlexNet for Time Series Classification, this project includes the necessary tools and code to help you achieve optimal results.

Understanding InceptionTime

InceptionTime is like a Swiss Army knife for time series classification, utilizing multiple time series data similarities to classify information effectively. Think of it as a detective with various tools (or “modules”) to analyze clues (time series data) to solve cases (classification tasks).

Getting Started

  • Data Source: The datasets used in this project can be found in the UCR/UEA archive, with a total of 85 datasets available here.
  • Required Packages: Ensure you install the packages listed in the requirements.txt file.

Code Structure

The code is organized into several components:

  • main.py: This file contains essential code to run experiments.
  • utils: A folder with functions for reading datasets and data visualization.
  • classifiers: Contains two files:
    • inception.py: The inception network.
    • nne.py: The ensemble code for the inception networks.

Setting Up Your Environment

To adapt the code for your own PC, you’ll need to modify the root directory. Create a folder named “archives” within your root directory, and download the datasets into it from this site. Refer to the dataset names here for guidance.

Running InceptionTime

Now, let’s run InceptionTime:

  • For a single archive, execute: python3 main.py InceptionTime
  • For hyperparameter searching, execute: python3 main.py InceptionTime_xp
  • To run through the InlineSkate dataset length experiment, use:
    python3 main.py run_length_xps followed by
    python3 main.py InceptionTime ensuring the correct XP is chosen here.
  • To conduct experiments on synthetic datasets, run: python3 receptive.py.

Interpreting Results

Your results, primarily focusing on accuracy, will be generated in the root_dir/results/nne/inception-0-1-2-4-UCR_TS_Archive_2015/dataset_name/df_metrics.csv. Raw results can also be found here by running python3 main.py generate_results_csv.

Troubleshooting

If you encounter any issues, here are some troubleshooting tips:

  • System compatibility: Ensure all packages are installed correctly and that your Python version is adequate.
  • Data errors: Double-check that all datasets are correctly placed within your archives folder and are properly named.
  • Code issues: Look at error messages closely; they usually indicate where the problem lies.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Visualizing Results

For critical difference diagrams and training time plots, ensure you have the appropriate plots using the provided code! The visual outputs can help in understanding and presenting the results of the experiments effectively.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox