Root Mean Square Error

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

Bases: RadarEvaluator, Serializable

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, bandwidth=3e9, oversampling_factor=1)
 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(device.bandwidth)), 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:

RootMeanSquareEvaluation

initialize_result(grid)[source]

Initialize the respective result object for this evaluator.

Parameters:

grid (Sequence[GridDimensionInfo]) – The parameter grid over which the simulation iterates.

Return type:

RootMeanSquareErrorResult

Returns: The initialized evaluation result.

property abbreviation: str[source]

Short string representation of this evaluator.

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

property title: str[source]

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[source]

Cummulated squared error

property num_errors: int[source]

Number of cummulated errors

class RootMeanSquareErrorResult(grid, evaluator)[source]

Bases: EvaluationResult[RootMeanSquareArtifact]

Result of a root mean square error evaluation.

Parameters:
add_artifact(coordinates, artifact, compute_confidence=True)[source]

Add an artifact to this evaluation result.

Parameters:
  • coordinates (tuple[int, ...]) – Coordinates of the grid section to which the artifact belongs.

  • artifact (RootMeanSquareArtifact) – Artifact to be added.

  • compute_confidence (bool) – Whether to compute the confidence level of the evaluation result for the given section coordinates.

Return type:

bool

Returns:

Can the result be trusted? Always False if compute_confidence is set to False.

runtime_estimates()[source]

Extract a runtime estimate for this evaluation result.

Returns: A numpy array containing the runtime estimates for each grid section. If no estimates are available, None is returned.

Return type:

ndarray

to_array()[source]

Convert the evaluation result raw data to an array representation.

Used to store the results in arbitrary binary file formats after simulation execution.

Returns: The array result representation.

Return type:

ndarray