Results Module#

The results module contains components for generating and analyzing results.

Results processing module for EMFieldML.

This module provides functionality for processing and analyzing results from electromagnetic field machine learning models.

class EMFieldML.Results.Results.ResultMaker#

Bases: object

Class for processing and analyzing ML model results.

static pre_deviation(input_path_y_data: Path, input_path_model: Path, x_train_data: numpy.ndarray, test_data_list: list[int])#

Calculate deviation statistics for test data using trained model.

static pre_magneticfield(input_path_y_data: Path, input_path_model: Path, x_train_data: numpy.ndarray, x_test_data: numpy.ndarray, y_test_data: numpy.ndarray, test_data_list: list[int])#

Calculate magnetic field predictions and statistics for test data.

static make_N_change_deviation(prediction_point_num: int)#

Calculate deviation changes for different N values.

static make_N_change_error(prediction_point_num: int)#

Calculate error changes for different N values.

static sort_N_change_data()#

Sort N change data by deviation values.

static cross_validation_pattern()#

Generate cross-validation patterns for model evaluation.

static make_fix_prediction_point()#

Create fixed prediction points for analysis.

static sort_list(input_path_dir: Path, input_path_file: str, output_path: Path)#

Sort a list of data by the first element of each sublist.

static check_time(file_path)#

Check and parse time information from file.

static measure_simulation_time()#

Measure and record simulation execution time.

Graph generation and visualization module for EMFieldML results.

class EMFieldML.Results.Graph.GraphMaker#

Bases: object

Class for generating various graphs and visualizations of EMFieldML results.

static n_change_deviation() None#

Generate deviation graph for N change analysis.

static n_change_error() None#

Generate error graph for N change analysis.

static active_learning_map(input_path: Path, n_data: int)#

Generate active learning map visualization.

static magnitude_adaptive() None#

Generate adaptive magnitude visualization.

static vector_adaptive() None#

Generate adaptive vector visualization.

static magnitude_postprocessing_compare() None#

Compare magnitude postprocessing results.

static efficiency_postprocessing_compare() None#

Compare efficiency postprocessing results.

static error_map(input_path: Path, type_error: str, vmax: float, cmap: str = 'Reds')#

Generate error map visualization.

static magnitude_map_efficiency(postprocessing: float)#

Generate magnitude map with efficiency analysis.

static magnitude_map_magnetic(postprocessing: int)#

Generate magnitude map with magnetic field analysis.

static change_emfield_by_roi_and_movement(aimpoint, vmax, vmin, relative_move=False)#

Change EM field by ROI and movement analysis.

static change_efficiency_by_roi_and_movement() None#

Change efficiency by ROI and movement analysis.

static search_near_point(aimpoint, points, constraints)#

Search for nearest point with constraints.

static check_search_point(aimpoint, searchpoint, constraints)#

Check if search point meets constraints.

static change_efficiency_by_double_roi() None#

Change efficiency by double ROI analysis.

static generate_mycmap()#

Generate custom colormap for visualizations.

Magnitude map generation for electromagnetic field visualization.

This module provides functionality to create magnitude maps and generate training data for electromagnetic field prediction models.

class EMFieldML.Results.MagnitudeMapMaker.MakeYData#

Bases: object

Generate Y-data for magnitude map creation and training data preparation.

static make_ferrite_parameter()#

Generate ferrite parameter data for magnitude map creation.

static make_prediction_point()#

Generate prediction points for magnitude map visualization.

Test data generation for electromagnetic field models.

This module provides functionality to generate test coordinates and validation data for electromagnetic field prediction models.

class EMFieldML.Results.TestMaker.TestMaker#

Bases: object

Generate test coordinates and validation data for electromagnetic field models.

static make_test_shield_coordinate()#

Generate test shield coordinates for model validation.