Root Mean Square Error

class RootMeanSquareError(receiving_radar, transmitting_device, receiving_device, radar_channel)[source]

Bases: RadarEvaluator

Root mean square error of estimated points to ground truth.

Root mean square error (RMSE) is a widely used metric for evaluating the performance of a radar detector. It estimates the average distance between the estimated and the ground truth position of a target.

A minimal example within the context of a Simulation evaluating the probability of detection for a single radar target illuminated by an FMCW radar would be:

 1from hermespy.core import dB
 2from hermespy.radar import Radar, FMCW, MaxDetector, RootMeanSquareError
 3from hermespy.simulation import Simulation
 4from hermespy.channel import SingleTargetRadarChannel
 5
 6# Create a new simulated scenario featuring a single device
 7simulation = Simulation(num_samples=1000)
 8device = simulation.new_device(carrier_frequency=60e9)
 9
10# Configure the device to transmit and reveive radar waveforms
11radar = Radar(waveform=FMCW())
12radar.detector = MaxDetector()
13device.add_dsp(radar)
14
15# Create a new radar channel with a single illuminated target
16target = SingleTargetRadarChannel((1, radar.max_range), 1., attenuate=False)
17simulation.scenario.set_channel(device, device, target)
18
19# Create a new detection probability evaluator
20simulation.add_evaluator(RootMeanSquareError(radar, device, device, target))
21
22# Sweep over the target's SNR during the simulation
23simulation.new_dimension('noise_level', dB(0, -5, -10, -20, -30), device)
24
25# Run the simulation
26result = simulation.run()
27result.plot()
Parameters:
  • receiving_radar (Radar) – Radar detector to be evaluated.

  • transmitting_device (SimulatedDevice) – Device transmitting into the evaluated channel.

  • receiving_device (SimulatedDevice) – Device receiving from the evaluated channel. The receiving_radar must be a receive DSP algorithm of this device.

  • radar_channel (RadarChannelBase) – The radar channel containing the ground truth to be evaluated.

Raises:

ValueError – If the receiving radar is not an operator of the radar_channel receiver.

evaluate()[source]

Evaluate the state of an investigated object.

Implements the process of extracting an arbitrary performance indicator, represented by the returned Artifact \(X_m\).

Returns: Artifact \(X_m\) resulting from the evaluation.

Return type:

Evaluation

generate_result(grid, artifacts)[source]

Generates an evaluation result from the artifacts collected over the whole simulation grid.

Parameters:
  • grid (Sequence[GridDimension]) – The Simulation grid.

  • artifacts (numpy.ndarray) – Numpy object array whose dimensions represent grid dimensions.

Return type:

RootMeanSquareErrorResult

Returns:

The evaluation result.

property abbreviation: str

Short string representation of this evaluator.

Used as a label for console output and plot axes annotations.

property title: str

Long string representation of this evaluator.

Used as plot title.

class RootMeanSquareEvaluation(pcl, ground_truth)[source]

Bases: Evaluation[ScatterVisualization]

Result of a single root mean squre evaluation.

artifact()[source]

Generate an artifact from this evaluation.

Returns: The evaluation artifact.

Return type:

RootMeanSquareArtifact

class RootMeanSquareArtifact(num_errors, cummulation)[source]

Bases: Artifact

Artifact of a root mean square evaluation

Parameters:
  • num_errors (int) – Number of errros.

  • cummulation (float) – Sum of squared errors distances.

to_scalar()[source]

Scalar representation of this artifact’s content.

Used to evaluate premature stopping criteria for the underlying evaluation.

Return type:

float

Returns:

Scalar floating-point representation. None if a conversion to scalar is impossible.

property cummulation: float

Cummulated squared error

property num_errors: int

Number of cummulated errors

class RootMeanSquareErrorResult(grid, scalar_results, evaluator, plot_surface=True)[source]

Bases: ScalarEvaluationResult

Result of a root mean square error evaluation.

Parameters:
  • grid (Sequence[GridDimension]) – Simulation grid.

  • scalar_results (numpy.ndarray) – Scalar results generated from collecting samples over the simulation grid.

  • evaluator (Evaluator) – The evaluator generating the results.

  • plot_surface (bool, optional) – Enable surface plotting for two-dimensional grids. Enabled by default.