docs/algo/sona/metapath_en.md
MetaPath2Vec is a graph embedding algorithm for heterogeneous graph, it mainly contains two steps: 1. produce multiple node sequences by randomly walking along abide by the given meta-path; 2. obtain each node's graph embedding by training a word2vec. The first step of random walking is introduced below.
srcId | dstIdnodeId | hindexnodeId nodeType, nodeType is represented as an integertrue / false, true is suggested when the distribution of graph vertices is unbalancedDISK_ONLY/MEMORY_ONLY/MEMORY_AND_DISKinput=hdfs://my-hdfs/data
output=hdfs://my-hdfs/output
source ./spark-on-angel-env.sh
$SPARK_HOME/bin/spark-submit \
--master yarn-cluster\
--conf spark.ps.instances=1 \
--conf spark.ps.cores=1 \
--conf spark.ps.jars=$SONA_ANGEL_JARS \
--conf spark.ps.memory=10g \
--name "metapath angel" \
--jars $SONA_SPARK_JARS \
--driver-memory 5g \
--num-executors 1 \
--executor-cores 4 \
--executor-memory 10g \
--class org.apache.spark.angel.examples.graph.MetaPath2VecExample \
../lib/spark-on-angel-examples-3.3.0.jar
input:$input output:$output sep:tab nodeTypePath:$nodeTypePath metaPath:0-1-2-1-0\
storageLevel:MEMORY_ONLY useBalancePartition:true \
partitionNum:4 psPartitionNum:1