skip to Main Content

Here might not be the proper place to ask this question but I didn’t find any better place to ask it. I have a program that have for example 10 parameters. Every time I ran it, it could lead to 3 results. 0, 0.5 or 1. I don’t know how the parameters would influence the last result. I need something to little by little improve my program so it gets more 1s and less 0s.

3

Answers


  1. Are you just trying to modify the parameters so the results come out to 1? It sounds like the program is a black box where you can pick the input parameters and then see the results. Since that is the case I think it would be best to choose a range of input parameters, cycle through those inputs, and view the outputs to try to discern a pattern. If you could automate it it’ll help out a lot. After you run through the data you may be able to spot check to see which parameter give you which results, or you could apply some machine learning techniques to determine which parameters lead to which outputs.

    Login or Signup to reply.
  2. First, just to get the terminology right, this is really a “search” problem, not a “machine learning” problem (you’re trying to find a very good solution, not trying to recognize how inputs relate to outputs). Your problem sounds like a classic “function optimization” search problem.

    There are many techniques that can be used. The right one depends on a few different factors, but the biggest question is the size and shape of the solution space. The biggest question there is “how sensitive is the output to small changes in the inputs?” If you hold all the inputs except one the same and make a tiny change, are you going to get a huge change in the output or just a small change? Do the inputs interact with each other, especially in complex ways?

    The smaller and “smoother” the solution space (that is, the less sensitive it is to tiny changes in inputs), the more you would want to pursue straightforward statistical techniques , guided search, or perhaps, if you wanted something a little more interesting, simulated annealing.

    The larger and more complex the solution space, the more that would guide you towards either more sophisticated statistical techniques or my favorite class of algorithms, which are genetic algorithms, which can very rapidly search a large solution space.

    Just to sketch out how you might apply genetic algorithms to your problem, let’s assume that the inputs are independent from each other (a rare case, I know):

    • Create a mapping to your inputs from a series of binary digits 0011 1100 0100 ...etc...
    • Generate a random population of some significant size using this mapping
    • Determine the fitness of each individual in the population (in your case, “count the 1s” in the output)
    • Choose two “parents” by lottery:
      • For each half-point in the output, an individual gets a “lottery ticket” (in other words, an output that has 2 “1”s and 3 “0.5”s will get 7 “tickets” while one with 1 “1” and 2 “0.5”s will get 4 “tickets”)
      • Choose a lottery ticket randomly. Since “more fit” individuals will have more “tickets” this means that “more fit” individuals will be more likely to be “parents”
    • Create a child from the parents’ genomes:
      • Start copying one parents genome from left to right 0011 11...
      • At every step, switch to the other parent with some fixed probability (say, 20% of the time)
      • The resulting child will have some amount of one parents genome and some amount of the other’s. Because the child was created from “high fitness” individuals, it is likely that the child will have a fitness higher than the average of the current generation (although it is certainly possible that it might have lower fitness)
    • Replace some percentage of the population with children generated in this manner
    • Repeat from the “Determine fitness” step… In the ideal case, every generation will have an average fitness that is higher than the previous generation and you will find a very good (or maybe even ideal) solution.
    Login or Signup to reply.
  3. As Larry said, looks like a combinatorial search and the solution will depends on the “topology” of the problem.
    If you can, try to get the Algorithm Design Manuel book (S. Skiena), it has a chapter on this that can help determine the good method for this problem…

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search