StellarGraph - Machine Learning on Graphs
StellarGraph is a Python library for machine learning on graphs and networks. It offers state-of-the-art algorithms for graph machine learning, making it easy to discover patterns and answer questions about graph-structured data.
Get started with StellarGraph's newest graph machine learning features with pip install stellargraph
.
This release is a small bug fix release on top of 1.2.0.
Cora
, PubMedDiabetes
, CiteSeer
) for upstream changes #1738, #1759
stellargraph.custom_keras_layers
dictionary #1757
RotHEScoring
to RotHEScore
#1756
StellarGraph is a Python library for machine learning on graphs and networks. It offers state-of-the-art algorithms for graph machine learning, making it easy to discover patterns and answer questions about graph-structured data.
Get started with StellarGraph's newest graph machine learning features with pip install stellargraph
.
Jump in to this release, with the new and improved demos and examples:
GraphSAGE
, GraphSAGENodeGenerator
, BiasedRandomWalk
) #1718
KGTripleGenerator
now supports the self-adversarial negative sampling training procedure for knowledge graph algorithms (from RotatE), via generator.flow(..., sample_strategy="self-adversarial")
docs
ClusterGCN
model has been replaced with the GCN
class. In the previous 1.1.0 release, GCN, APPNP and GAT were generalised to support the Cluster-GCN training procedure via ClusterNodeGenerator
(which includes Neo4j support). The ClusterGCN
model is now redundant and thus is deprecated: however, it still works without behaviour change.Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
RotE
, RotH
: knowledge graph link prediction algorithms that combine TransE and RotatE in Euclidean or hyperbolic space, respectively #1539
Model
constructed every model in StellarGraph #1676. This includes fixes for some models (#1677, #1682). Known issues: sparse models such as GCN and RGCN (see #1251 for more info and a work-around using tf-nightly
), experimental GCN-LSTM (#1681).StellarGraph is a Python library for machine learning on graphs and networks. It offers state-of-the-art algorithms for graph machine learning, making it easy to discover patterns and answer questions about graph-structured data.
Get started with StellarGraph's newest graph machine learning features with pip install stellargraph
.
Jump in to this release, with the new and improved demos and examples:
Neo4jStellarGraph
class that packages up a connection to a Neo4j instance, and allows it to be used for machine learning algorithms including the existing Neo4j and GraphSAGE functionality demo, #1595, #1598.ClusterNodeGenerator
class now supports Neo4jStellarGraph
in addition to the in-memory StellarGraph
class, allowing it to be used to train models like GCN and GAT with data stored entirely in Neo4j demo (#1561, #1594, #1613)ClusterNodeGenerator
class can be used to train GCN, GAT, APPNP and PPNP models in addition to the ClusterGCN model #1585
StellarGraph
class continues to get smaller, faster and more flexible:
IndexedArray
wrapper, which does no copies and has minimal runtime overhead demo (#1535, #1556, #1599). They can also now be multidimensional for each node #1561.edge_arrays
, neighbor_arrays
, in_node_arrays
and out_node_arrays
methods have been added, reducing time and memory overhead by leaving data as its underlying NumPy array #1253; the node_type
method now supports multiple nodes as input, making algorithms like HinSAGE and Metapath2Vec much faster #1452; the default edge weight of 1 no longer consumes significant memory #1610.BiasedRandomWalk
is up to 30× faster with weights and 5× faster without weights on MovieLens and up to 100× faster on some synthetic datasets, UniformRandomMetapathWalk
is up to 17× faster (on MovieLens), UniformRandomWalk
is up to 1.4× (on MovieLens).Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
RotatE
: a knowledge graph link prediction algorithm that uses complex rotations (|z| = 1
) to encode relations #1522
GCN_LSTM
(renamed from GraphConvolutionLSTM
): time series prediction on spatio-temporal data. It is still experimental, but has been improved since last release:
SlidingFeaturesNodeGenerator
class has been added to yield data appropriate for the model, straight from a StellarGraph
instance containing time series data as node features #1564
SlidingFeaturesNodeGenerator
class (with multidimensional node features) #1580
Neo4J...
(uppercase J
) to Neo4j...
(lowercase j
).FullBatchNodeGenerator
(GCN, GAT, APPNP, PPNP), RelationalFullBatchNodeGenerator
(RGCN) and PaddedGraphGenerator
(GCN graph classification, DeepGraphCNN), via the weighted=True
parameter #1600
StellarGraph
class now supports conversion between node type and edge type names and equivalent ilocs #1366, which allows optimising some algorithms (#1367 optimises ranking with the DistMult algorithm from 42.6s to 20.7s on the FB15k dataset)EdgeSplitter
no longer prints progress updates #1619
info
method now merges edge types triples like A-[r]->B
and B-[r]->A
in undirected graphs #1650
StellarGraph
class #1547
This 1.0 release of StellarGraph is the culmination of three years of active research and engineering to deliver an open-source, user-friendly library for machine learning (ML) on graphs and networks.
Jump in to this release, with the new demos and examples:
GraphSAGE
and HinSAGE
via DeepGraphInfomax
GCNSupervisedGraphClassification
and with DeepGraphCNN
GraphConvolutionLSTM
(experimental)GCNSupervisedGraphClassification
: supervised graph classification model based on Graph Convolutional layers (GCN) #929, demo.DeepGraphCNN
(DGCNN): supervised graph classification using a stack of graph convolutional layers followed by SortPooling
, and standard convolutional and pooling (such as Conv1D
and MaxPool1D
) #1212 #1265, demo
SortPooling
layer: the node pooling layer introduced in Zhang et al #1210
DeepGraphInfomax
can be used to train almost any model in an unsupervised way, via the corrupt_index_groups
parameter to CorruptedGenerator
#1243, demo. Additionally, many algorithms provide defaults and so can be used with DeepGraphInfomax
without specifying this parameter:
UnsupervisedSampler
supports a walker
parameter to use other random walking algorithms such as BiasedRandomWalk
, in addition to the default UniformRandomWalk
. #1187
StellarGraph
class is now smaller, faster and easier to construct and use:
StellarGraph(..., edge_type_column=...)
parameter can be used to construct a heterogeneous graph from a single flat DataFrame
, containing a column of the edge types #1284. This avoids the need to build separate DataFrame
s for each type, and is significantly faster when there are many types. Using edge_type_column
gives a 2.6× speedup for loading the stellargraph.datasets.FB15k
dataset (with almost 600 thousand edges across 1345 types).StellarGraph
's internal cache of node adjacencies is now computed lazily #1291 and takes into account whether the graph is directed or not #1463, and they now use the smallest integer type they can #1289
StellarGraph
's internal list of source and target nodes are now stored using integer "ilocs" #1267, reducing memory use and making some functionality significantly faster #1444 #1446)graph.node_features()
no longer needs node_type
specified if graph
has only one node type (this includes classes like HinSAGENodeGenerator
, which no longer needs head_node_type
if there is only one node type) #1375
HinSAGENodeGenerator
is 3× faster (on MovieLens
), Attri2VecNodeGenerator
is 4× faster (on CiteSeer
), weighted BiasedRandomWalk
is up to 3× faster, UniformRandomMetapathWalk
is up to 7× fasterstellargraph/stellargraph
docker image wasn't being published in an optimal way, so we have stopped updating it for now #1455
StellarGraph
. Previously edge weights could be any type, but all algorithms that use them would fail with non-numeric types. #1191
GCN
, only the layers within them: APPNPPropagationLayer
, ClusterGraphConvolution
, GraphConvolution
, GraphAttention
, GraphAttentionSparse
, PPNPPropagationLayer
, RelationalGraphConvolution
). Migration: post-process the output using tf.gather
manually or the new sg.layer.misc.GatherIndices
layer.GraphConvolution
has been generalised to work with batch size > 1, subsuming the functionality of the now-deprecated ClusterGraphConvolution
(and GraphClassificationConvolution
) #1205. Migration: replace stellargraph.layer.ClusterGraphConvolution
with stellargraph.layer.GraphConvolution
.BiasedRandomWalk
now takes multi-edges into consideration instead of collapsing them when traversing the graph. It previously required all multi-edges had to same weight and only counted one of them when considering where to walk, but now a multi-edge is equivalent to having an edge whose weight is the sum of the weights of all edges in the multi-edge #1444
Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
GraphConvolutionLSTM
: time series prediction on spatio-temporal data, combining GCN with a LSTM model to augment the conventional time-series model with information from nearby data points #1085, demo
UniformRandomWalk
and BiasedRandomWalk
can have their hyperparameters set on construction, in addition to in each call to run
#1179
GraphSAGE
(and HinSAGE
) noticably faster #1225
PROTEINS
dataset has been added to stellargraph.datasets
, for graph classification #1282
BlogCatalog3
dataset can now be successfully downloaded again #1283
rank_edges_against_all_nodes
now defaults to the random
strategy for breaking ties, and supports top
(previous default) and bottom
as alternatives #1223
RelationalFullBatchNodeGenerator
is now significantly faster and requires much less memory (18× speedup and 560× smaller for the stellargraph.datasets.AIFB
dataset) #1274
FullBatchNodeGenerator
or FullBatchLinkGenerator
is now significantly faster and requires much less memory (3× speedup and 480× smaller for the stellargraph.datasets.PubMedDiabetes
dataset) #1277
StellarGraph.info
now shows a summary of the edge weights for each edge type #1240
plot_history
function accepts a return_figure
parameter to return the matplotlib.figure.Figure
value, for further manipulation #1309 (Thanks @LarsNeR)StellarGraph.to_adjacency_matrix
#1378, StellarGraph.from_networkx
#1401
CorruptedGenerator
on a FullBatchNodeGenerator
can be used to train DeepGraphInfomax
on a subset of the nodes in a graph, instead of all of them #1415
stellargraph.custom_keras_layers
dictionary for use when loading a Keras model now includes all of StellarGraph's layers #1280
PaddedGraphGenerator.flow
now also accepts a list of StellarGraph
objects as input #1458
This is the first release candidate for StellarGraph 1.0. The 1.0 release will be the culmination of 2 years of activate development, and this release candidate is the first milestone for that release.
Jump in to this release, with the new demos and examples:
GraphSAGE
and HinSAGE
via DeepGraphInfomax
GCNSupervisedGraphClassification
GraphConvolutionLSTM
(experimental)DeepGraphInfomax
can be used to train almost any model in an unsupervised way, via the corrupt_index_groups
parameter to CorruptedGenerator
#1243, demo. Additionally, many algorithms provide defaults and so can be used with DeepGraphInfomax
without specifying this parameter:
UnsupervisedSampler
supports a walker
parameter to use other random walking algorithms such as BiasedRandomWalk
, in addition to the default UniformRandomWalk
. #1187
StellarGraph
class is now smaller, faster and easier to construct:
StellarGraph(..., edge_type_column=...)
parameter can be used to construct a heterogeneous graph from a single flat DataFrame
, containing a column of the edge types #1284. This avoids the need to build separate DataFrame
s for each type, and is significantly faster when there are many types. Using edge_type_column
gives a 2.6× speedup for loading the stellargraph.datasets.FB15k
dataset (with almost 600 thousand edges across 1345 types).StellarGraph
's internal cache of node adjacencies now uses the smallest integer type it can #1289. This reduces memory use by 31% on the FB15k
dataset, and 36% on a reddit dataset (with 11.6 million edges).StellarGraph
, previously edge weights could be any type, but all algorithms that use them would fail. #1191
GCN
, only the layers within them: APPNPPropagationLayer
, ClusterGraphConvolution
, GraphConvolution
, GraphAttention
, GraphAttentionSparse
, PPNPPropagationLayer
, RelationalGraphConvolution
). Migration: post-process the output using tf.gather
manually or the new sg.layer.misc.GatherIndices
layer.GraphConvolution
has been generalised to work with batch size > 1, subsuming the functionality of the now-deprecated ClusterGraphConvolution
(and GraphClassificationConvolution
) #1205. Migration: replace stellargraph.layer.ClusterGraphConvolution
with stellargraph.layer.GraphConvolution
.Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
SortPooling
layer: the node pooling layer introduced in Zhang et al #1210
DeepGraphConvolutionalNeuralNetwork
(DGCNN): supervised graph classification using a stack of graph convolutional layers followed by SortPooling
, and standard convolutional and pooling (such as Conv1D
and MaxPool1D
) #1212 #1265
GraphConvolutionLSTM
: time series prediction on spatio-temporal data, combining GCN with a LSTM model to augment the conventional time-series model with information from nearby data points #1085, demo
UniformRandomWalk
and BiasedRandomWalk
can have their hyperparameters set on construction, in addition to in each call to run
#1179
GraphSAGE
(and HinSAGE
) noticably faster #1225
PROTEINS
dataset has been added to stellargraph.datasets
, for graph classification #1282
BlogCatalog3
dataset can now be successfully downloaded again #1283
rank_edges_against_all_nodes
now defaults to the random
strategy for breaking ties, and supports top
(previous default) and bottom
as alternatives #1223
RelationalFullBatchNodeGenerator
is now significantly faster and requires much less memory (18× speedup and 560× smaller for the stellargraph.datasets.AIFB
dataset) #1274
StellarGraph.info
now shows a summary of the edge weights for each edge type #1240
StellarGraph is a Python library for machine learning on graphs and networks. It offers state-of-the-art algorithms for graph machine learning, making it easy to discover patterns and answer questions about graph-structured data.
Get started with StellarGraph's newest graph machine learning features with pip install stellargraph
.
This bugfix release contains the same code as 0.11.0, and just fixes the metadata in the Anaconda package so that it can be installed successfully.
StellarGraph is a Python library for machine learning on graphs and networks. It offers state-of-the-art algorithms for graph machine learning, making it easy to discover patterns and answer questions about graph-structured data.
Get started with StellarGraph's newest graph machine learning features with pip install stellargraph
.
demos/basics
directory contains two notebooks demonstrating how to construct a StellarGraph
object from Pandas, and from NetworkX #1074
StellarGraph(some_networkx_graph)
with StellarGraph.from_networkx(some_networkx_graph)
, and similarly for StellarDiGraph
.build
method on model classes (such as GCN
) has been renamed to in_out_tensors
#1140. Migration: replace model.build()
with model.in_out_tensors()
.node_model
and link_model
methods on model classes has been replaced by in_out_tensors
#1140 (see that PR for the exact list of types). Migration: replace model.node_model()
with model.in_out_tensors()
or model.in_out_tensors(multiplicity=1)
, and model.node_model()
with model.in_out_tensors()
or model.in_out_tensors(multiplicity=2)
.stellargraph
module were deprecated, in favour of importing from the stellargraph.calibration
or stellargraph.ensemble
submodules directly #1107. Migration: replace uses of stellargraph.Ensemble
with stellargraph.ensemble.Ensemble
, and similarly for the other names (see #1107 for all replacements).StellarGraph.to_networkx
parameters now use attr
to refer to NetworkX attributes, not name
or label
#973. Migration: for any named parameters in graph.to_networkx(...)
, change node_type_name=...
to node_type_attr=...
and similarly edge_type_name
to edge_type_attr
, edge_weight_label
to edge_weight_attr
, feature_name
to feature_attr
.StellarGraph.nodes_of_type
is deprecated in favour of the nodes
method #1111. Migration: replace some_graph.nodes_of_type(some_type)
with some_graph.nodes(node_type=some_type)
.StellarGraph.info
parameters show_attributes
and sample
were deprecated #1110
**kwargs
to real arguments: Attri2Vec
(#1128), ClusterGCN
(#1129), GraphAttention
& GAT
(#1130), GraphSAGE
& its aggregators (#1142), HinSAGE
& its aggregators (#1143), RelationalGraphConvolution
& RGCN
(#1148). Invalid (e.g. incorrectly spelled) arguments would have been ignored previously, but now may fail with a TypeError
; to fix, remove or correct the arguments.method="chebyshev"
option to FullBatchNodeGenerator
, FullBatchLinkGenerator
and GCN_Aadj_feats_op
has been removed for now, because it needed significant revision to be correctly implemented #1028
fit_generator
, evaluate_generator
and predict_generator
methods on Ensemble
and BaggingEnsemble
have been renamed to fit
, evaluate
and predict
, to match the deprecation in TensorFlow 2.1 of the tensorflow.keras.Model
methods of the same name #1065. Migration: remove the _generator
suffix on these methods.default_model
method on Attri2Vec
, GraphSAGE
and HinSAGE
has been deprecated, in favour of in_out_tensors
#1145. Migration: replace model.default_model()
with model.in_out_tensors()
.Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
StellarGraph.to_adjacency_matrix
is at least 15× faster on undirected graphs #932
ClusterNodeGenerator
is now noticably faster, which makes training and predicting with a ClusterGCN
model faster #1095. On a random graph with 1000 nodes and 5000 edges and 10 clusters, iterating over an epoch with q=1
(each clusters individually) is 2× faster, and is even faster for larger q
. The model in the Cluster-GCN demo notebook using Cora trains 2× faster overall.node_features=...
parameter to StellarGraph.from_networkx
now only needs to mention the node types that have features, when passing a dictionary of Pandas DataFrames. Node types that aren't mentioned will automatically have no features (zero-length feature vectors). #1082
subgraph
method was added to StellarGraph
for computing a node-induced subgraph #958
connected_components
method was added to StellarGraph
for computing the nodes involved in each connected component in a StellarGraph
#958
info
method on StellarGraph
now shows only 20 node and edge types by default to be more useful for graphs with many types #993. This behaviour can be customized with the truncate=...
parameter.info
method on StellarGraph
now shows information about the size and type of each node type's feature vectors #979
EdgeSplitter
class supports StellarGraph
input (and will output StellarGraph
s in this case), in addition to NetworkX graphs #1032
Attri2Vec
model class stores its weights statefully, so they are shared between all tensors computed by build
#1101
GCN
model defaults for some parameters now match the GraphConvolution
layer's defaults: specifically kernel_initializer
(glorot_uniform
) and bias_initializer
(zeros
) #1147
datasets
submodule is now accessible as stellargraph.datasets
, after just import stellargraph
#1113
stellargraph.datasets
now support a load
method to create a StellarGraph
object (and other information): AIFB
(#982), CiteSeer
(#989), Cora
(#913), MovieLens
(#947), PubMedDiabetes
(#986). The demo notebooks using these datasets are now cleaner.stellargraph.datasets
:
MUTAG
: a collection of graphs representing chemical compounds #960
WN18
, WN18RR
: knowledge graphs based on the WordNet linguistics data #977
FB15k
, FB15k_237
: knowledge graphs based on the FreeBase knowledge base #977
IAEnronEmployees
: a small set of employees of Enron, and the many emails between them #1058
warnings.warn
call inside StellarGraph; this means DeprecationWarning
s will be visible in Jupyter notebooks and scripts run with Python 3.7 #1144
demos/use-cases/hateful-twitters.ipynb
(#1019), rgcn-aifb-node-classification-example.ipynb
(#983)stellargraph.StellarGraph
instead of stellargraph.core.StellarGraph
(#1127), stellargraph.layer.GCN
instead of stellargraph.layer.gcn.GCN
(#1150) and stellargraph.datasets.Cora
instead of stellargraph.datasets.datasets.Cora
(#1157)The StellarGraph
and StellarDiGraph
classes are now backed by NumPy and Pandas #752. The StellarGraph(...)
and StellarDiGraph(...)
constructors now consume Pandas DataFrames representing node features and the edge list. This significantly reduces the memory use and construction time for these StellarGraph
objects.
The following table shows some measurements of the memory use of g = StellarGraph(...)
, and the time required for that constructor call, for several real-world datasets of different sizes, for both the old form backed by NetworkX code and the new form backed by NumPy and Pandas (both old and new store node features similarly, using 2D NumPy arrays, so the measurements in this table include only graph structure: the edges and nodes themselves):
dataset | nodes | edges | size old (MiB) | size new (MiB) | size change | time old (s) | time new (s) | time change |
---|---|---|---|---|---|---|---|---|
Cora | 2708 | 5429 | 4.1 | 1.3 | -69% | 0.069 | 0.034 | -50% |
FB15k | 14951 | 592213 | 148 | 28 | -81% | 5.5 | 1.2 | -77% |
231443 | 11606919 | 6611 | 493 | -93% | 154 | 33 | -82% |
The old backend has been removed, and conversion from a NetworkX graph should be performed via the StellarGraph.from_networkx
function (the existing form StellarGraph(networkx_graph)
is supported in this release but is deprecated, and may be removed in a future release).
More detailed information about Heterogeneous GraphSAGE (HinSAGE) has been added to StellarGraph's readthedocs documentation #839.
New algorithms:
**kwargs
to real arguments: GraphConvolution
, GCN
. #801 Invalid (e.g. incorrectly spelled) arguments would have been ignored previously, but now may fail with a TypeError
; to fix, remove or correct the arguments.stellargraph.data.load_dataset_BlogCatalog3
function has been replaced by the load
method on stellargraph.datasets.BlogCatalog3
#888. Migration: replace load_dataset_BlogCatalog3(location)
with BlogCatalog3().load()
; code required to find the location or download the dataset can be removed, as load
now does this automatically.stellargraph.data.train_test_val_split
and stellargraph.data.NodeSplitter
have been removed. #887 Migration: this functionality should be replaced with pandas
and sklearn
(for instance, sklearn.model_selection.train_test_split
).stellargraph.utils
have been moved to top-level modules: stellargraph.calibration
, stellargraph.ensemble
, stellargraph.losses
and stellargraph.interpretability
#938. Imports from the old location are now deprecated, and may stop working in future releases. See the linked issue for the full list of changes.Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
stellargraph.random.set_seed
#806
StellarGraph.edges()
can return edge weights as a separate NumPy array with include_edge_weights=True
#754
StellarGraph.to_networkx
supports ignoring node features (and thus being a little more efficient) with feature_name=None
#841
StellarGraph.to_adjacency_matrix
now ignores edge weights (that is, defaults every weight to 1
) by default, unless weighted=True
is specified #857
stellargraph.utils.plot_history
visualises the model training history as a plot for each metric (such as loss) #902
FullBatchLinkGenerator
allows doing link prediction with algorithms like GCN, GAT, APPNP and PPNP #543
datasets
subpackage provides easier access to sample datasets with inbuilt downloading. #690
tensorflow
version 2.0 #518, #732. Backward compatibility with earlier versions of tensorflow
is not guaranteed.StellarGraph
class no longer exposes NetworkX
internals, only required functionality. In particular, calls like list(G)
will no longer return a list of nodes; use G.nodes()
instead. #297 If NetworkX functionality is required, use the new .to_networkx()
method to convert to a normal networkx.MultiGraph
or networkx.MultiDiGraph
.NodeSequence
or LinkSequence
object to GraphSAGE
and HinSAGE
classes is now deprecated and no longer supported #498. Users might need to update their calls of GraphSAGE
and HinSAGE
classes by passing generator
objects instead of generator.flow()
objects.StellarGraph
have been renamed to be more succinct and uniform:
get_feature_for_nodes
is now node_features
type_for_node
is now node_type
StellarGraph
class (neighbors
, in_nodes
, out_nodes
) now return a list of neighbours instead of a set. This addresses #653. This means multi-edges are no longer collapsed into one in the return value. There will be an implicit change in behaviour for explorer classes used for algorithms like GraphSAGE, Node2Vec, since a neighbour connected via multiple edges will now be more likely to be sampled. If this doesn't sound like the desired behaviour, consider pruning the graph of multi-edges before running the algorithm.GraphSchema
has been simplified to remove type look-ups for individual nodes and edges #702 #703. Migration: for nodes, use StellarGraph.node_type
; for edges, use the triple
argument to the edges
method, or filter when doing neighbour queries using the edge_types
argument.NodeAttributeSpecification
and the supporting Converter
classes have been removed #707. Migration: use the more powerful and flexible preprocessing tools from pandas and sklearn (see the linked PR for specifics)Some new algorithms and features are still under active development, and are available as an experimental preview. However, they may not be easy to use: their documentation or testing may be incomplete, and they may change dramatically from release to release. The experimental status is noted in the documentation and at runtime via prominent warnings.
StellarGraph
and StellarDiGraph
classes supports using a backend based on NumPy and Pandas that uses dramatically less memory for large graphs than the existing NetworkX-based backend #668. The new backend can be enabled by constructing with StellarGraph(nodes=..., edges=...)
using Pandas DataFrames, instead of a NetworkX graph.stable
alias for the latest release, e.g. https://stellargraph.readthedocs.io/en/v0.8.4/ for v0.8.4
#612
StellarGraph
class (neighbors
, in_nodes
, out_nodes
) now support additional parameters to include edge weights in the results or filter by a set of edge types. #646
GraphSAGE
and HinSAGE
class API to accept generator objects the same as GCN/GAT models. Passing a NodeSequence
or LinkSequence
object is now deprecated. #498
SampledBreadthFirstWalk
, SampledHeterogeneousBreadthFirstWalk
and DirectedBreadthFirstNeighbours
have been made 1.2-1.5× faster #628
UniformRandomWalk
has been made 2× faster #625
FullBatchNodeGenerator.flow
has been reduced from O(n^2)
quadratic complexity to O(n)
, where n
is the number of nodes in the graph, making it orders of magnitude faster for large graphs #513
demos
and igraph
for demos, and test
for testing. For example, pip install stellargraph[demos,igraph]
will install the dependencies required to run every demo. #661
StellarGraph
and StellarDiGraph
constructors now list their arguments explicitly for clearer documentation (rather than using *arg
and **kwargs
splats) #659
sys.exit(0)
is no longer called on failure in load_dataset_BlogCatalog3
#648
warnings
module #583
Fixed bugs:
DirectedGraphSAGENodeGenerator
always hitting TypeError
exception. #695