1

Argmax: https://en.wikipedia.org/wiki/Arg_max

Since there was some confusion i will describe what argmax does:

argmax finds arguments for a function so that this function is maximized.

Simple example: x * (10 - x)
x = 1 -> 1 * (10 - 1) = 9
x = 2 -> 2 * (10 - 2) = 16
...
x = 5 -> 5 * (10 - 5) = 25
x = 6 -> 6 * (10 - 6) = 24

So in this example argmax would give x = 5. argmax should do this for multiple variables in one function.


I'm trying to solve this formula from the paper Provably Manipulation-Resistant Reputation Systems:

argmax

product

X is a matrix with variables for which i want to find the values that maximize the formula.

I allready tried it with Wolfram|Cloud but the free plan has a too small memory restriction: Wolfram|Cloud memory limit exceeded

I have a local MATLAB R2016b version and would like to program this formulas in MATLAB.

Does MATLAB have a argmax function?

Community
  • 1
  • 1
Spenhouet
  • 6,556
  • 12
  • 51
  • 76
  • Your question is, and I quote **"Does MATLAB have a argmax function?"**... the answer is **Yes**. `argmax` finds the **location** of where the maximum is located.... and thus spoke the duplicate. If this is **not** what you intended, please edit your post to clearly reflect what you want. – rayryeng Jan 18 '17 at 20:41
  • No. I don't know how you come to this conclusion? The method in the linked question is "max" and not "argmax". I don't want the location of the maximum. I never asked for that. And that is not what argmax does. Look at the formulas i provided and the wikipedia page about argmax! – Spenhouet Jan 18 '17 at 20:44
  • From Wikipedia: "*In mathematics, the arguments of the maxima (abbreviated arg max or argmax) are the points of the domain of some function at which the function values are maximized.*". How is this different? – rayryeng Jan 18 '17 at 20:46
  • Oh I see. You're looking at this in more of a linear or dynamic programming perspective. My mistake, but it wasn't clear originally. I can reopen. – rayryeng Jan 18 '17 at 20:47
  • That is totally different. That means that if you have for example a function x * (10-x) than argmax would find the value for x that would maximize the result of x * (10 - x). So x = 1 would give 9, x = 2 would give 16, ... and x = 5 would give 25 and therefor the highest value. – Spenhouet Jan 18 '17 at 20:48
  • .... that's still the same understanding... it's the point in your signal, or the location that generates the largest value. Given an already presented array of points, you would use the second output of the `max` function. However, you **are not presented** with this already computed signal so you are right it no longer applies. This is more of a linear programming / dynamic programming problem so I've reopened it. In the future, it would help to show what you've tried, regardless of whatever language you have tried it in. – rayryeng Jan 18 '17 at 20:51
  • @rayryeng: I have added a example of argmax in my question to prevent more confusion. Argmax is a real complex function. In my case i'm looking for a 12x12 matrix of variables that argmax needs to find so that the formula above maximizes. These variables should all be between 0 - 1 (with decimals). – Spenhouet Jan 18 '17 at 20:59
  • Sounds good. Hope you get your question answered! I would also recommend asking on Mathematics Stack Exchange too. – rayryeng Jan 18 '17 at 21:00
  • I was not sure if i should ask in stackoverflow, mathematica or mathematics. I don't want to duplicate my question on multiple exchange sites. – Spenhouet Jan 18 '17 at 21:02

0 Answers0