<｜begin▁of▁sentence｜>### Instruction:
Given a Newman-Watts-Strogatz small-world graph created with 100 nodes, each connected to 3 nearest neighbors and with a 0.5 probability of adding a new edge, can you use the BigClam model to detect overlapping communities and provide both node embeddings and their cluster memberships?
### Response:
import networkx as nx
from karateclub import BigClam

# Create a random graph
G = nx.newman_watts_strogatz_graph(100, 3, 0.5)

# Initialize BigClam with specified hyperparameters
model = BigClam(dimensions=10, iterations=100, learning_rate=0.01, seed=42)

# Fit the model to the graph
model.fit(G)

# Obtain the embedding and memberships
embedding = model.get_embedding()
memberships = model.get_memberships()

# Print the results
print('Embedding:\n', embedding)
print('Memberships:\n', memberships)
<|EOT|>
