<｜begin▁of▁sentence｜>### Instruction:
Given a social network represented as a graph, how can latent positions be estimated to model the probability of connections between individuals in the network, assuming each individual has a latent position in some Euclidean space influencing their connections?
### Response:
import networkx as nx
from graspologic.models import RDPGEstimator

# Step 1: Construct an undirected social network graph as a NetworkX object
G = nx.fast_gnp_random_graph(n=100, p=0.1)

# Convert the graph to an adjacency matrix
adjacency_matrix = nx.to_numpy_array(G)

# Step 2: Initialize and fit the RDPGEstimator to estimate latent positions
# that represent the probability of connection between nodes
rdpg_estimator = RDPGEstimator(loops=False, n_components=2)
rdpg_estimator.fit(adjacency_matrix)

# Get the latent positions
latent_positions = rdpg_estimator.latent_tuple_

# Get the estimated probability matrix
probability_matrix = rdpg_estimator.p_mat_

# Print the shapes of the latent positions and probability matrix
print('Latent Positions Shape:', latent_positions[0].shape)
print('Probability Matrix Shape:', probability_matrix.shape)
<|EOT|>
