I am new to the community. I am a financial hobbyist(used to be professional) that likes to get into creating models and testing ideas.
I have been working hard on learning Mathematica.
I am trying to see if I can accomplish the following:
I have a list of rankings a={3,2,1,4}
I want to map the rankings to particular values for example, 1-> .05, 2-> .1 etc.
I spent a bunch of time learning about Association and Keys only to find out that they are in the new upcoming version. So while promising, they are of no use to me now.
Is there a way in the current version to get this remapping done?
You have one input called rankings which is a list of integers, that is clear. It isn’t clear what form your second input is in, it isn’t clear how this form relates to ranking, it isn’t clear what form you want to put this into and it isn’t clear what you want to do with the result. If you could provide a blindingly clear complete example with just enough supporting explanation that someone who doesn’t know anything about what you know would be able to produce exactly what you are looking for on the first try then that would be really helpful.
*so now my “weights” have transformed from integers “x” (the input to the function r) into a list with numbers corresponding to values of x. So when x is 2, my function returns 0.03
Ugh, the formatting is terrible. I don’t know how to copy the way it looks in notebook (as I have seen others). Sorry.*