DQM_single_record

This is the class for computing a single record DQM.

class QPrism.Sensor.DQM.DQM_single_record

Bases: object

A class represents the data quality matrix.

compute_DQM()

Compute the DQM for input record under current metrics configuration. Must call set_input_path before calling this method.

get_APD()

Return the APD score for given input data as a str. APD must be included in the DQM class.

get_DQM()

Return the computed DQM as a list. compute_DQM must be called before this method.

get_IRLR()

Return the IRLR score for given input data as str.

get_MDR()

Return the MDR score for given input data as a str. MDR must be included in the DQM class.

get_SNR()

Return the SNR score for given input data as a str. SNR must be included in the DQM class.

get_SRC()

Return the SRC score for given input data as a str. SRC must be included in the DQM class.

get_VDR()

Return the VDR score for given input data as a str. VDR must be included in the DQM class.

get_anomaly_index()

Return the index (row number) of the anamoly points for the input record. APD must be included in the DQM class.

get_fields()

Return a list represents the current included metrics in DQM. compute_DQM must be called before this method.

save_to_file(path: str)

Save the computed DQM as a csv file to the given output path. Must call compute_DQM before calling this.

pathstr

Path to the output file

set_APD(included: bool)

Set whether APD is included as a metric

includedbool

A bool value to indicate whether APD is included in the result DQM

set_MDR(included: bool)

Set whether MDR is included as a metric

includedbool

A bool value to indicate whether MDR is included in the result DQM

set_SNR(included: bool)

Set whether SNR is included as a metric

includedbool

A bool value to indicate whether SNR is included in the result DQM

set_SRC(included: bool)

Set whether SRC is included as a metric

includedbool

A bool value to indicate whether SRC is included in the result DQM

set_VDR(included: bool)

Set whether VDR is included as a metric

includedbool

A bool value to indicate whether VDR is included in the result DQM

set_input_data(df: DataFrame)

Set the path of input record file.

dfpd.DataFrame

A dataframe represents a single record, all entries in the dataframe should be able to convert to float in order to compute the DQM.