Neo4j Graph Data Science Client API Reference Graph Data Science Client API Reference
Graph Data Science Client docs

Contents

  • GraphDataScience
  • Graph procedures
  • Graph object
  • GraphCreateResult
  • Algorithms procedures
  • Machine learning procedures
  • Link Prediction Training Pipeline
  • Node Classification Training Pipeline
  • Node Regression Training Pipeline
  • NodePropertyStep
  • LinkFeature
  • Model procedures
  • Link Prediction Model
  • Node Classification Model
  • Node Regression Model
  • GraphSage Model
  • SimpleRelEmbeddingModel
  • Miscellaneous procedures
  • ServerVersion
  • GDS Sessions
  • DbmsConnectionInfo
  • SessionMemory
  • AlgorithmCategory
  • CloudLocation

Quick search

Link Prediction Model¶

class graphdatascience.model.link_prediction_model.LPModel¶

Represents a link prediction model in the model catalog. Construct this using LPTrainingPipeline.train().

best_parameters() → Series[Any]¶

Get the best parameters for the pipeline model.

Returns:

The best parameters for the pipeline 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.

graph_schema() → Series[Any]¶

Get the graph schema of the model.

Returns:

The graph schema of the model.

link_features() → list[LinkFeature]¶

Get the link features of the pipeline.

Returns:

A list of LinkFeatures of the pipeline.

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.

published() → bool¶

Check whether the model is published.

Returns:

True if the model is published, False otherwise.

shared() → bool¶

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.

© Neo4j, Inc.
Terms | Privacy | Sitemap

Neo4j®, Neo Technology®, Cypher®, Neo4j® Bloom™ and Neo4j® Aura™ are registered trademarks of Neo4j, Inc. All other marks are owned by their respective companies.

Contact Us →

US: 1-855-636-4532
Sweden +46 171 480 113
UK: +44 20 3868 3223
France: +33 (0) 1 88 46 13 20

Learn

  • Sandbox
  • Neo4j Community Site
  • Neo4j Developer Blog
  • Neo4j Videos
  • GraphAcademy
  • Neo4j Labs

Social

  • Twitter
  • Meetups
  • Github
  • Stack Overflow
  • Want to Speak?