Conducting Analysis - The SensorEvaluation Class

sensortoolkit contains dozens of individual modules and functions for computing statistical metrics and generating figures in accordance with U.S. EPA’s recommended performance metrics and targets. The SensorEvaluation class packages many of sensortoolkit’s modules into a user-friendly and efficient platform for evaluating sensor performance.

Note

This section provides a brief overview of the SensorEvaluation class. For more detail on the class and its methods, see the API Documentation for SensorEvaluation()

Important

While SensorEvaluation has been designed to calculate and utilize EPA’s recommended performance metrics and target values for sensors measuring either PM2.5 or O3, SensorEvaluation can be used to analyze data for any SDFS parameter. For pollutants other than PM2.5 or O3, users are encouraged to make use of the sensortoolkit.Parameter() methods for setting custom performance targets and metrics.

A brief overview of SensorEvaluation

  • Computes various quantities and metrics recommended by U.S. EPA’s performance targets reports including precision (SD - standard deviation, CV - coefficient of variation), error (root mean squared error - RMSE), linearity (R2), and bias (OLS regression slope and intercept).

  • Contains numerous plotting methods for displaying and saving figures for time series, sensor vs. reference scatter, meteorological conditions, etc.

  • Contains methods for printing summary statistics for evaluation conditions and performance evaluation results using U.S EPA’s recommended performance metrics.

Below is an example of instantiating the SensorEvaluation class for the AirSensor, ReferenceMonitor, and Parameter objects discussed in the Testing Attribute Objects section.

evaluation = sensortoolkit.SensorEvaluation(sensor,
                                            pollutant,
                                            reference,
                                            write_to_file=True)

Note

evaluation is the name given to the SensorEvaluation class instance. Users are not required to refer to their class instances as evaluation and can instead assign whichever name suits best.

Please note that subsequent reference to SensorEvaluation instance attributes and modules will use the name evaluation.

Arguments passed to SensorEvaluation

sensortoolkit.SensorEvaluation() attributes

Attribute name

Description

sensor

A sensortoolkit.AirSensor object.

param

A sensortoolkit.Parameter object.

reference

A sensortoolkit.ReferenceMonitor object.

write_to_file

If true, evaluation statistics are saved to /data/eval_stats/[name of sensor] and figures are written to /figures/[name of sensor].

SensorEvaluation Methods

SensorEvaluation contain numerous methods for generating figures, calculating statistical quantities, and displaying formatted summaries printed to the console for either evaluation statistics or testing period site conditions.

Click on the categories below to learn more about these methods.