50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


pagoda2 (version 1.0.0)

sgdBatches: Calculate the default number of batches for a given number of vertices and edges. The formula used is the one used by the 'largeVis' reference implementation. This is substantially less than the recommendation E10000 in the original paper.

Description

Calculate the default number of batches for a given number of vertices and edges. The formula used is the one used by the 'largeVis' reference implementation. This is substantially less than the recommendation E10000 in the original paper.

Usage

sgdBatches(N, E = 150 * N/2)

Arguments

N

Number of vertices

E

Number of edges (default = 150*N/2)

Value

The recommended number of sgd batches.

Examples

Run this code
# NOT RUN {
# Observe that increasing K has no effect on processing time
# }
# NOT RUN {
N <- 70000 # MNIST
K <- 10:250
plot(K, sgdBatches(rep(N, length(K)), N * K / 2))

# Observe that processing time scales linarly with N
N <- c(seq(from = 1, to = 10000, by = 100), seq(from = 10000, to = 10000000, by = 1000))
plot(N, sgdBatches(N))
# }

Run the code above in your browser using DataLab