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.
- classes() list[int] ¶
Get the classes of the model.
- Returns:
The classes of the model.
- creation_time() Any ¶
Get the creation time of the model.
- Returns:
The creation time of the model.
- drop(failIfMissing: bool = False) Series[Any] ¶
Drop the model.
- Parameters:
failIfMissing – 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.
- exists() bool ¶
Check whether the model exists.
- Returns:
True if the model exists, False otherwise.
- feature_properties() list[str] ¶
Get the feature properties of the model.
- Returns:
The feature properties of the model.
- graph_schema() Series[Any] ¶
Get the graph schema of the model.
- Returns:
The graph schema of the model.
- loaded() bool ¶
Check whether the model is loaded in memory.
- Returns:
True if the model is loaded in memory, False otherwise.
- metrics() Series[Any] ¶
Get the metrics for the pipeline model.
- Returns:
The metrics for the pipeline model.
- model_info() dict[str, Any] ¶
Get the model info of the model.
- Returns:
The model info of the model.
- name() str ¶
Get the name of the model.
- Returns:
The name of the model.
- node_property_steps() list[NodePropertyStep] ¶
Get the node property steps for the pipeline model.
- Returns:
The node property steps for the pipeline model.
- 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 – The graph to predict on.
**config – The config for the prediction.
- Returns:
The result of mutate operation.
- predict_mutate_estimate(G: Graph, **config: Any) Series[Any] ¶
Estimate the memory needed to predict on the given graph using the model.
- Parameters:
G – The graph to predict on.
**config – The config for the prediction.
- Returns:
The memory needed to predict on the given graph using the model.
- predict_stream(G: Graph, **config: Any) DataFrame ¶
Predict on the given graph using the model and stream the results as DataFrame
- Parameters:
G – The graph to predict on.
**config – The config for the prediction.
- Returns:
The prediction 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 – The graph to predict on.
**config – The config for the prediction.
- Returns:
The prediction results as DataFrame.
- predict_write(G: Graph, **config: Any) Series[Any] ¶
Predict the node labels of a graph and write the results to the database.
- Parameters:
G – The graph to predict on.
**config – The config for the prediction.
- Returns:
The result of the write operation.
- 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 – The graph to predict on.
**config – The config for the prediction.
- Returns:
The memory needed to predict the node labels of a graph and write the results to the database.
- published() bool ¶
Check whether the model is published.
- Returns:
True if the model is published, False otherwise.
Check whether the model is shared.
- Returns:
True if the model is shared, False otherwise.
- stored() bool ¶
Check whether the model is stored on disk.
- Returns:
True if the model is stored on disk, False otherwise.
- train_config() Series[Any] ¶
Get the train config of the model.
- Returns:
The train config of the model.
- type() str ¶
Get the type of the model.
- Returns:
The type of the model.