-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
108 lines (77 loc) · 7.24 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# igate
<!-- badges: start -->
[![Travis build status](https://travis-ci.org/stefan-stein/igate.svg?branch=master)](https://travis-ci.org/stefan-stein/igate)
[![CRAN Version](https://www.r-pkg.org/badges/version/igate)](https://CRAN.R-project.org/package=igate)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/igate?color=blue)](https://r-pkg.org/pkg/igate)
<!-- badges: end -->
The goal of igate is to provide you with a quick and powerful, yet easy to understand toolbox that lets you extract relevant process parameters from manufacturing data, validate these parameters and find their optimal ranges and automatically create concise reports of the conducted analysis. The igate methodology has been published in [A guided analytics tool for feature selection in steel manufacturing with an application to blast furnace top gas efficiency](https://doi.org/10.1016/j.commatsci.2020.110053).
# Methodology
The igate package implements the **i**nitial **G**uided **A**nalytics for parameter **T**esting and controland **E**xtraction (iGATE) framework for manufacturing data.
Having identified a manufacturing ‘problem’ to be investigated, a data set is assembled for a ‘typical’ period of
operation, i.e. excluding known disturbances such as maintenance or equipment failures. This
data set includes the so called *target variable*, a direct indication or proxy for the problem under
consideration and the variale whose variation we want to explain. It also includes a number of covariate parameters representing *suspected sources of variation*
(SSVs), i.e. variables that we consider potentially influetial for the value of the `target`. Parameters with known and explainable relationships with the target variable should be
excluded from the analysis, although this can be addressed in an iterative manner though
subsequent exclusion and repeating of the process. The iGATE procedure consists of the following seven steps (detailed explanations follow below):
1. Select 8 Best of the Best (BOB) and 8 Worst of the Worst (WOW) products. The number of observations chosen can be changed using the `versus` argument of `igate`/ `categorical.igate`.
1. Perform the Tukey-Duckworth test for each SSV (see details below).
1. For each SSV selected by the said test, perform Wilcoxon Rank test.
1. Extract upper/ lower control limit for kept parameters.
1. Perform sanity check via regression plot; decide which parameters to keep.
1. Validate choice of parameters and control limits.
1. Report findings in standardized format.
Steps 1-4 are performed using the `igate` function for continuous target variables or the `categorical.igate` function for categorical target variables. Especially for categorical targets with few categories `robust.categorical.igate` is a robustified version of `categorical.igate` and should be considered.
When running `igate`/ `categorical.igate` with default settings, any outliers for the target variable are excluded and the observations corresponding to the best 8 (B) and worst 8 (W) instances of the target variable are identified. For each of
these 16 observations, each SSV is inspected in turn. The distribution of the values of the SSV of the 8 BOB and 8 WOW are analyzed by applying the [Tukey-Duckworth test](https://en.wikipedia.org/wiki/Tukey–Duckworth_test) (see reference in link for original paper). If the critical value returned by the test is larger than 6 (this corresponds to a p-value of less than 0.05), the SSV is retained as being potentially significant.
This test was chosen for its simplicity and ease of interpretation and visualization. SSVs failing the test are highly unlikely to be influential whilst SSVs
passing the test may be influential. The Wilcoxon-Rank test performed in step three of iGATE serves as a possibly more widely known alternative, that might, however, be harder to explain to non-statisticians. The main function of these steps is to facilitate dimensionality reduction in the data set to generate a manageable population for expert consideration.
Step 5 is performed by calling `igate.regressions`, resp. `categorical.freqplot`. These functions produce a regression (for continuous target) resp. frequency (for categorical targets) plot and save it to the current working directory. A domain expert familiar with the manufacturing process should review these plots and decide which parameters to keep for further analysis based on goodness of fit of the data to the plot.
For the validation step, the production period from which the validation data is selected is dependent on the business situation, but should be from a period of operation consistent with that from which the initial
population was drawn, i.e. similar product types, similar level of equipment status etc. The
validation step then considers all the retained SSV as a collective in terms of good and bad
bands, and extracts from the validation sample all the records which satisfy the condition that all
retained SSVs lie within these bands. The expectation is that where all the SSVs lie within the
good band, then the target should also correspond to the best performance, and vice versa
where the retained SSVs all lie in the bad bands we expect to see bad performance. The application gives feedback on the extent to
which this criterion is satisfied in order to help the user conclude the exploration and make
recommendations for subsequent improvements. Validation is performed via the `validate` function.
We consider the last step, the reporting of the results in a standardized manner, an integral part of iGATE that ensures that knowledge about past analyses is retained within a company. This is achieved by calling the `report` function.
## Installation
You can install the package directly from CRAN.
```{r, eval=FALSE}
install.packages("igate")
```
Or you can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("stefan-stein/igate")
```
## Example
This is a basic example which shows you how to conduct an iGATE analysis for a continuous target variable. We are using the built in `iris` data set and consider `"Sepal.Length"` as out target.
```{r example, eval=FALSE}
library(igate)
set.seed(123)
n <- nrow(iris)*2/3
rows <- sample(1:nrow(iris), n)
df <- iris[rows, ]
results <- igate(df, target = "Sepal.Length", good_end = "high", savePlots = TRUE)
results
```
The significant variables are shown alongside their count summary statistic from the Tukey-Duckworth Test as well as the p-value from the Wilcoxon-Rank test. Also, we see the good and bad control bands as well as several summary statistics to ascertain the randomness in the results (see documentation of `igate` for details). Remember to use the option `savePlots = TRUE` if you want to save the boxplot of the target variable as a png. This png will be needed for producing the final report of the analysis.
For details on how to conduct the other steps in the iGATE framework, please refer to the package vignette, by running
```{r, eval=FALSE}
browseVignettes("igate")
```