Skip to content

Test the algorithm with examples with non constant frequencies. #6

Open
@panchoop

Description

@panchoop

It is unclear if the algorithm works in the cases in which the dimensions of the H_t change at each time sample.
The dot product was suboptimally* implemented as one that loops in a list of elements of H_t.

This happens in lines

def H_t_product(t, f_t, g_t):
assert checker.is_in_H_t(t, f_t) and checker.is_in_H_t(t, g_t)
# Computes the H_t product at between two elements in H_t
# Input: t ∈ {0,1,...,T-1}
# f_t, g_t ∈ H_t = 1d numpy array with size K[t]
# Output: real value <f_t,g_t>_{H_t}.
return np.real(np.dot(f_t, np.conj(g_t)))/K[t]

def int_time_H_t_product(f, g):
assert checker.is_in_H(f) and checker.is_in_H(g)
# Computes ∫<f_t, g_t>_{H_t} dt
# Input : f,g ∈ H.
# Output: real number.
output = 0
time_weights = config.time_weights
for t in range(config.T):
output += time_weights[t]*H_t_product(t, f[t], g[t])
return output

As such, it requires to build an example and then test it.

This was implemented at the beginning with the purpose of it being able to tolerate this extension, but it has not been tested
so far.


[*]: The sub-optimality happens because we have a list and we are looping on each element of it, whereas it could be faster
to take advantage of numpy inbuilt matrix multiplication and instead recast this elements as numpy arrays and respective
multiplication.

Activity

changed the title [-]Test the algorithm to examples with non constant frequencies.[/-] [+]Test the algorithm with examples with non constant frequencies.[/+] on Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Test the algorithm with examples with non constant frequencies. · Issue #6 · panchoop/DGCG_algorithm