From 017e2ef4c62cc96dd8329fe814771eff7bc1414f Mon Sep 17 00:00:00 2001 From: mischmi96 Date: Wed, 3 Mar 2021 09:42:28 +0100 Subject: [PATCH] update --- Project.toml | 2 +- src/ANOVAapprox.jl | 2 +- src/nperiodic_approx.jl | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index b62be3a..f2fa35c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ANOVAapprox" uuid = "5e027bd6-ab01-4733-8320-e0223e929ebb" authors = ["Michael Schmischke and Felix Bartel "] -version = "1.0.12" +version = "1.0.13" [deps] Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" diff --git a/src/ANOVAapprox.jl b/src/ANOVAapprox.jl index 80d04c7..ef59ef0 100644 --- a/src/ANOVAapprox.jl +++ b/src/ANOVAapprox.jl @@ -32,7 +32,7 @@ function get_GSI( approx::fun_approx, lambda::Float64; dict=false ) end end - return ( (dict == false) ? gsi : gsi_d ) + return ( (dict == false) ? gsi : gsis_d ) end function get_GSI( approx::fun_approx; dict=false ) diff --git a/src/nperiodic_approx.jl b/src/nperiodic_approx.jl index d5ba667..6f8afdd 100644 --- a/src/nperiodic_approx.jl +++ b/src/nperiodic_approx.jl @@ -129,14 +129,17 @@ function testBandwidths( X_train::Matrix{Float64}, y_train::Vector{ComplexF64}, mses_bw = Dict() for i in collect(keys(N)) + if !isa(N[i], bw_vec) error( "type mismatch" ) end + f = nperiodic_approx( X_train, y_train, ds, N[i]; method=method, basis=basis, active_set=active_set ) approximate(f, smoothness=smoothness, max_iter=max_iter, lambda=lambda, verbose=verbose) mse = get_MSE( f, X_test, y_test, data_trafo=data_trafo ) min_mse = findmin(mse) mses_bw[ (N[i], min_mse[2]) ] = min_mse[1] + end return mses_bw