Skip to content
Snippets Groups Projects
README.md 2.16 KiB
Newer Older
  • Learn to ignore specific revisions
  • Tomáš Martinovič's avatar
    Tomáš Martinovič committed
    # Wireless PD detection
    
    This repository contains [R](https://cran.r-project.org/) 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:
    ``` r
    devtools::install_git("https://code.it4i.cz/ADAS/wireless-pd-detection")
    ```
    or `remotes` package:
    
    ``` r
    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:
    
    ``` r
    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:
    ``` r
    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:
    
    ```r
    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:
    ``` r
    library(WIPADD)
    
    # Get random series
    series <- example_series
    
    classify_series(series,
                    example_model2)
    
    ```
    
    
    For more info on the functions and their parameters see [manual](inst/WIPADD_1.0.1.pdf)
    
    # Acknowledgment
    
    
    Tomas Martinovic's avatar
    Tomas Martinovic committed
    This work was supported by Technology Agency of the Czech Republic - project TN01000007.