Exemple #1
0
     'oracle_param': [],
     'oracle_loss': [],
     'loss': [],
     'solution': [],
     'oracle_solution': []
 }
 for _ in range(replications):
     try:
         spectrum = LordWillisSpektor(transformed_measure=True)
         obs = generator.generate()
         landweber = Tikhonov(
             kernel=kernel_transformed,
             singular_values=spectrum.singular_values,
             left_singular_functions=spectrum.left_functions,
             right_singular_functions=spectrum.right_functions,
             observations=obs,
             sample_size=s,
             max_size=max_size,
             tau=tau,
             order=order,
             transformed_measure=True,
             njobs=-1)
         landweber.estimate()
         landweber.oracle(fun)
         solution = list(
             landweber.solution(np.linspace(0, 1, 10000)))
         results['selected_param'].append(
             landweber.regularization_param)
         results['oracle_param'].append(landweber.oracle_param)
         results['oracle_loss'].append(landweber.oracle_loss)
         results['loss'].append(landweber.residual)
         results['solution'].append(solution)
     'loss': [],
     'solution': [],
     'oracle_solution': []
 }
 for _ in range(replications):
     try:
         spectrum = LordWillisSpektor(
             transformed_measure=True)
         obs = generator.generate()
         tikhonov = Tikhonov(
             kernel=kernel,
             singular_values=spectrum.singular_values,
             left_singular_functions=spectrum.
             left_functions,
             right_singular_functions=spectrum.
             right_functions,
             observations=obs,
             sample_size=s,
             transformed_measure=True,
             max_size=max_size,
             order=order,
             njobs=-1)
         tikhonov.estimate()
         tikhonov.oracle(fun, patience=50)
         solution = list(
             tikhonov.solution(np.linspace(0, 1, 10000)))
         results['selected_param'].append(
             tikhonov.regularization_param)
         results['oracle_param'].append(
             tikhonov.oracle_param)
         results['oracle_loss'].append(tikhonov.oracle_loss)