Class MultiLabelFeatureFunction
- java.lang.Object
-
- org.neo4j.gds.embeddings.graphsage.MultiLabelFeatureFunction
-
- All Implemented Interfaces:
FeatureFunction
public class MultiLabelFeatureFunction extends java.lang.Object implements FeatureFunction
-
-
Constructor Summary
Constructors Constructor Description MultiLabelFeatureFunction(java.util.Map<org.neo4j.gds.NodeLabel,org.neo4j.gds.ml.core.functions.Weights<org.neo4j.gds.ml.core.tensor.Matrix>> weightsByLabel, int projectedFeatureDimension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.neo4j.gds.ml.core.Variable<org.neo4j.gds.ml.core.tensor.Matrix>apply(org.neo4j.gds.api.Graph graph, long[] nodeIds, org.neo4j.gds.core.utils.paged.HugeObjectArray<double[]> features)This method expects the graph to be validated beforehand, such that each node has exactly one label See feature initialization inGraphSageHelper.intprojectedFeatureDimension()java.util.Map<org.neo4j.gds.NodeLabel,org.neo4j.gds.ml.core.functions.Weights<org.neo4j.gds.ml.core.tensor.Matrix>>weightsByLabel()
-
-
-
Method Detail
-
weightsByLabel
public java.util.Map<org.neo4j.gds.NodeLabel,org.neo4j.gds.ml.core.functions.Weights<org.neo4j.gds.ml.core.tensor.Matrix>> weightsByLabel()
-
apply
public org.neo4j.gds.ml.core.Variable<org.neo4j.gds.ml.core.tensor.Matrix> apply(org.neo4j.gds.api.Graph graph, long[] nodeIds, org.neo4j.gds.core.utils.paged.HugeObjectArray<double[]> features)This method expects the graph to be validated beforehand, such that each node has exactly one label See feature initialization inGraphSageHelper.- Specified by:
applyin interfaceFeatureFunction- Parameters:
nodeIds- batch of node IDsfeatures- the global property array- Returns:
- Create a matrix variable around a batch of nodes.
-
projectedFeatureDimension
public int projectedFeatureDimension()
-
-