Top Description Fields Constructors Methods
org.apache.commons.math3.ml.neuralnet.twod.util

public Class HitHistogram

extends Object
implements MapDataVisualization
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.ml.neuralnet.twod.util.MapDataVisualization
Imports
org.apache.commons.math3.ml.neuralnet.MapUtils, .Neuron, org.apache.commons.math3.ml.neuralnet.twod.NeuronSquareMesh2D, org.apache.commons.math3.ml.distance.DistanceMeasure

Computes the hit histogram. Each bin will contain the number of data for which the corresponding neuron is the best matching unit.
Since
3.6

Field Summary

Modifier and TypeField and Description
private final DistanceMeasure
distance

Distance.

private final boolean
normalizeCount

Whether to compute relative bin counts.

Constructor Summary

AccessConstructor and Description
public
HitHistogram(boolean
Whether to compute relative bin counts. If true, the data count in each bin will be divided by the total number of samples.
normalizeCount
,
DistanceMeasure
Distance.
distance
)

Method Summary

Modifier and TypeMethod and Description
public double[][]
computeImage(NeuronSquareMesh2D
Map.
map
,
Iterable<double[]>
Data.
data
)

Implements org.apache.commons.math3.ml.neuralnet.twod.util.MapDataVisualization.computeImage.

Creates an image of the data metrics when represented by the map.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

distanceback to summary
private final DistanceMeasure distance

Distance.

normalizeCountback to summary
private final boolean normalizeCount

Whether to compute relative bin counts.

Constructor Detail

HitHistogramback to summary
public HitHistogram(boolean normalizeCount, DistanceMeasure distance)
Parameters
normalizeCount:boolean

Whether to compute relative bin counts. If true, the data count in each bin will be divided by the total number of samples.

distance:DistanceMeasure

Distance.

Method Detail

computeImageback to summary
public double[][] computeImage(NeuronSquareMesh2D map, Iterable<double[]> data)

Implements org.apache.commons.math3.ml.neuralnet.twod.util.MapDataVisualization.computeImage.

Doc from org.apache.commons.math3.ml.neuralnet.twod.util.MapDataVisualization.computeImage.

Creates an image of the data metrics when represented by the map.

Parameters
map:NeuronSquareMesh2D

Map.

data:Iterable<double[]>

Data.

Returns:double[][]

a 2D-array (in row major order) representing the metrics.