hoops_ai.ml.EXPERIMENTAL.flow_model_graph_classification
Classes
|
GraphClassification is a user-friendly wrapper around the UVNet model. |
- class hoops_ai.ml.EXPERIMENTAL.flow_model_graph_classification.GraphClassification(num_classes=10, result_dir=None, log_file='cnn_graph_training_errors.log', generate_stream_cache_for_visu=False)
Bases:
FlowModelGraphClassification is a user-friendly wrapper around the UVNet model. It provides default hyperparameters and an interface for users to interact without directly accessing the UVnet class.
- Parameters:
- convert_encoded_data_to_graph(storage, graph_handler, filename)
Converts encoded data from storage into a graph representation, which serves as input for the ML model.
- Parameters:
storage (DataStorage)
graph_handler (MLStorage)
filename (str)
- Return type:
- encode_cad_data(cad_file, cad_loader, storage)
Opens the CAD file and encodes its data into a format suitable for machine learning. Stores the encoded data using the provided storage handler.
- Parameters:
cad_file (str)
cad_loader (CADLoader)
storage (DataStorage)
- Return type:
- encode_label_data(label_storage, storage)
Uses the LabelStorage object to retrieve the labeling information for a given input Stores the label data for the specific machine learning Task
return the str key when the label data is found in the storage object and the size of the label data
- Parameters:
label_storage (LabelStorage)
storage (DataStorage)
- Return type:
- get_citation_info()
Provides citation details for the UV-Net model, including authors, paper title, publication year, model architecture, original applications, and a link to the open-source GitHub repository.
- Returns:
A formatted citation string.
- Return type:
- load_model_input_from_files(graph_file, data_id, label_file=None)
Loads a single graph from a file to be used as input for the machine learning model.
- metrics()
Publish/push the ml metrics after traiing the model
- Return type:
- predict_and_postprocess(batch)
Post-processes and formats the raw model output into a structured prediction. Returns a numpy array with top 3 predictions and their probability percentages as integers.
- Returns:
Array with shape (batch_size, 2, 3), where: - First dimension: batch items - Second dimension [0]: class indices (int) - Second dimension [1]: probability percentages (int)
- Return type: