Pyfrontier.domain package

Submodules

Pyfrontier.domain.assurance_region module

class Pyfrontier.domain.assurance_region.AssuranceRegion(type, index_a, index_b, coefficient, operator)[source]

Bases: object

  • x_a/x_b =< coefficient

  • coefficient <= x_a/x_b

coefficient: float
index_a: int
index_b: int
operator: Literal['=<', '>=']
type: Literal['input', 'output']

Pyfrontier.domain.dmu module

class Pyfrontier.domain.dmu.BooleanInput(_value)[source]

Bases: object

property value
class Pyfrontier.domain.dmu.DMU(input, output, id)[source]

Bases: object

id: int
input: ndarray
output: ndarray
class Pyfrontier.domain.dmu.DMUSet(inputs, outputs, index=nan)[source]

Bases: object

Dataset for DEA

property N
get_id(o)[source]
index: ndarray = nan
inputs: ndarray
property m
outputs: ndarray
property s

Pyfrontier.domain.metrics module

Pyfrontier.domain.parallel module

class Pyfrontier.domain.parallel.MultiProcessor(_solver_function, _n_dmus)[source]

Bases: object

solve(n_jobs)[source]
Return type:

List[BaseResult]

class Pyfrontier.domain.parallel.NumberOfJobs(_n_jobs=1)[source]

Bases: object

property value: int

Pyfrontier.domain.result module

class Pyfrontier.domain.result.AdditiveResult(score, id, dmu, x_slack, y_slack, weights)[source]

Bases: BaseResult

  • score: efficiency

  • id:

  • dmu:

  • x_slack:

  • y_slack:

  • weights: lambda

dmu: DMU
id: int
property is_efficient: bool
score: float
weights: List[float]
x_slack: List[float]
y_slack: List[float]
class Pyfrontier.domain.result.BaseResult(score, id, dmu)[source]

Bases: ABC

dmu: DMU
id: int
score: float
class Pyfrontier.domain.result.EnvelopResult(score, id, dmu, weights, x_slack, y_slack, orientation)[source]

Bases: BaseResult

  • score: efficiency

  • id:

  • dmu:

  • weight:

  • x_slack:

  • y_slack:

  • orientation: “in” for input-oriented, “out” for output-oriented

dmu: DMU
property has_slack: bool
id: int
property is_efficient: bool
orientation: Literal['in', 'out']
score: float
property virtual_dmu: DMU

Returns the virtual DMU (projection onto the efficient frontier).

The virtual DMU represents the target values that an inefficient DMU should achieve to become efficient, based on DEA theory.

For input-oriented models:
  • projected_input = score * original_input - input_slack

  • projected_output = original_output + output_slack

For output-oriented models:
  • projected_input = original_input - input_slack

  • projected_output = score * original_output + output_slack

Returns:

A new DMU object with projected input and output values

Return type:

DMU

weights: List[float]
x_slack: List[float]
y_slack: List[float]
class Pyfrontier.domain.result.MultipleResult(score, id, dmu, x_weight, y_weight, bias)[source]

Bases: BaseResult

  • score: efficiency

  • id:

  • dmu:

  • x_weight:

  • y_weight:

  • bias:

bias: float
dmu: DMU
id: int
property is_efficient: bool
score: float
x_weight: List[float]
y_weight: List[float]

Pyfrontier.domain.slack_weight module

class Pyfrontier.domain.slack_weight.SlackWeight(_weights=<factory>, _n_dim=0)[source]

Bases: object

property value: ndarray

Pyfrontier.domain.type module

class Pyfrontier.domain.type.Frontier(_frontier)[source]

Bases: object

Frontier type with validation for DEA models.

property value: Literal['CRS', 'VRS', 'NDRS', 'NIRS']

Returns the validated frontier value.

Module contents

class Pyfrontier.domain.AdditiveResult(score, id, dmu, x_slack, y_slack, weights)[source]

Bases: BaseResult

  • score: efficiency

  • id:

  • dmu:

  • x_slack:

  • y_slack:

  • weights: lambda

dmu: DMU
id: int
property is_efficient: bool
score: float
weights: List[float]
x_slack: List[float]
y_slack: List[float]
class Pyfrontier.domain.AssuranceRegion(type, index_a, index_b, coefficient, operator)[source]

Bases: object

  • x_a/x_b =< coefficient

  • coefficient <= x_a/x_b

coefficient: float
index_a: int
index_b: int
operator: Literal['=<', '>=']
type: Literal['input', 'output']
class Pyfrontier.domain.BooleanInput(_value)[source]

Bases: object

property value
class Pyfrontier.domain.DMU(input, output, id)[source]

Bases: object

id: int
input: ndarray
output: ndarray
class Pyfrontier.domain.DMUSet(inputs, outputs, index=nan)[source]

Bases: object

Dataset for DEA

property N
get_id(o)[source]
index: ndarray = nan
inputs: ndarray
property m
outputs: ndarray
property s
class Pyfrontier.domain.EnvelopResult(score, id, dmu, weights, x_slack, y_slack, orientation)[source]

Bases: BaseResult

  • score: efficiency

  • id:

  • dmu:

  • weight:

  • x_slack:

  • y_slack:

  • orientation: “in” for input-oriented, “out” for output-oriented

dmu: DMU
property has_slack: bool
id: int
property is_efficient: bool
orientation: Literal['in', 'out']
score: float
property virtual_dmu: DMU

Returns the virtual DMU (projection onto the efficient frontier).

The virtual DMU represents the target values that an inefficient DMU should achieve to become efficient, based on DEA theory.

For input-oriented models:
  • projected_input = score * original_input - input_slack

  • projected_output = original_output + output_slack

For output-oriented models:
  • projected_input = original_input - input_slack

  • projected_output = score * original_output + output_slack

Returns:

A new DMU object with projected input and output values

Return type:

DMU

weights: List[float]
x_slack: List[float]
y_slack: List[float]
class Pyfrontier.domain.Frontier(_frontier)[source]

Bases: object

Frontier type with validation for DEA models.

property value: Literal['CRS', 'VRS', 'NDRS', 'NIRS']

Returns the validated frontier value.

class Pyfrontier.domain.MultiProcessor(_solver_function, _n_dmus)[source]

Bases: object

solve(n_jobs)[source]
Return type:

List[BaseResult]

class Pyfrontier.domain.MultipleResult(score, id, dmu, x_weight, y_weight, bias)[source]

Bases: BaseResult

  • score: efficiency

  • id:

  • dmu:

  • x_weight:

  • y_weight:

  • bias:

bias: float
dmu: DMU
id: int
property is_efficient: bool
score: float
x_weight: List[float]
y_weight: List[float]
class Pyfrontier.domain.NumberOfJobs(_n_jobs=1)[source]

Bases: object

property value: int
class Pyfrontier.domain.SlackWeight(_weights=<factory>, _n_dim=0)[source]

Bases: object

property value: ndarray