idmtools_calibra.algorithms.generic_iterative_next_point module#

class idmtools_calibra.algorithms.generic_iterative_next_point.GenericIterativeNextPoint(initial_state)[source]#

Bases: NextPointAlgorithm

Represents a Generic Next Point allowing thew Calibtool to function as a more generic iterative process. Here a dictionary needs to be passed as the state. For example:

initial_state = [{
 'Run_Number': rn
 } for rn in range(2)]

Then the results of the analyzers are stored in the self.data associating iteration with results. Both the initial state and the results are stored there allowing to easily refer to it:

self.data = [
                {
                'Run_Number': 1
                'results':{
                    'what_comes_from_analyzers':{}
                },
                ...
            ]

Note that the results needs to be contained in a Dictionary. If you want to leverage pandas.DataFrame instead, you should use OptimTool.

set_state(state, iteration)[source]#
cleanup()[source]#
update_iteration(iteration)[source]#

Update the current iteration state of the algorithm.

get_param_names()[source]#
get_samples_for_iteration(iteration)[source]#
get_state()[source]#
prep_for_dict(df)[source]#

Utility function allowing to transform a DataFrame into a dict removing null values

set_results_for_iteration(iteration, results)[source]#
end_condition()[source]#
get_final_samples()[source]#
update_summary_table(iteration_state, previous_results)[source]#
Returns a summary table of the form:

[result1 result2 results_total param1 param2 iteration simIds] index = sample Used by OptimTool and IMIS algorithm

get_results_to_cache(results)[source]#