Description Usage Arguments Details Value Examples
Generate a grid Ising model with random parameters
1 | gf_grid_ising_model(sc, n, v_std = 1, e_std = 1)
|
sc |
A Spark connection. |
n |
Length of one side of the grid. The grid will be of size n x n. |
v_std |
Standard deviation of normal distribution used to generate vertex factors "a". Default of 1.0. |
e_std |
Standard deviation of normal distribution used to generate edge factors "b". Default of 1.0. |
This method generates a grid Ising model with random parameters. Ising models are probabilistic graphical models over binary variables xi. Each binary variable xi corresponds to one vertex, and it may take values -1 or +1. The probability distribution P(X) (over all xi) is parameterized by vertex factors ai and edge factors bij:
P(X) = (1/Z) * exp[ ∑_i a_i x_i + ∑_{ij} b_{ij} x_i x_j ]
GraphFrame. Vertices have columns "id" and "a". Edges have columns "src", "dst", and "b". Edges are directed, but they should be treated as undirected in any algorithms run on this model. Vertex IDs are of the form "i,j". E.g., vertex "1,3" is in the second row and fourth column of the grid.
1 2 3 4 | ## Not run:
gf_grid_ising_model(sc, 5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.