Hi Saurabh,On Tue, Jun 5, 2018 at 7:06 PM, saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:I want to perform least square regression but with weighted values.If there is no direct support for weighted regression, you want to convert your variables to carry the weights in themselves. Least-square fitting is to minimize this costfunctionJ = sum_{n = 1 to N} of (u(t_n) − U_n) W_n (u(t_n) − U_n),where u(t_n) is the function you want to optimize, t's are time steps, U's are observations, and W's are the weights. Let A_n = sqrt{W_n}. Then, the above minimization problem reduces toJ = sum_{n = 1 to N} of (v(t_n) − V_n) (v(t_n) − V_n),if we convert the variables as v(t_n) = A_n u(t_n) and V_n = A_n U_n. This is a non-weighted least-square regression!Hope this helps.Regards,Ryo