Returns the sum of residuals of the prediction of the left-out points using cross validation. If specified, additionally returns the estimated coefficients of the utility function (in the B-spline basis).
Arguments
xi
a vector containing the certainty equivalents (x-values of utility points) for a given participant in each use case.
yi
can be a vector or a matrix representing the corresponding utility values (y-values of utility points).
lambda
lambda is the penalization weight used to compute the initial estimate. The default value is 1.
n_penalty_dimensions
number of dimensions (i.e., derivatives) to penalize. Possible values are 1 or 2. The default value is 1.
penalty_order
highest dimension (i.e., derivative) to penalize. Must be lower than deg.
ndx
number of intervals to partition the distance between the lowest and highest x-values of the utility points.
deg
degree of the B-spline basis. Determines the degree of the function to be estimated. If deg = 2, the estimated utility function will consist of quadratic functions.
cross_validation_mode
determines which cross validation mode should be used. If 0, then the cross validation method is leave-one-third-out. If 1, then the cross validation method is a theoretical leave-one-out, i.e., based on a formula. The default value is 1.
return_estimate
parameter that indicates whether or not to return the (initially) estimated coefficients. Default is false.
left_out_xi
needed for cross validation: the x-values of the points that are left out for fitting the model, so that they can be predicted
left_out_yi
needed for cross validation: the y-values of the points that are left out for fitting the model, so that they can be predicted