kristian-georgiev/867-Project

Applying cumsum correctly to follow the visualization paper exactly

rdangovs opened this issue · 0 comments

def cumsum(ordered_dict_list):
cumsum_list = [ordered_dict_list[0]]
for elt in ordered_dict_list[1: ]:
sum_so_far = cumsum_list[-1]
new_elt = {state_name:sum_so_far[state_name] + elt[state_name]\
for state_name in elt}
cumsum_list.append(new_elt)
return cumsum_list
-- this cumsum function takes [theta_0, theta_1 - theta_0, ..., theta_n - theta_{n-1}] and returns [theta_0, theta_1, theta_2, ..., theta_{n-1}, theta_n]. We should subtract theta_n, no? I did that and this is the result I got. Also, the latest version of master doesn't apply cumsum before computing the PCA directions.