From 0accf3621ccdd0fb6910222dd4e0cb14dea10403 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 9 Jul 2020 15:56:53 +0200 Subject: recursive descent with... interesting results --- lib/model.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/model.py b/lib/model.py index 68286c9..0550575 100644 --- a/lib/model.py +++ b/lib/model.py @@ -665,6 +665,7 @@ class AnalyticModel: def grep_aggregate_by_state_and_param(aggregate, name, param_index, param_value): new_aggregate = dict() new_aggregate[name] = { + "isa": aggregate[name]["isa"], "attributes": aggregate[name]["attributes"], } @@ -749,6 +750,12 @@ class DecisionTreeModel: candidates.append( (state, attribute, param_index, param_name, param_values) ) + # logger.debug('>>> recursive descent for {}/{} with {} = {}'.format(state, attribute, param_name, param_values[0])) + # __class__(by_name_sub1, self.parameters) + # logger.debug('<<< recursive descent for {}/{} with {} = {}'.format(state, attribute, param_name, param_values[0])) + # logger.debug('>>> recursive descent for {}/{} with {} = {}'.format(state, attribute, param_name, param_values[1])) + # __class__(by_name_sub2, self.parameters) + # logger.debug('<<< recursive descent for {}/{} with {} = {}'.format(state, attribute, param_name, param_values[1])) candidates_by_state_attribute = dict() for state, attribute, param_index, param_name, param_values in candidates: @@ -758,8 +765,6 @@ class DecisionTreeModel: (param_index, param_name, param_values) ) - print(candidates_by_state_attribute) - def states(self): """Return sorted list of state names.""" return sorted( -- cgit v1.2.3