POTE tuning: Difference between revisions

Expansion (aka KE tuning, mention Kees optimality)
Line 35: Line 35:


def find_te (map, subgroup):
def find_te (map, subgroup):
     dimension = len (subgroup)
     jip = np.log2 (subgroup)
     subgroup_octaves = np.log2 (subgroup)
     weighter = np.diag (1/np.log2 (subgroup))
    map = map @ weighter
    jip = jip @ weighter


    weight = np.eye (dimension)
     te_gen = linalg.lstsq (np.transpose (map), jip)[0]
    for i in range (0, dimension):
        weight[i][i] = 1/np.log2 (subgroup[i])
    map = map @ weight
    subgroup_octaves = subgroup_octaves @ weight
 
     te_gen = linalg.lstsq (np.transpose (map), subgroup_octaves)[0]
     te_map = te_gen @ map
     te_map = te_gen @ map
     print (1200*te_gen)
     print (1200*te_gen)