Timeline for Class Hierarchy for Generic Parameter Optimization Problems
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 15, 2023 at 14:23 | vote | accept | Treker | ||
Oct 14, 2023 at 3:47 | answer | added | Treker | timeline score: 2 | |
Oct 13, 2023 at 14:53 | comment | added | Treker | Agreed and agreed. I have actually had those same exact thoughts since posting my question. I think I am going to remove the requirement for the user of my package to need to subclass the abstract Parameters class. Instead, I will just have a concrete class called Parameters which just contains an IImmutableList<double>. It will be the users responsibility to convert their problem specific parameters class for the sake of interacting with my package. The user will also need to select a specific IParameterMutator imlementation to pass to an IParameterOptimizer. | |
Oct 13, 2023 at 14:48 | comment | added | Doc Brown |
... Another thing which isn't clear to me is why you need this IImmutableDictionary . For the current case, it looks overcomplicated - a simple, specific ToString() implementation in each derivation of Parameters would IMHO be simpler and sufficient. But maybe you left something out where the IImmutableDictionary becomes more useful?
|
|
Oct 13, 2023 at 14:44 | comment | added | Doc Brown |
@Treker: so the abstract class Parameters contains a pure virtual function Mutate , I guess?
|
|
Oct 13, 2023 at 14:38 | comment | added | Treker | @DocBrown Agreed with your assessment of an important question. I have chosen to make the mutation specific to the exact Parameter object (SalesParamters in my example). This is because good mutations depend heavily on the specifics of the data. So the consumer of my package needs to select a specific parameter mutation algorithm and good parameters for the mutator. This mutator then gets paired with a parameter optimizer to run the optimization. Hope this makes sense. | |
Oct 13, 2023 at 14:21 | comment | added | Doc Brown | @Treker: the interesting question is here, if the mutation shall be part of the generic optimizer, or if it is part of the specific Parameter object (so a SalesParameters object might create a new, mutated SalesParameters object). Will the mutated object share the same IImmutableDictionary with the original object? I think this would make sense, so the description will only exist once in mem, which was a point of the design I would otherwise have questioned. | |
Oct 13, 2023 at 14:18 | comment | added | Treker | I have omitted some details, such as parameter mutation, from this question. Parameter mutation is used by the optimizer to generate new parameter vectors. I have aimed at striking a balance between providing enough detail and focusing on the exact area of the system I'm having trouble with. | |
Oct 13, 2023 at 13:58 | comment | added | JonasH | How is the optimizer supposed to generate new parameter objects? The posted example looks a bit half baked, I don't really see how it could be used in practice. I would take a look at how existing math libraries handle optimization. I would also consider things like parameter constraints and/or starting position. | |
Oct 13, 2023 at 13:40 | history | edited | Treker | CC BY-SA 4.0 |
added 433 characters in body
|
Oct 13, 2023 at 13:36 | comment | added | Treker | I left it out because it's just boilerplate code. I can add it in if that makes things easier... | |
Oct 13, 2023 at 13:25 | comment | added | Doc Brown |
... 3) How does the constructor call to Parameters(IImmutableDictionary<string, double> parameters) inside SalesParameters look like? It seems you left that out intentionally - or is there some new C# feature which I don't know which makes gives some default implementation here?
|
|
Oct 13, 2023 at 12:55 | comment | added | Treker | You are correct in saying that the goal of optimization is to find one set of Parameters. However, I made the decision to have the caller return a list of Parameters attempted by the optimizer. This was done because the parameters considered optimal depend heavily on the fitness function, and choosing a good fitness function that considers all aspects is difficult. So the end users may want to consider multiple sets of Parameters, or the overall trend direction of the parameters. | |
Oct 13, 2023 at 12:30 | comment | added | Doc Brown |
... 2) Does your optimizer really generate an IList<(Parameters, double) ? In optimization, the goal is usually to find one (optimal or suboptimal) Parameters instance - what is your idea of generating many? Different local optima? A sequence of intermediate optima? Please clarify.
|
|
Oct 13, 2023 at 12:11 | comment | added | Doc Brown | "I find the Parameters dictionary mapping parameter names to values to be necessary to allow the optimization algorithms to know the type of operations that can be performed on the parameters" - how exactly? By their name? Honestly, it looks like you did not tell us the full story. | |
Oct 13, 2023 at 2:45 | history | edited | Treker | CC BY-SA 4.0 |
deleted 24 characters in body
|
Oct 13, 2023 at 2:39 | history | asked | Treker | CC BY-SA 4.0 |