title: Algorithm for finding the optimal weights for prediction
body: <p>Consider I have the following weights and quantitative parameters: <code>w_1..w_n, p_1..p_n. 0 &lt;= w &lt;= 1</code>. I also have a selection of cases of parameters and associated values.</p>
  
  <p>What algorithms exist for finding the optimal weights to minimize the errors of predicting the value given the parameters? And what algorithms have typically achieved the best results?</p>
  
  <p>I try to predict the quality of an apple based on the parameters <code>p_1=transport _time</code>, <code>p_2=days_since_picking</code>. The quality is measured using a subjective likert scale.</p>
  
  <p>Fifty people have rated apples with scores from 1 to 5 and I know <code>p_1</code> and <code>p_2</code> for all those apples. How do I predict and find the weights for <code>p_1</code> and <code>p_2</code> that minimize the total errors in the cases?</p>