Note
Go to the end to download the full example code.
Cross efficiency
Preparing…
Import modules and prepare data.
import matplotlib.pyplot as plt
import pandas as pd
from Pyfrontier.frontier_model import MultipleDEA
df = pd.DataFrame(
{"price": [3, 2, 4, 6, 4], "rent": [5, 2, 2, 1, 6], "output": [2, 1.5, 3, 2, 2]}
)
dea = MultipleDEA("CRS", "in")
dea.fit(df[["price", "rent"]].to_numpy(), df[["output"]].to_numpy())
dea.result[0]
MultipleResult(score=np.float64(0.888889), id=0, dmu=DMU(input=array([3, 5]), output=array([2.]), id=0), x_weight=[0.333333, 0.0], y_weight=[0.444444], bias=0.0)
[r.score for r in dea.result]
[np.float64(0.888889), np.float64(1.0), np.float64(1.0), np.float64(1.0), np.float64(0.666667)]
[np.float64(0.7166663333333333), np.float64(0.8437494999999999), np.float64(0.937499875), np.float64(0.4444442777777778), np.float64(0.5416665833333334)]
efficiency_matrix = dea._cross_efficiency_matrix()
plt.figure()
plt.imshow(efficiency_matrix, interpolation="nearest", vmin=0, vmax=1, cmap="Blues")
plt.colorbar()
plt.show()

References
See also
- Author
John Doyle and Rodney Green.
- Title
Efficiency and Cross-efficiency in DEA: Derivations, Meanings and Uses,
Journal of the Operational Research Society, 1994.
https://doi.org/10.1057/jors.1994.84.
See also
- Author
Sexton, Thomas R. and Silkman, Richard H. and Hogan, Andrew J..
- Title
Data envelopment analysis: Critique and extensions,
New Directions for Program Evaluation, 1986.
https://onlinelibrary.wiley.com/doi/abs/10.1002/ev.1441.
Total running time of the script: (0 minutes 0.116 seconds)