Title: Nested Multivariate Regression
Appreciate some guidance and sample codes. I’m new to Julia language, but have used Python and R a bit. This is a curve fitting / regression of data (csv) exercise. The equation to fit is as below.
w(x, h) = s(x) + (1 - s(x))*(e(x) / h) ^ (1 / n(x)
whereby s(x), e(x) and n(e) can be a constant, linear, power, exponential or logarithmic format, as below.
s_con(x) = a s_lin(x) = a * x + b s_log(x) = a * log10(x) + b s_pow(x) = a * x ^ b s_exp(x) = a * exp10(x * b) e_con(x) = c e_lin(x) = c * x + d e_log(x) = c * log10(x) + d e_pow(x) = c * x ^ d e_exp(x) = c * exp10(x * d) n_con(x) = e n_lin(x) = e * x + f n_log(x) = e * log10(x) + f n_pow(x) = e * x ^ f n_exp(x) = e * exp10(x * f)
The intended workflow/algo is a below.
s_list = [s_con, s_lin, s_log, s_pow, s_exp] e_list = [e_con, e_lin, e_log, e_pow, e_exp] n_list = [n_con, n_lin, n_log, n_pow, n_exp] for s in s_list for e in e_list for n in n_list w(x, h) = min(1, max(0, s + (1 - s) * (e / h) ^ ( 1 / n))) -- doing the solver to determine paramater of a, b, c, d, e, f -- reuse solved w(x, h) for later analysis, e.g. plot and reports. end end end
The plot & report will be analyzed to determine best match s(x) e(x) and n(x) for w(x, h). Thank you.