Commit e90294d4 by Jan Wijffels

Docs

parent c5cd949e
......@@ -2,6 +2,7 @@
#' @description This function calculates node embeddings in a graph by using
#' VERSE (Versatile Graph Embeddings from Similarity Measures)
#' @param x an object of class dgRMatrix
#' @param similarity type of similarity. Currently defaults to pagerank.
#' @param dimension integer with the dimension of the embedding
#' @param epochs number of epochs
#' @param learning_rate the learning rate of the algorithm
......@@ -25,7 +26,9 @@
#' x <- as_adj(karate)
#' x <- as(x, "RsparseMatrix")
#'
#' embeddings <- deepwalker_verse(x, dimension = 64, epochs = 1000)
#' node_embeddings <- deepwalker_verse(x, dimension = 64, epochs = 1000,
#' learning_rate = 0.0025, samples = 3, alpha = 0.85)
#' str(node_embeddings$embeddings)
deepwalker_verse <- function(x,
similarity = c("pagerank", "adjacency", "simrank"),
dimension = 128,
......@@ -43,10 +46,9 @@ deepwalker_verse <- function(x,
samples = samples,
alpha = alpha)
}else if(similarity == "adjacency"){
.NotYetImplemented()
}else if(similarity == "simrank"){
.NotYetImplemented()
}
emb
}
\ No newline at end of file
......@@ -11,6 +11,8 @@ deepwalker_verse(x, similarity = c("pagerank", "adjacency", "simrank"),
\arguments{
\item{x}{an object of class dgRMatrix}
\item{similarity}{type of similarity. Currently defaults to pagerank.}
\item{dimension}{integer with the dimension of the embedding}
\item{epochs}{number of epochs}
......@@ -43,5 +45,7 @@ data(karate, package = "igraphdata")
x <- as_adj(karate)
x <- as(x, "RsparseMatrix")
embeddings <- deepwalker_verse(x, dimension = 64, epochs = 1000)
node_embeddings <- deepwalker_verse(x, dimension = 64, epochs = 1000,
learning_rate = 0.0025, samples = 3, alpha = 0.85)
str(node_embeddings$embeddings)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment