1

Consider I have the following weights and quantitative parameters: w_1..w_n, p_1..p_n. 0 <= w <= 1. I also have a selection of cases of parameters and associated values.

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?

I try to predict the quality of an apple based on the parameters p_1=transport _time, p_2=days_since_picking. The quality is measured using a subjective likert scale.

Fifty people have rated apples with scores from 1 to 5 and I know p_1 and p_2 for all those apples. How do I predict and find the weights for p_1 and p_2 that minimize the total errors in the cases?

double-beep
  • 5,031
  • 17
  • 33
  • 41
MortenGR
  • 803
  • 1
  • 8
  • 22
  • 1
    I think you'd need to specify a loss function for an exact answer to this question. But, for small *n* and not a lot of data, you could just use nonlinear optimization, and have any loss function you want. Larger *n*, and you can easily shove a problem of this format into an SVM (see libsvm), but I'm pretty sure that implies a specific loss function. – Jay Kominek Aug 12 '15 at 13:58
  • 1
    Isn't this simply linear regression? – IVlad Aug 12 '15 at 14:08
  • Jay: I'm not into this terminology, but could a loss function for a specific case be: abs(value calculated by the algorithm-the rating provided for the apples)? – MortenGR Aug 12 '15 at 14:34
  • MortenGR, I believe that would result in the method of Least Absolute Deviations. @JohnPirie There's nothing mathematica-related about this. stats.SE, maybe. – Jay Kominek Aug 13 '15 at 04:29

1 Answers1

1

I agree with the comment that you should run a web search on "linear regression". At least three other sources for lists of algorithms come to mind:

  1. NLopt: http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms (and my C# wrapper for it: https://github.com/BrannonKing/NLoptNet)

  2. S. Boyd's book: http://stanford.edu/~boyd/cvxbook/

  3. You could probably use a supervised AI algorithm. Neural networks are typically made up of "weights": https://en.wikipedia.org/wiki/Supervised_learning

You could also use a genetic algorithm in conjunction with gray code weight encoding.

Brannon
  • 5,324
  • 4
  • 35
  • 83
  • I know about linear algorithms, and have used them extensively, but am also curious about other approaches. Thank you very much for your input :-) – MortenGR Aug 12 '15 at 14:40
  • @MortenGR neural networks and SVMs are (or can be) nonlinear and therefore different approaches. – IVlad Aug 12 '15 at 14:51