{"action":"created","issue":{"url":"https://api.github.com/repos/CMA-ES/c-cmaes/issues/16","labels_url":"https://api.github.com/repos/CMA-ES/c-cmaes/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/CMA-ES/c-cmaes/issues/16/comments","events_url":"https://api.github.com/repos/CMA-ES/c-cmaes/issues/16/events","html_url":"https://github.com/CMA-ES/c-cmaes/issues/16","id":109819937,"number":16,"title":"Switching between related functions","user":{"login":"cgd8d","id":1078973,"avatar_url":"https://avatars.githubusercontent.com/u/1078973?v=3","gravatar_id":"","url":"https://api.github.com/users/cgd8d","html_url":"https://github.com/cgd8d","followers_url":"https://api.github.com/users/cgd8d/followers","following_url":"https://api.github.com/users/cgd8d/following{/other_user}","gists_url":"https://api.github.com/users/cgd8d/gists{/gist_id}","starred_url":"https://api.github.com/users/cgd8d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgd8d/subscriptions","organizations_url":"https://api.github.com/users/cgd8d/orgs","repos_url":"https://api.github.com/users/cgd8d/repos","events_url":"https://api.github.com/users/cgd8d/events{/privacy}","received_events_url":"https://api.github.com/users/cgd8d/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-05T15:16:54Z","updated_at":"2015-10-13T22:48:35Z","closed_at":"2015-10-13T17:41:48Z","body":"In my application, I first optimize a function f(x1, ..., xn) which is relatively cheap; then I add a perturbation to that function which is very expensive to compute, so I would like to retain as much information from the first optimization as possible.  It is clear how to use the optimum (x1, ..., xn) from the first optimization as a starting point for the second, but I am unsure how best to retain covariance matrix and step size information.  There are two related scenarios:\r\n\r\n1) The perturbation takes the form g(x1, ..., xn), so the dimension is the same.  In this case, is this the right approach?\r\n\r\n    /* Evaluations use f(x1, ..., xn) up to here. */\r\n    cmaes_WriteToFile(evo_ptr, \"resume\", filename);\r\n    cmaes_exit(evo_ptr);\r\n    cmaes_init(evo_ptr, dimension, initialX, initialStdDev, seed, lambda, input_parameter_filename);\r\n    cmaes_resume_distribution(evo_ptr, filename);\r\n    /* Evaluations continue with f(x1, ..., xn) + g(x1, ..., xn). */\r\n\r\n2) The dimension of the problem also increases, so the function becomes f(x1, ..., xn) + g(x1, ..., xn, ..., xm).  Is there a recommended way to retain information about the n dimensions which have already been studied, while feeding in default values for new dimensions?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/CMA-ES/c-cmaes/issues/comments/147875588","html_url":"https://github.com/CMA-ES/c-cmaes/issues/16#issuecomment-147875588","issue_url":"https://api.github.com/repos/CMA-ES/c-cmaes/issues/16","id":147875588,"user":{"login":"nikohansen","id":7316439,"avatar_url":"https://avatars.githubusercontent.com/u/7316439?v=3","gravatar_id":"","url":"https://api.github.com/users/nikohansen","html_url":"https://github.com/nikohansen","followers_url":"https://api.github.com/users/nikohansen/followers","following_url":"https://api.github.com/users/nikohansen/following{/other_user}","gists_url":"https://api.github.com/users/nikohansen/gists{/gist_id}","starred_url":"https://api.github.com/users/nikohansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikohansen/subscriptions","organizations_url":"https://api.github.com/users/nikohansen/orgs","repos_url":"https://api.github.com/users/nikohansen/repos","events_url":"https://api.github.com/users/nikohansen/events{/privacy}","received_events_url":"https://api.github.com/users/nikohansen/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T22:48:35Z","updated_at":"2015-10-13T22:48:35Z","body":"excellent, I am curious, as using covariance information from previous runs successfully is in my experience more difficult than one would expect. Let me add that careful (re-)consideration of the new initial `sigma` is in order, as it might strongly depend on the termination condition of the previous run."}}