diff --git a/Project.toml b/Project.toml index 66f73f4..1ff2946 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,6 @@ authors = ["Logan-Mondal-Bhamidipaty"] version = "2.0.0" [deps] -CompressedBeliefMDPs = "0a809e47-b8eb-4578-b4e8-4c2c5f9f833c" Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" @@ -15,7 +14,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" [compat] -CompressedBeliefMDPs = "1" Distances = "0.10" FunctionWrappers = "1" LogExpFunctions = "0.3" diff --git a/docs/src/api.md b/docs/src/api.md index f421a74..dc46e0b 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -33,10 +33,4 @@ decompress Options NegativeDomain PositiveDomain -``` - -# Miscellaneous - -```@docs -EPCACompressor -``` +``` \ No newline at end of file diff --git a/src/ExpFamilyPCA.jl b/src/ExpFamilyPCA.jl index 4d107bb..a57fc8e 100644 --- a/src/ExpFamilyPCA.jl +++ b/src/ExpFamilyPCA.jl @@ -67,8 +67,9 @@ export WeibullEPCA include("family/weibull.jl") -export - EPCACompressor -include("compressor.jl") +# DEPRECATED +# export +# EPCACompressor +# include("compressor.jl") end # module ExpFamilyPCA diff --git a/src/compressor.jl b/src/compressor.jl deleted file mode 100644 index b5f15de..0000000 --- a/src/compressor.jl +++ /dev/null @@ -1,23 +0,0 @@ -import CompressedBeliefMDPs # `import` rather than `using` to keep tidey namespace and avoid collisions - -""" - EPCACompressor(epca::EPCA) - -Compressor for `CompressedBeliefMDPs.jl`. -""" -struct EPCACompressor{E<:EPCA} <: CompressedBeliefMDPs.Compressor - epca::E -end - -function (c::EPCACompressor)(beliefs) - if ndims(beliefs) == 2 - result = compress(c.epca, beliefs; maxiter=10) - else - result = vec(compress(c.epca, beliefs'; maxiter=10)) - end - return result -end - -function CompressedBeliefMDPs.fit!(c::EPCACompressor, beliefs) - ExpFamilyPCA.fit!(c.epca, beliefs) -end diff --git a/src/utils.jl b/src/utils.jl index 801fc84..2743900 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,11 +1,11 @@ -function _check_dimensions( - indim::Integer, - outdim::Integer -) - @assert indim > 0 "Input dimension (indim) must be a positive integer." - @assert outdim > 0 "Output dimension (outdim) must be a positive integer." - @assert indim >= outdim "Input dimension (indim) must be greater than or equal to output dimension (outdim)." -end +# function _check_dimensions( +# indim::Integer, +# outdim::Integer +# ) +# @assert indim > 0 "Input dimension (indim) must be a positive integer." +# @assert outdim > 0 "Output dimension (outdim) must be a positive integer." +# @assert indim >= outdim "Input dimension (indim) must be greater than or equal to output dimension (outdim)." +# end function _check_binary_search_arguments( low::Real, diff --git a/test/family/test_gamma.jl b/test/family/test_gamma.jl index b36020a..54abc98 100644 --- a/test/family/test_gamma.jl +++ b/test/family/test_gamma.jl @@ -14,3 +14,21 @@ atol=1.5 ) end + +@testset "ItakuraSaito" begin + n = 2 + indim = 3 + outdim = 3 + X = rand(n, indim) * 100 + + M1 = ItakuraSaitoEPCA(indim, outdim) + A1 = fit!(M1, X) + + smoke_test( + M1, + A1, + X, + atol=1.5 + ) +end +