Gauge R&R
Table of Contents
Install
From PyPi:
pip install GaugeRnR
From source:
pip install -e .
Development dependencies:
pip install -r pip/requirements-dev.txt
CLI
The package can be used to generate reports from CLI:
GaugeRnR -f data/data_mXop.csv -s 3,5,11 -o outDir
This generates a html report that is stored in the outDir folder.
Setting the axes parameter is usefull if the data is not structured correct:
GaugeRnR -f data/data_opXm.csv -s 5,7,11 -a 2,1,0 -o outDir
To calculate linearity and bias ground truth is required:
GaugeRnR -f data/data_demoGRnR.csv -s 3,10,3 -a 0,2,1 -g 40,42,30,43,29,45,27.5,42,26,35 -o outDir
For more help run:
GaugeRnR -h
GaugeRnR.
The input data should be structeted
in a 3d array n[i,j,k] where
i = operator, j = part, k = measurement
Stored to file this data would look:
m1 m2 m3
3.29; 3.41; 3.64 # p1 | o1
2.44; 2.32; 2.42 # p2
3.08; 3.25; 3.07 # p1 | o2
2.53; 1.78; 2.32 # p2
3.04; 2.89; 2.85 # p1 | o3
1.62; 1.87; 2.04 # p2
More info: https://github.com/owodunni/GaugeRnR
Usage:
GaugeRnR -f FILE -s STRUCTURE [-a <AXES>] [-d <DELIMITER>] [-o <FOLDER>] [-g <PARTS>]
GaugeRnR -h | --help
GaugeRnR -v | --version
Examples:
GaugeRnR -f data.csv -s5,7,11 -o report
GaugeRnR -f data/data_mXop.csv -s 3,5,11 -o outDir
GaugeRnR -f data/data_opXm.csv -s 5,7,11 -a 2,1,0 -o outDir
GaugeRnR -f data/data_demoGRnR.csv -s 3,10,3 -a 0,2,1 -g 40,42,30,43,29,45,27.5,42,26,35 -o outDir
Options:
-f --file=FILE Load input data.
-s --structure=STRUCTURE Data structure.
Order should be operators, parts, measurements.
-a --axes=<AXES> Order of data axes [default: 0,1,2].
-d --delimiter=<DELIMITER> Order of data axes [default: ;].
-o --output=<FOLDER> Report output directory
-g --groundTruth=<PARTS> Ground Truth data for parts
-h --help Show this screen.
-v --version Show version.
Example
The package can be used in the following way:
from gaugeRnR import GaugeRnR
import numpy as np
# The input should be structeted in a 3d
# numpy array n[i,j,k] where
# i = operator, j = part, k = measurement
# Example:
# m1 m2 m3
data = np.array( #
[[[3.29, 3.41, 3.64], # p1 | o1
[2.44, 2.32, 2.42], # p2
[4.34, 4.17, 4.27], # p3
[3.47, 3.5, 3.64], # p4
[2.2, 2.08, 2.16]], # p5
[[3.08, 3.25, 3.07], # p1 | o2
[2.53, 1.78, 2.32], # p2
[4.19, 3.94, 4.34], # p3
[3.01, 4.03, 3.2], # p4
[2.44, 1.8, 1.72]], # p5
[[3.04, 2.89, 2.85], # p1 | o3
[1.62, 1.87, 2.04], # p2
[3.88, 4.09, 3.67], # p3
[3.14, 3.2, 3.11], # p4
[1.54, 1.93, 1.55]]]) # p5
g = GaugeRnR(data)
g.calculate()
print(g.summary())
This will result in the following table:
| Sources of Variance | DF | SS | MS | Var (σ²) | Std (σ) | F-value | P-value |
|---|---|---|---|---|---|---|---|
| Operator | 2 | 1.63 | 0.815 | 0.054 | 0.232 | 100.322 | 0.000 |
| Part | 4 | 28.909 | 7.227 | 0.802 | 0.896 | 889.458 | 0.000 |
| Operator by Part | 8 | 0.065 | 0.008 | 0 | 0 | 0.142 | 0.996 |
| Measurment | 30 | 1.712 | 0.057 | 0.057 | 0.239 | ||
| Total | 44 | 32.317 | 0.734 | 0.913 | 0.956 |
To access the result from the Gauge RnR data directly:
from gaugeRnR import GaugeRnR, Component, Result
.
.
.
g = GaugeRnR(data)
result = g.calculate()
F = result[Result.F]
>>> print(F[Component.OPERATOR])
100.322
For more examples of how to use this library take a look at the unit tests!
Statistics
The pacakge can generate the following statistics:
-
GaugeRnR
Gauge R&R, which stands for gage repeatability and reproducibility, is a statistical tool that measures the amount of variation in the measurement system arising from the measurement device and the people taking the measurement.
Unfortunately, all measurement data contains a certain percentage of variation. The variation is the difference between the true values and the observed values. The variation represents the amount of measurement error. In addition to measurement error, is the actual product or process variation. When we combine measurement error with product or process variation the resulting value represents the total variation. To assure that our measurement data is accurate we must determine if the amount of variation is acceptable
If the p value is less than 0.05, it means that the source of variation has a significant impact on the results.
For more information take a look at:
-
Mean, Standard Deviation and bar chart plots.
To get a better feel for our measurement data we can plot it togheter with a bar chart and show some caracteristic statistics of the data.
-
Normality test
For Gauge R&R to work it is important that our data is normal distibuted. If we don't have enough data the it might not be normal distributed. We can test if the data is normal distributed using a Shapiro-Wilk Test. Small values of W are evidence of departure from normality. It is important that our parts are normally distributed. A P-value smaller then 0.05 indicates that the data is not Gaussian.
For more information take a look at:
-
Linearity and Bias - requires ground truth data
Bias and linearity assess the accuracy of a gage.
- Bias examines the difference between the observed average measurement and a reference value. Bias indicates how accurate the gage is when compared to a reference value.
- Linearity examines how accurate your measurements are through the expected range of the measurements. Linearity indicates whether the gage has the same accuracy across all reference values.
A P-value smaller then 0.05 indicates that a linear equation fits well to the data.
For more information take a look at:
Metadata
Release files for GaugeRnR 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| GaugeRnR-0.6.0.tar.gz | 34.4 kB | Without provenance | Details for GaugeRnR-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| GaugeRnR-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for GaugeRnR-0.6.0-py3-none-any.whl |
Total release size: 74.3 kB
Release files / GaugeRnR-0.6.0.tar.gz
| Download URL | GaugeRnR-0.6.0.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
179b44c3ab42b38ee1512421af21bcb446cb554317814cfd8bc5201b5513e469
|
|
BLAKE2b-256 checksum How to use checksums |
0ea8c912fc8f6f0c99777257b8a8fd9475267cf12045ebd644940fe4d3329978
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
|
Release files / GaugeRnR-0.6.0-py3-none-any.whl
| Download URL | GaugeRnR-0.6.0-py3-none-any.whl |
|---|---|
| Size | 39.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6421bcf0870d9a6a20c890cf964039e7849d0d518b60845c0a0f2a172c1cf09e
|
|
BLAKE2b-256 checksum How to use checksums |
cee20d0e5a713f37c7de7f5ecff075b715bd5e00b0747fabfc16ff788146a783
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
|
Security for GaugeRnR 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.