CNLS

class pystoned.CNLS.CNLS(y, x, z=None, cet='addi', fun='prod', rts='vrs')[source]

Convex Nonparametric Least Square (CNLS)

__init__(y, x, z=None, cet='addi', fun='prod', rts='vrs')[source]

CNLS model

Parameters:
  • y (float) – output variable.

  • x (float) – input variables.

  • z (float, optional) – Contextual variable(s). Defaults to None.

  • cet (String, optional) – CET_ADDI (additive composite error term) or CET_MULT (multiplicative composite error term). Defaults to CET_ADDI.

  • fun (String, optional) – FUN_PROD (production frontier) or FUN_COST (cost frontier). Defaults to FUN_PROD.

  • rts (String, optional) – RTS_VRS (variable returns to scale) or RTS_CRS (constant returns to scale). Defaults to RTS_VRS.

display_alpha()[source]

Display alpha value

display_beta()[source]

Display beta value

display_lamda()[source]

Display lamda value

display_residual()[source]

Dispaly residual value

display_status()[source]

Display the status of problem

get_adjusted_alpha()[source]

Return the shifted constatnt(alpha) term by CCNLS

get_adjusted_residual()[source]

Return the shifted residuals(epsilon) tern by CCNLS

get_alpha()[source]

Return alpha value by array

get_beta()[source]

Return beta value by array

get_frontier()[source]

Return estimated frontier value by array

get_lamda()[source]

Return lamda value by array

get_predict(x_test)[source]

Return the estimated function in testing sample

get_residual()[source]

Return residual value by array

get_status()[source]

Return status

optimize(email='local', solver=None)[source]

Optimize the function by requested method

Parameters:
  • email (string) – The email address for remote optimization. It will optimize locally if OPT_LOCAL is given.

  • solver (string) – The solver chosen for optimization. It will optimize with default solver if OPT_DEFAULT is given.