Classification of Types of Changes in Gully Environments Using Time Series Forest Algorithm [data]

DOI

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.

Identifier
DOI https://doi.org/10.11588/data/NSMM6P
Related Identifier https://doi.org/10.1002/esp.5759
Metadata Access https://heidata.uni-heidelberg.de/oai?verb=GetRecord&metadataPrefix=oai_datacite&identifier=doi:10.11588/data/NSMM6P
Provenance
Creator Vallejo Orti, Miguel; Castillo, Carlos; Zahs, Vivien; Bubenzer, Olaf; Höfle, Bernhard
Publisher heiDATA
Contributor Vallejo Orti, Miguel
Publication Year 2023
Rights CC BY 4.0; info:eu-repo/semantics/openAccess; http://creativecommons.org/licenses/by/4.0
OpenAccess true
Contact Vallejo Orti, Miguel (Institute of Geography, Heidelberg University, Germany)
Representation
Resource Type Dataset
Format text/plain; text/csv; text/tab-separated-values; text/x-python
Size 4164; 1833843; 7978335; 98093; 3340; 8041823; 6667; 3585970
Version 2.0
Discipline Earth and Environmental Science; Environmental Research; Geosciences; Natural Sciences