Node Classification Model¶
- class graphdatascience.model.node_classification_model.NCModel¶
Represents a node classification model in the model catalog. Construct this using
NCTrainingPipeline.train().- best_parameters() Series[Any]¶
Get the best parameters for the pipeline model.
- Returns:
The best parameters for the pipeline model.
- Return type:
Series[Any]
- creation_time() Any¶
Get the creation time of the model.
- Returns:
The creation time of the model.
- Return type:
- drop(failIfMissing: bool = False) Series[Any]¶
Drop the model.
- Parameters:
failIfMissing (bool) – If True, an error is thrown if the model does not exist. If False, no error is thrown.
- Returns:
The result of the drop operation.
- Return type:
Series[Any]
- exists() bool¶
Check whether the model exists.
- Returns:
True if the model exists, False otherwise.
- Return type:
- graph_schema() Series[Any]¶
Get the graph schema of the model.
- Returns:
The graph schema of the model.
- Return type:
Series[Any]
- loaded() bool¶
Check whether the model is loaded in memory.
- Returns:
True if the model is loaded in memory, False otherwise.
- Return type:
- metrics() Series[Any]¶
Get the metrics for the pipeline model.
- Returns:
The metrics for the pipeline model.
- Return type:
Series[Any]
- node_property_steps() list[NodePropertyStep]¶
Get the node property steps for the pipeline model.
- Returns:
The node property steps for the pipeline model.
- Return type:
- predict_mutate(G: Graph, **config: Any) Series[Any]¶
Predict on the given graph using the model and mutate the graph with the results.
- Parameters:
G (Graph) – The graph to predict on.
**config (Any) – The config for the prediction.
- Returns:
The result of mutate operation.
- Return type:
Series[Any]
- predict_mutate_estimate(G: Graph, **config: Any) Series[Any]¶
Estimate the memory needed to predict on the given graph using the model.
- Parameters:
G (Graph) – The graph to predict on.
**config (Any) – The config for the prediction.
- Returns:
The memory needed to predict on the given graph using the model.
- Return type:
Series[Any]
- predict_stream(G: Graph, **config: Any) DataFrame¶
Predict on the given graph using the model and stream the results as DataFrame
- predict_stream_estimate(G: Graph, **config: Any) Series[Any]¶
Estimate the prediction on the given graph using the model and stream the results as DataFrame
- Parameters:
G (Graph) – The graph to predict on.
**config (Any) – The config for the prediction.
- Returns:
The prediction results as DataFrame.
- Return type:
Series[Any]
- predict_write(G: Graph, **config: Any) Series[Any]¶
Predict the node labels of a graph and write the results to the database.
- Parameters:
G (Graph) – The graph to predict on.
**config (Any) – The config for the prediction.
- Returns:
The result of the write operation.
- Return type:
Series[Any]
- predict_write_estimate(G: Graph, **config: Any) Series[Any]¶
Estimate the memory needed to predict the node labels of a graph and write the results to the database.
- Parameters:
G (Graph) – The graph to predict on.
**config (Any) – The config for the prediction.
- Returns:
The memory needed to predict the node labels of a graph and write the results to the database.
- Return type:
Series[Any]
- published() bool¶
Check whether the model is published.
- Returns:
True if the model is published, False otherwise.
- Return type:
Check whether the model is shared.
- Returns:
True if the model is shared, False otherwise.
- Return type:
- stored() bool¶
Check whether the model is stored on disk.
- Returns:
True if the model is stored on disk, False otherwise.
- Return type:
- train_config() Series[Any]¶
Get the train config of the model.
- Returns:
The train config of the model.
- Return type:
Series[Any]