# Preparing data, choosing algorithm

First off, I am new to machine learning, so these questions may be trivial.

Basically I am trying to tune an object with numeric knobs and numeric outputs. By doing a brute force tuning (permutations), there is a solution to find ideal values of the outputs, but it takes time. I'm trying to take a stab at using ML to at least shorten the process of tuning.

I have a dataset for a large number of good units that were tuned successfully, at the various number of attempts though.

For example: passing requirement: X = near 10, Y = near 5, Z = near 4

Object 1:

Try 1 => A = 1, B = 2, C = 3 ; X = 1, Y = 0, Z = 1  => not good
Try 2 => A = 1, B = 1, C = 1 ; X = 10, Y = 5, Z = 4 => good enough


Object 2:

Try 1 => A = 1.4, B = 2.6, C = 3.8 ; X = 10, Y = 5, Z = 3.9 => lucky!!!


Object 3:

...
Try 10 => A = 1.4, B = 2.6, C = 3.8 ; X = 10, Y = 5, Z = 3.9 => took a while!!!


I'm wondering how do I prepare the data for training and testing with this type of problem, as each object had a variable number of tries before it got successfully tuned. Should I just take the last successful combination for each object, and maintain the same columns (A, B, C, X, Y, Z). Or take them all (multiple rows per object)?

Or, for each object record, append another set of columns, such that per object, I have only one row. For example (A1,B1,C1,X1,Y1,Z1, A2,B2,C2,X2,Y2,Z2,... An,Bn,Cn,Xn,Yn,Zn)

As for the algorithm choice, I can only articulate that this isn't a classification problem (or a binary outcome). Something like regression, or decision tree, or hill climbing if there's such a thing?

• There are lots of possibilities depending on expected shape of function. If it varies smoothly enough then some form of hill climbing would be most efficient. But if the function shape is highly complex, then there might be no better solution than fine-grained brute-force search, or even just random guesses. I think there is a duplicate question for complete "black box" tuning. Mar 30, 2017 at 16:40
• However, before marking as duplicate (which might answer your question), I'd like to know more context. Is this part of a course assignment? If so, what are the topics - because you'd usually be expected to use techniques that you had studied? If not, please explain what else, if anything, you have been told about this box or the function inside - is it a real physical box, or some kind of simulation? Have you been told any characteristics of the function at all, such as smoothness? Mar 30, 2017 at 16:44
• Not a part of a course assignment. Looking at my data, there is somewhat a one-to-one correlation in terms of one particular input to an output. For example, decreasing A, would directly increase X, but it also "changes" Y, & Z. This is a real physical box. Mar 30, 2017 at 16:50
• What is the goal of learning? It is not clear. E.g. is it to minimise number of measurements taken on new boxes to tune them? Is it to find a tuning setting that should work on any box? Box 1 seems different to boxes 2 and 3, but boxes 2 and 3 give identical results on the tuned position - is that correct (or you just using made-up examples)? Mar 30, 2017 at 19:22
• I have 2 problems. 1.) How to clean the data in order for the training process to consume. 2.) What algorithm . These are just made up examples. Mar 30, 2017 at 23:39