Disclaimer: I never thought of this problem previously. Just did now, and after ~30 minutes of thinking, my brain managed to spit an answer. Scrutinize please.
TL;DR
Depends on the process that generates those numbers. For some processes, it could be possible that (say) when the 2nd component has value between 1 and 2, then the component of the largest value is always the 7th. In those cases, it would be possible to find useful regression models up to some degree that is dependent on the process.
But on the other hand, if the process is totally random, then in my view we a regression can never do do anything better than this trivial function:
if input vector seen identically in the learning set:
return that vector
else:
return a random number from {1,2,...,d}
There are many problems that can be made that share this unfriendly property. For example, can a regression function figure out $a+b$ if given many values of $a$, $b$ and their answers? Your question is essentially similar: can we use regression to learn about an operator?
I cannot think of a way of solving those problems by regression without cheating (e.g. by adding fancy new components in the samples).
Let's say that here is your training samples:
\begin{equation}
\mathbf{X} = \begin{pmatrix}
1& 3 &4 &10& 2 &-1 &-2\\
2& 66 &3 &3& 3 &3 &3\\
\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\
5& 4 &0 &0& 9 &7 &2\\
\end{pmatrix}
\end{equation}
with the following target variables that correspond to the training samples (which specify the position of the component/dimension that has the highest value):
\begin{equation}
\mathbf{Y} = \begin{pmatrix}
4\\
2\\
\vdots\\
6\\
\end{pmatrix}
\end{equation}
So $x_i = (x_{i,1},x_{i,2}, \ldots, x_{i,d})$ is some training sample of yours (a $d$ dimensional vector). And since you have $n$ many samples, then if you stack those vectors atop each other you get an $n \times d$ matrix.
An optimistic estimator of the position:
Let's say that, by analysing your learning samples and their target variables (which is only $n$ samples), you managed to obtain the following estimated PDFs:
- $\hat f_{X}$ PDF of random variable $X$; $X$ takes values in set of vectors $\{(\mathbf{x}_{i,1},\mathbf{x}_{i,2},\ldots,\mathbf{x}_{i,d}):1 \le i \le n\}$, where $\mathbf{x}_{i,j}$ is some number in matrix $\mathbf{X}$.
- $\hat f_{X,Y}$ joint PDF of random variables $X$ and $Y$; $Y$ takes values in set of target values $\{1,2,\ldots,d\}$.
Then you get the expected value of the position of the component of the largest value is by:
\begin{equation}
\sum_{y=1}^d y\frac{\hat f_{X,Y}(\mathbf{x},y)}{\hat f_{X}(\mathbf{x})}
\end{equation}
The accuracy depends on how lucky we are in finding good estimations of the PDFs. The question is: how lucky can we be when we only have $n$ samples?
In my view, the answer is: it also depends on the process that generates those vectors. If we are lucky and the process is one that leaves a lot of correlation between the vector component values and the target variable, then this naive estimator could achieve 100% accuracy.
Another estimator of the position under more pessimistic assumptions
Let's go almost extreme:
- The process that generates those vectors is random.
- But component values can only be in $\{-10,-9,\ldots,-1,0,1,\ldots,9,10\}$. I.e. we are dealing with PMFs instead of PDFs (cause it's all discrete now).
I can't think if a proof now (sleep time here; or maybe I am wrong), but I strongly feel at the moment is that perfectly accurate estimations of PMFs of such random process can only exist when learning samples (i.e. those $n$ vectors) cover all possible sample vector values.
The smallest possible value for $n$ can be achieved only if learning samples are chosen at perfect randomness (uniform distribution) from the population. When this perfect random sampling happens, then smallest value for $n$ is $21^d$.
So if learning samples are perfectly uniform, then $n=21^d$ must be true in order to allow for finding perfect PMFs that can perfectly find the position of the component of the largest value.
In other words, while this is computationally feasible, it is far more computationally efficient to just a linked list of unique vectors instead! Which defeats the point using statistical methods to predict.
Yet another estimator under even more pessimistic assumptions
Let's go more extreme:
- The process that generates those vectors is random.
- Component values can take any value in $\mathbb{R}$!
Then if sampling is perfectly random, $n$ must be a number that is uncountable infinite in order to perfectly predict the function.
This is even worse than the previous case: it's computationally infeasible.