CovMatch

Covariate Matching. The model aims to take list of two data sets and returns the after matched data sets using user specified covariates and threshold.

from dwse import CovMatch
model = CovMatch(Xlist, ylist)
matched_X = model.matched_data_X
matched_y = model.matched_data_y
class dswe.covmatch.CovMatch(Xlist, ylist=None, circ_pos=None, thresh=0.2, priority=False)[source]
Parameters
  • Xlist (list) – A list, consisting of data sets to match, also each of the individual data set can be a matrix with each column corresponding to one input variable.

  • ylist (list) – A list, consisting of data sets to match, and each list is a array corresponds to target values of the data sets.

  • circ_pos (list or int) – A list or array stating the column position of circular variables. An integer when only one circular variable present. Default is set to None.

  • thresh (float or list) – A numerical or a list of threshold values for each covariates, against which matching happens. It should be a single value or a list of values representing threshold for each of the covariate. Default value is 0.2.

  • priority (bool) – A boolean, default value False, otherwise computes the sequence of matching. Default is False.

Returns

self with trained parameters.

  • matched_data_X: The variable values of datasets after matching.

  • matched_data_y: The response values of datasets after matching (if provided, otherwise None).

  • min_max_original: The minimum and maximum value in original data for each covariates used in matching.

  • min_max_matched: The minimum and maximum value in matched data for each covariates used in matching.

Return type

CovMatch

Reference

Shin, Ding, and Huang, 2018, “Covariate matching methods for testing and quantifying wind turbine upgrades,” Annals of Applied Statistics, Vol. 12(2), pp. 1271-1292.