<｜begin▁of▁sentence｜>### Instruction:
Given a small graph G with 3 nodes and 2 edges (edge set is [(0, 1), (1, 2)]) and a feature matrix as a Scipy COO or Numpy array corresponding to node features, can you use the TADW model (from the IJCAI '15 paper 'Network Representation Learning with Rich Text Information') to generate embeddings considering custom parameters such as dimensions, reduction_dimensions, svd_iterations, seed, alpha, iterations, and lambd? Provide the embeddings of nodes in this graph.
### Response:
import networkx as nx
from karateclub import TADW
import numpy as np
from scipy.sparse import coo_matrix

# Create a small graph with 3 nodes
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2)])

# Create a feature matrix for nodes
features = np.array([[1, 0], [0, 1], [1, 1]])
feature_matrix = coo_matrix(features)

# Instantiate TADW model with custom parameters
model = TADW(dimensions=16, reduction_dimensions=8, svd_iterations=10, seed=42, alpha=0.05, iterations=5, lambd=1.0)

# Fit the model
model.fit(G, feature_matrix)

# Get the embeddings
embeddings = model.get_embedding()
print(embeddings)
<|EOT|>
