Reiver Operating Characteristic¶
- class ReceiverOperatingCharacteristic(radar, radar_channel, num_thresholds=101)[source]¶
Bases:
RadarEvaluator
,Serializable
Evaluate the receiver operating characteristics for a radar operator.
The receiver operating characteristics (ROC) curve is a graphical plot that illustrates the performance of a detector by visualizing the probability of false alarm versus the probability of detection for a given parameterization.
A minimal example within the context of a
Simulation
evaluating the probability of detection for a single radar target illuminated by anFMCW
radar would be:1from hermespy.radar import Radar, FMCW, ReceiverOperatingCharacteristic 2from hermespy.simulation import Simulation 3from hermespy.channel import SingleTargetRadarChannel 4 5# Create a new simulated scenario featuring a single device 6simulation = Simulation() 7device = simulation.new_device(carrier_frequency=60e9) 8 9# Configure the device to transmit and reveive radar waveforms 10radar = Radar(device=device) 11radar.waveform = FMCW() 12 13# Create a new radar channel with a single illuminated target 14target = SingleTargetRadarChannel(1, 1., attenuate=True) 15simulation.scenario.set_channel(device, device, target) 16 17# Create a new detection probability evaluator 18simulation.add_evaluator(ReceiverOperatingCharacteristic(radar, target)) 19 20# Run the simulation 21result = simulation.run()
- Parameters:
radar (Radar) – Radar under test.
radar_channel (RadarChannelBase) – Radar channel containing a desired target.
num_thresholds (int, optional) – Number of different thresholds to be considered in ROC curve
- classmethod From_HDF(file, h0_campaign='h0_measurements', h1_campaign='h1_measurements')[source]¶
Compute an ROC evaluation result from a savefile.
- Parameters:
file (Union[str, File]) – Savefile containing the measurements. Either as file system location or h5py File handle.
h0_campaign (str, optional) – Campaign identifier of the h0 hypothesis measurements. By default, h0_measurements is assumed.
h1_campaign (str, optional) – Campaign identifier of the h1 hypothesis measurements. By default, h1_measurements is assumed.
- Return type:
Returns: The ROC evaluation result.
- classmethod From_Scenarios(h0_scenario, h1_scenario, h0_operator=None, h1_operator=None)[source]¶
Compute an ROC evaluation result from two scenarios.
- Parameters:
h0_scenario (Scenario) – Scenario of the null hypothesis.
h1_scenario (Scenario) – Scenario of the alternative hypothesis.
h0_operator (Radar, optional) – Radar operator of the null hypothesis. If not provided, the first radar operator of the null hypothesis scenario will be used.
h1_operator (Radar, optional) – Radar operator of the alternative hypothesis. If not provided, the first radar operator of the alternative hypothesis scenario will be used.
- Return type:
Returns: The ROC evaluation result.
- 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:
- from_scenarios(h0_scenario, h1_scenario, h0_operator=None, h1_operator=None)[source]¶
Compute an ROC evaluation result from two scenarios.
- Parameters:
h0_scenario (Scenario) – Scenario of the null hypothesis.
h1_scenario (Scenario) – Scenario of the alternative hypothesis.
h0_operator (Radar, optional) – Radar operator of the null hypothesis. If not provided, the first radar operator of the null hypothesis scenario will be used.
h1_operator (Radar, optional) – Radar operator of the alternative hypothesis. If not provided, the first radar operator of the alternative hypothesis scenario will be used.
- Return type:
Returns: The ROC evaluation result.
- generate_result(grid, artifacts)[source]¶
Generate a new receiver operating characteristics evaluation result.
- Parameters:
grid (Sequence[GridDimension]) – Grid dimensions of the evaluation result.
artifacts (numpy.ndarray) – Artifacts of the evaluation result.
- Return type:
Returns: The generated result.
- class RocEvaluation(cube_h0, cube_h1)[source]¶
Bases:
Evaluation
[PlotVisualization
]Evaluation of receiver operating characteristics (ROC)
- Parameters:
- class RocArtifact(h0_value, h1_value)[source]¶
Bases:
Artifact
Artifact of receiver operating characteristics (ROC) evaluation
- Parameters:
- class RocEvaluationResult(grid, evaluator, detection_probabilities, false_alarm_probabilities)[source]¶
Bases:
EvaluationResult
Final result of an receive operating characteristcs evaluation.
- Parameters:
grid (Sequence[GridDimension]) – Grid dimensions of the evaluation result.
evaluator (ReceiverOperatingCharacteristic) – Evaluator that generated the evaluation result.
detection_probabilities (np.ndarray) – Detection probabilities for each grid point.
false_alarm_probabilities (np.ndarray) – False alarm probabilities for each grid point.