Pyfrontier.frontier_model package

Module contents

class Pyfrontier.frontier_model.AdditiveDEA(frontier, n_jobs=1)[source]

Bases: BaseDataEnvelopmentAnalysis

This is a envelop dea model.

Parameters:
  • frontier (Literal["CRS", "VRS", "IRS", "DRS"]) – CRS means constant returns to scale. VRS means variable returns to scale. IRS means increasing returns to scale. DRS means decreasing returns to scale.

  • n_jobs (int, optional) – The number of parallel jobs to solve DMU programming.

fit(inputs, outputs, x_weight=array([], dtype=float64), y_weight=array([], dtype=float64), index=nan)[source]

Fit additive model.

Parameters:
  • inputs (np.ndarray) – Inputs of DMUs.

  • outputs (np.ndarray) – Outputs of DMUs.

  • x_weight (np.ndarray, optional) – [description]. Defaults to np.array([]).

  • y_weight (np.ndarray, optional) – [description]. Defaults to np.array([]).

  • index (np.ndarray, optional) – This is ID to identify the DMU. The default is generated as a sequential number.

property result: List[AdditiveResult]

The return value is a list of objects.

Returns:

[description]

Return type:

List[AdditiveResult]

class Pyfrontier.frontier_model.EnvelopDEA(frontier, orient, super_efficiency=False, n_jobs=1)[source]

Bases: BaseDataEnvelopmentAnalysis

This is a envelop dea model.

Parameters:
  • frontier (Literal["CRS", "VRS", "IRS", "DRS"]) – CRS means constant returns to scale. VRS means variable returns to scale. IRS means increasing returns to scale. DRS means decreasing returns to scale.

  • orient (Literal["in", "out"]) – Input or output oriented model.

  • super_efficiency (bool, optional) – Whether to use super-efficiency. Defaults to False.

  • n_jobs (int, optional) – The number of parallel jobs to solve DMU programming.

fit(inputs, outputs, index=nan, uncontrollable_index=[])[source]

Fit envelop model.

Parameters:
  • inputs (np.ndarray) – Inputs of DMUs.

  • outputs (np.ndarray) – Outputs of DMUs.

  • index (np.ndarray, optional) – This is ID to identify the DMU. The default is generated as a sequential number.

  • uncontrollable_index (List[int], optional) – Specifies the index of the variable that will not be improved in DEA. In the case of input-oriented, this means how many columns of input or output are used in the case of output-oriented.

property results: List[EnvelopResult]

The return value is a list of objects.

Returns:

[description]

Return type:

List[EnvelopResult]

class Pyfrontier.frontier_model.HierarchalDEA(dea_model)[source]

Bases: object

fit(inputs, outputs, index=nan)[source]
class Pyfrontier.frontier_model.MultipleDEA(frontier, orient, n_jobs=1)[source]

Bases: BaseDataEnvelopmentAnalysis

This is a multiplier dea model.

Parameters:
  • frontier (Literal["CRS", "VRS", "IRS", "DRS"]) – CRS means constant returns to scale. VRS means variable returns to scale. IRS means increasing returns to scale. DRS means decreasing returns to scale.

  • orient (Literal["in", "out"]) – Input or output oriented model.

  • n_jobs (int, optional) – The number of parallel jobs to solve DMU programming.

add_assurance_region(type, index_a, index_b, coefficient, operator)[source]

Add additional constrains in the form of ratio multiplier bound. - x_a/x_b =< coefficient - coefficient <= x_a/x_b

Parameters:
  • type (Literal["in", "out"]) – This indicates whether constraints are imposed on inputs or outputs; it is not related to orient.

  • index_a (int) – [description]

  • index_b (int) – [description]

  • coefficient (float) – [description]

  • operator (Literal["<=", ">="], optional) – [description]

property cross_efficiency: List[float]

This kind of efficiency can rank DMUs with peer evaluation instead of a self-evaluation.

Returns:

Each values are always less than 1

Return type:

List[float]

fit(inputs, outputs, index=nan)[source]

Fit multiplier model.

Parameters:
  • inputs (np.ndarray) – Input of DMUs.

  • outputs (np.ndarray) – Output of DMUs.

  • index (np.ndarray, optional) – This is ID to identify the DMU. The default is generated as a sequential number.

property results: List[MultipleResult]

The return value is a list of objects.

Returns:

[]

Return type:

List[MultipleResult]