6
$\begingroup$

Is there any research on learning a bijective function from data?

For example, let's imagine that we're trying to learn to assign four random musicians to instruments in a band. We have:

  • lead guitar
  • rhythm guitar
  • drums
  • bass

We can rate any musician on say 5 quantifiable skills (timing, creativity, guitar, drums, bass).

For training, we have a corpus of previous bands, each one mapping four musicians to the four instruments. How do we learn a function to map a new band to the four instruments?

$\endgroup$
6
  • 2
    $\begingroup$ What is "bijective" intended to mean here? $\endgroup$
    – GeoMatt22
    Commented Apr 24, 2017 at 17:39
  • 1
    $\begingroup$ I guess that what he means with bijective here is a 1 to 1 correspondence so that every band has 4 musicians and each musician gets one and only one instrument while every instrument gets associated to one and only one musician $\endgroup$ Commented Apr 24, 2017 at 19:24
  • $\begingroup$ @IcannotFixThis Exactly. $\endgroup$
    – John Sears
    Commented Apr 24, 2017 at 20:15
  • $\begingroup$ This can be solved with a regular classification, isn't it? $\endgroup$
    – Tim
    Commented Nov 24, 2022 at 7:50
  • $\begingroup$ Would it be something like “Here are John, Paul, George, and Ringo…assign them to instruments,” or would it be like “Here are John, Paul, George, Ringo, Jimi, and Janis…figure out the best band”? $\endgroup$
    – Dave
    Commented Nov 24, 2022 at 7:55

3 Answers 3

2
$\begingroup$

Your problem here is made substantially easier by the fact that you are dealing with a finite sets of musicians and instruments. With ordered sets of $n$ musicians and $n$ instruments, there are $n!$ bijections mapping the musicians to the instruments. Thus, your statistical problem is to predict a finite categorical outcome variable (with $n!$ possible values) using your quantitative skills as explanatory variables.

A standard model for this type of analysis is multinomial logistic regression. Since the musicians come in an arbitrary order, you would need to impose an ordering rule on them based on the skill measurements, to have a well-defined bijection from an ordered domain (e.g., you might order the musicians using a lexicographic order on their skills in guitar, drums, bass, timing and creativity respectively). You could also constrain your regression function so that it is "symmetric" with respect to reordering of the musicians and bijection (i.e., if you swap the skills of any two band members then the resulting bijection should be the same, except with the mapping swapped for those two musicians. This would require some care in your coding of the model, but it ought to be possible to do.

In your particular case you have $n=4$ so there are $n! = 24$ possible bijections forming possible outputs in the model. It should be feasible to build a multinomial logistic regression for this problem with a reasonable sized corpus of bands for your training data. You would need to code the 24-types of bands as a categorical output variable and specify an appropriate regression function with your skill variables to predict this categorical output variable.

$\endgroup$
1
  • $\begingroup$ This is the most satisfying answer I've seen, thanks Ben. $\endgroup$
    – John Sears
    Commented Mar 27, 2023 at 17:21
1
$\begingroup$

Autoencoders allow us to attempt an approximation. For encoder $f: \mathbb{R}^n \mapsto \mathbb{R}^m$ and decoder $g: \mathbb{R}^m \mapsto \mathbb{R}^n$ we can train to have $(g \circ f) (\vec x) \approx \vec x$. So $f$ is approximately invertible and in that sense is approximately a bijection.

For your application you will want to ensure that for your skills data $\vec x$ and band data $\vec y$ that $f(\vec x) \approx \vec y$, which can be done by adding an additional loss term to your loss function.

$\endgroup$
0
$\begingroup$

The simplest approach would be the k-nearest neighbors classifier. Here we would take the euclidean distances of of the 5 variables or quantifiable skills that we have data on compared to our new test point (member of new band). The issue is if you have 4 members in the band what this algorithm will do is tell you the best spot for each individual player but not them as a band. So to determine the best as a band you would check every possible combination of that the members could make by choosing different instruments adding up the average euclidean distance of that band layout from the original data and go with the version of the band with the smallest distance.

The euclidean distance is the magnitude of the difference of the components between the two points. So for a 2D example for points (2,5) and (1,9) the distance between the x components is 1 and the distance between the y components is 4. So the magnitude of the total distance is sqrt(1^2+4^2) or sqrt(17).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.