Classification of types of changes in gully environments using time series forest algorithm [data] - Vallejo Orti, Miguel; Castillo, Carlos; Zahs, Vivien; Bubenzer, Olaf; Höfle, Bernhard (Universität, 2023)
This code implements the TimeSeriesForest algorithm to classify different types of changes in gully environments. i)gully topographical change, ii)no change outside gully, iii) no change inside gully, and iv) non-topographical change. The algorithm is specifically designed for time series classification tasks, where the input data represents the characteristics of gullies over time. The code follows a series of steps to prepare the data, train the classifier, calculate performance metrics, and generate predictions. The data preparation phase involves importing training and testing data from CSV files. The training data is then divided into classes based on their labels, and a subset of the top rows is selected for each class to create a balanced training dataset. Time series data and corresponding labels are extracted from the training data, while only the time series data is extracted from the testing data. Next, the code calculates various performance metrics to evaluate the trained classifier. It splits the training data into training and testing sets, initializes the TimeSeriesForest classifier, and trains it using the training set. The accuracy of the classifier is calculated on the testing set, and feature importances are determined. Predictions are generated for both the testing set and new data using the trained classifier. The code then computes a confusion matrix to analyze the classification results, visualizing it using Seaborn and Matplotlib. Performance metrics such as True Accuracy, Kappa, Producer's Accuracy, and User's Accuracy are calculated and printed to assess the classifier's effectiveness in classifying gully changes. Lastly, the code performs ensemble predictions by combining the testing data with the generated predictions. The results, including predictions and associated probabilities, are saved to an output file. Overall, this code provides a practical implementation of the TimeSeriesForest algorithm for classifying types of changes in gully environments, demonstrating its potential for environmental monitoring and management.
Gesehen am 14.03.2024
Keywords: Forschungsdaten; Datenbank