From e874eaa34fd9eb962aacd9c121dd8edeb03c7cb0 Mon Sep 17 00:00:00 2001 From: "Albert R. Gnadt" <20693045+gnadt@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:31:28 -0400 Subject: [PATCH 1/2] Added paragraph with duplicate info so package can be registered --- LICENSE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index a4058993..5f37de0e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,6 +2,8 @@ This work is created by the Department of the Air Force under 17 U.S.C. 105. Thi When reproducing, copying, modifying, or creating derivative works, the portion(s) of the work attributable under 17 U.S.C. 105 may be designated with the above notice where appropriate. Improperly claiming ownership of this work could be punishable by law under 17 U.S.C. 506(c). -The above copyright notice and this permission notice should be included in all copies or substantial portions of the work. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From ecf9eceff81577add6881e0746dabc151080ac26 Mon Sep 17 00:00:00 2001 From: "Albert R. Gnadt" <20693045+gnadt@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:45:07 -0400 Subject: [PATCH 2/2] Minor updates to compensation tests to reach higher code coverage --- test/test_compensation.jl | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/test/test_compensation.jl b/test/test_compensation.jl index 8ef3bfa0..04cc53d3 100644 --- a/test/test_compensation.jl +++ b/test/test_compensation.jl @@ -60,13 +60,13 @@ comp_params_2d = NNCompParams(model_type=:m2d ,terms=terms_p, terms_A=terms_pie,TL_coef=TL_coef_pie, batchsize=batchsize,epoch_adam=epoch_adam) comp_params_3tl = NNCompParams(model_type=:m3tl,terms=terms_pi, - terms_A=terms_pie,TL_coef=TL_coef_pie, + terms_A=terms_pieb,TL_coef=TL_coef_pie, batchsize=batchsize,epoch_adam=epoch_adam) comp_params_3s = NNCompParams(model_type=:m3s ,terms=terms_pi, - terms_A=terms_pie,TL_coef=TL_coef_pie, + terms_A=terms_pieb,TL_coef=TL_coef_pie, batchsize=batchsize,epoch_adam=epoch_adam) comp_params_3v = NNCompParams(model_type=:m3v ,terms=terms_pi, - terms_A=terms_pie,TL_coef=TL_coef_pie, + terms_A=terms_pieb,TL_coef=TL_coef_pie, batchsize=batchsize,epoch_adam=epoch_adam) comp_params_3sc = NNCompParams(model_type=:m3sc,terms=terms_pi, terms_A=terms_pie,TL_coef=TL_coef_pie, @@ -268,15 +268,11 @@ comp_params_3tl = NNCompParams(comp_params_3tl, frac_train = frac_train) comp_params_3s = NNCompParams(comp_params_3s, - terms_A = terms_pieb, - TL_coef = [comp_params_3s.TL_coef;0], epoch_lbfgs = epoch_lbfgs, k_pca = k_pca_big, frac_train = frac_train) comp_params_3v = NNCompParams(comp_params_3v, - terms_A = terms_pieb, - TL_coef = [comp_params_3v.TL_coef;0], epoch_lbfgs = epoch_lbfgs, k_pca = k_pca_big, frac_train = frac_train) @@ -301,6 +297,8 @@ x = [1:5;][:,:] y = [1:5;] @testset "comp_train tests" begin + @test std(MagNav.elasticnet_fit(x,y;λ=0.01,silent)[end]) < 1 + @test isone(MagNav.plsr_fit(x,y;return_set=true,silent)[:,:,1]) @test std(comp_train(xyz,ind;comp_params=comp_params_1, xyz_test=xyz,ind_test=ind,silent)[end-1]) < 1 @test std(comp_train([xyz,xyz],[ind,ind];comp_params=comp_params_1, @@ -334,13 +332,11 @@ y = [1:5;] @test std(comp_train([xyz,xyz],[ind,ind];comp_params=comp_params_plsr, xyz_test=xyz,ind_test=ind,silent)[end-1]) < 1 @test std(comp_train([xyz,xyz],[ind,ind];comp_params=comp_params_1_drop, - xyz_test=xyz,ind_test=ind,silent)[end-1]) < 1 + xyz_test=xyz,ind_test=ind,silent=false)[end-1]) < 1 @test std(comp_train([xyz,xyz],[ind,ind];comp_params=comp_params_2c_drop, - xyz_test=xyz,ind_test=ind,silent)[end-1]) < 1 + xyz_test=xyz,ind_test=ind,silent=false)[end-1]) < 1 @test std(comp_train([xyz,xyz],[ind,ind];comp_params=comp_params_3s_drop, - xyz_test=xyz,ind_test=ind,silent)[end-1]) < 1 - @test isone(MagNav.plsr_fit(x,y;return_set=true,silent)[:,:,1]) - @test std(MagNav.elasticnet_fit(x,y;λ=0.01,silent)[end]) < 1 + xyz_test=xyz,ind_test=ind,silent=false)[end-1]) < 1 @test_throws ErrorException comp_train([xyz,xyz],[ind,ind]; comp_params=comp_params_nn_bad,silent) @test_throws AssertionError comp_train([xyz,xyz],[ind,ind]; @@ -368,6 +364,8 @@ y = [1:5;] end @testset "comp_test tests" begin + @test std(comp_test(xyz,ind;comp_params=comp_params_3sc, silent)[end-1]) < 50 + @test std(comp_test(line,df_line,df_flight,df,comp_params_3vc;silent)[end-1]) < 50 @test_throws ErrorException comp_test(xyz,ind; comp_params=comp_params_nn_bad,silent) @test_throws ErrorException comp_test(xyz,ind;