Skip to content
Snippets Groups Projects
user avatar
Tomáš Martinovič authored
3bd67feb
History

Wireless PD detection

This repository contains R package for the partial discharge detection from the time series measured by the wireless PD detector. It contains functions to find the outliers, create features describing time series and classification learning and prediction

You can install this package using devtools package:

devtools::install_git("https://code.it4i.cz/ADAS/wireless-pd-detection")

or remotes package:

remotes::install_git("https://code.it4i.cz/ADAS/wireless-pd-detection")

Basic usage

This package accommodates two basic functions: learning the classification model from the provided data and classification of the results based on the XGBoost model.

The learning itself is composed of two steps. The first, is to compute the features of the time series and then use the computed features for the XGBoost model learning.

To get the features from the time series You can use following code:

library(WIPADD)

# Get random series
series <- example_series

tbl_features <- get_group_features_series(series)

To get features of many series at once it is possible to map over multiple series:

library(WIPADD)
library(purrr)


l_series <- list(example_series,
                 sample(example_series,
                 8e5)
                 )
                 
tbl_features <- map_dfr(l_series,
                        get_group_features_series)
)

When the features are prepared, the learning of the XGBoost model will is easily made by calling:

library(WIPADD)

features <- example_train_features_matrix
labels <- example_train_label

model <- train_xgb_classificator(features,
                                 labels)

Finally, if You already have the model, then You can classify the series by:

library(WIPADD)

# Get random series
series <- example_series

classify_series(series,
                example_model2)

For more info on the functions and their parameters see manual

Acknowledgment

This work was supported by Technology Agency of the Czech Republic - project TN01000007.