Solving (apparently convex under constraints) nonlinear system of equations - Modified linear regression

29 Views Asked by At

I have been struggling with this problem for quite some time and I am excited to share it with this brilliant community!

Question

I am basically doing a modified version of linear regression. I have multiple sources of features, and want to weight each source such that the sum of the source weights $= 1.$ In other words, for each source's feature matrix $X_{iSource}^{(\text{nExamples},\,\text{nFeatures})}$, parameter matrix $B^{(\text{nFeatures})}$, source weighting vector $S^{(\text{nSources})}$ and target matrix $Y^{(\text{nExamples})}$, $$\min_{B,S} \sum_{\text{nExamples}}[(\sum_{iSource = 1}^{nSources}s_{iSource}X_{iSource}B) - Y]^2$$ $$\sum_{iSource = 1}^{nSources}s_{iSource} = 1$$ (sorry if my syntax is off... its been a while since school)

Motivation

Well, for a while I have been doing a search on $S$, and solving for $B$ given some value of $S$. This is fine when $S$ is small, not so much when $S$ is large. I have been doing this for a few years now, and I have been plotting MSE vs $S$ when $\text{nSources} \le 3.$ Every plot I see is convex! So for a while, I've got it stuck in my head that there should be a closed form solution for $B$ and $S.$ I have spent too many hours and have determined I don't have the background (or know where to find the background) to solve this problem. Any and all suggestions are much appreciated!

edit: I realized that I was misrepresenting the problem. After fixing it up, the cost function is quite a mess. Perhaps a cleaner representation might lead to an easier solution - any suggestions would be appreciated... Apologies for those who have already answered!