# Case Study: Spline Approximation

Back to main page

Case study background and problem formulations

Instructions for optimization with PSG Run-File, PSG MATLAB Toolbox, PSG MATLAB Subroutines and PSG R.

PROBLEM1: problem_St_Pen

Minimize st_pen(spline_sum)       (function Standard Penalty applied to Spline Sum)
Calculate:
meanabs_pen(spline_sum)      (function Mean Absolute Penalty applied to Spline Sum)
spline_sum                               (function Spline Sum)
——————————————————————–————————————————
st_pen = Standard Penalty
meanabs_pen = Mean Absolute Penalty
spline_sum = Spline Sum calculates spline value depending upon regression variables for every scenario
——————————————————————–————————————————
———————————————————————————
Third Degree Polynomial Spline Consisting of 5 Piecies
———————————————————————————

Dataset 20 4371 0.18954 0.12 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Run-File Problem Statement Data Solution Matlab Toolbox Data Matlab Subroutines Matlab Code Data R R Code Data

———————————————————————————
Third Degree Polynomial Spline Consisting of 30 Piecies
———————————————————————————

Dataset 120 4371 0.1888 3.82 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Run-File Problem Statement Data Solution Matlab Toolbox Data Matlab Subroutines Matlab Code Data R R Code Data

PROBLEM2: problem_Meanabs_Pen
Minimize meanabs_pen(spline_sum)     (function Mean Absolute Penalty applied to Spline Sum)
Calculate:
st_pen(spline_sum)          (function Standard Penalty applied to Spline Sum)
spline_sum                       (function Spline Sum)
——————————————————————–————————————————
meanabs_pen = Mean Absolute Penalty
st_pen = Standard Penalty
spline_sum = Spline Sum calculates spline value depending upon regression variables for every scenario

———————————————————————————
Third Degree Polynomial Spline Consisting of 5 Piecies
———————————————————————————

Dataset 20 4371 0.13590 0.06 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Run-File Problem Statement Data Solution Matlab Toolbox Data Matlab Subroutines Matlab Code Data R R Code Data

————————————————————————————
Third Degree Polynomial Spline Consisting of 30 Piecies
————————————————————————————

Dataset 120 4371 0.13496 2.67 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Run-File Problem Statement Data Solution Matlab Toolbox Data Matlab Subroutines Matlab Code Data R R Code Data
———————————————————————————
Subroutine for spline transformation with figures
———————————————————————————
Dataset 120 4371 0.13496 2.67 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Matlab Subroutines Matlab Code Data R R Code Data
PROBLEM3: problem_Logexp_Sum
Maximize logexp_sum(spline_sum)      (function Logarithms Exponents Sum applied to Spline Sum)
Calculate:
logexp_sum(spline_sum)     (function Logarithms Exponents Sum applied to Spline Sum)
logistic(spline_sum)             (function Logistic applied to Spline Sum)
——————————————————————–————————————————
logexp_sum = Logarithms Exponents Sum
logistic = Logistic calculate values of logistic function of spline approximation for every scenario
spline_sum = Spline Sum calculates spline value depending upon regression variables for every scenario
——————————————————————–————————————————
———————————————————————————
Third Degree Polynomial Spline Consisting of 5 Piecies
———————————————————————————

Dataset 20 14920 -0.68571 0.53 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Run-File Problem Statement Data Solution Matlab Toolbox Data Matlab Subroutines Matlab Code Data R R Code Data

————————————————————————————
Third Degree Polynomial Spline Consisting of 30 Piecies
————————————————————————————

Dataset 120 14920 -0.68481 10.45 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Run-File Problem Statement Data Solution Matlab Toolbox Data Matlab Subroutines Matlab Code Data R R Code Data
———————————————————————————
Subroutine for spline transformation with figures
———————————————————————————
Dataset 120 4371 0.13496 2.67 # of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec) Environments Matlab Subroutines Matlab Code Data R R Code Data

CASE STUDY SUMMARY

Splines are calibrated to approximate one dimension observation data. Input data for building a spline are vectors containing data of independent and dependent variables and parameters defining number of knots and smoothing degree of the spline. The splines are calibrated by minimizing various error functions, such as mean square error, mean absolute error, and maximum likelihood logistic regression function (PSG functions: st_pen, meanabs_pen, and logexp_sum, accordingly).