JuliaRobotics / IncrementalInference.jl
Showing 1 of 4 files from the diff.

@@ -15,6 +15,8 @@
Loading
15 15
getManifold(hgd::HeatmapGridDensity) = getManifold(hgd.densityFnc)
16 16
getManifold(lsg::LevelSetGridNormal) = getManifold(lsg.heatmap)
17 17
18 +
AMP.sample(hgd::HeatmapGridDensity,w...;kw...) = sample(hgd.densityFnc, w...;kw...)
19 +
18 20
"""
19 21
    $SIGNATURES
20 22
@@ -104,6 +106,19 @@
Loading
104 106
  HeatmapGridDensity(data, domain, hint_callback, bw_factor, density)
105 107
end
106 108
109 +
function Base.isapprox( a::HeatmapGridDensity, b::HeatmapGridDensity; 
110 +
                        atol::Real=1e-10, mmd_tol::Real=1e-2)
111 +
  #
112 +
  isapprox( Npts(a.densityFnc), Npts(b.densityFnc) ; atol) ? nothing : (return false)
113 +
  isapprox( a.densityFnc, b.densityFnc; atol=mmd_tol) ?      nothing : (return false)
114 +
  isapprox( a.data, b.data ; atol) ?                         nothing : (return false)
115 +
  isapprox( a.domain[1], b.domain[1] ; atol) ?               nothing : (return false)
116 +
  isapprox( a.domain[2], b.domain[2] ; atol) ?               nothing : (return false)
117 +
  
118 +
  return true
119 +
end
120 +
121 +
107 122
108 123
# legacy construct helper
109 124
function LevelSetGridNormal(data::AbstractMatrix{<:Real}, 
@@ -115,7 +130,7 @@
Loading
115 130
                            bw_factor::Real=0.7,  # kde spread between domain points 
116 131
                            N::Int=10000  )
117 132
  #
118 -
133 +
  
119 134
  # select the support from raw data
120 135
  roi = data.-level
121 136
  # make Gaussian
@@ -129,7 +144,7 @@
Loading
129 144
  #   masked_roi = 0 .< κ^2 - l
130 145
  
131 146
  hgd = HeatmapGridDensity(data, domain, hint_callback, bw_factor; N=N)
132 -
147 +
  
133 148
  LevelSetGridNormal(level, sigma, float(sigma_scale), hgd)
134 149
end
135 150
Files Coverage
src 77.20%
Project Totals (67 files) 77.20%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading