function [output] = f_loss_DR(X,mod_params,loss_params)
    
    lower = loss_params.lower;
    upper = loss_params.upper;
    alpha = loss_params.alpha;
    beta  = loss_params.beta;
    w     = loss_params.w;

    betas  = mod_params.beta_mixing;
    gamma = mod_params.beta_kernel;
    tau   = mod_params.tau;

    DRf   = @(x) (((lower-x)).^alpha).*(f_LSBP_density_C_test(x,X,X,betas,gamma,tau));
    EIRf  = @(x) (((x-upper)).^beta).*(f_LSBP_density_C_test(x,X,X,betas,gamma,tau));

    DR  = quadgk(DRf,-Inf,lower);
    EIR = quadgk(EIRf,upper,Inf);
    BR  = w.*EIR - (1-w).*DR;

    output = [DR,EIR,BR];
end       
