Is there a machine learning algorithm that maps a single input to an output list of variable length? If so, are there any implementations of the algorithm for public use? If not, what do you recommend as a workaround?
In my case, the input is a single scalar and the output is a list of scalars with variable length. For example, suppose I wanted to output a list of ones given the length of the list as input. Then <input, output> could be <1, [1]>, <2, [1, 1]>, etc. A small tweak would be providing the square root of the length in which case <2, [1, 1, 1, 1]> would be an answer. Note: the input need not be tied directly to the output.
For a more complex example, suppose I want to learn the look-and-say sequence. Valid <input, output> pairs would be: <1, [1]>, <2, [1, 1]>, <3, [2, 1]>, <4, [1, 2, 1, 1]>, <5, [1, 1, 1, 2, 2, 1]>, etc. My problem is also similar in that I can generate more examples; I am not restricted to a finite set of examples.