ACDNE(in_dim, hid_dim, num_classes, num_layers=0, n_emb=128, pair_weight=0.1, step=3, dropout=0.0, act=F.relu, weight_decay=0.0, lr=0.004, epoch=100, device='cuda:0', batch_size=100, num_neigh=-1, verbose=2, **kwargs)
Bases: BaseGDA
Adversarial Deep Network Embedding for Cross-network Node Classification (AAAI-20).
| Parameters: |
|
|---|
agg_tran_prob_mat(g, step)
Compute aggregated K-step transition probability matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Aggregates transition probabilities up to K steps for capturing higher-order proximity.
batch_generator(data, batch_size, shuffle=True)
Generate mini-batches from data.
| Parameters: |
|
|---|
| Yields: |
|
|---|
batch_ppmi(batch_size, shuffle_index_s, shuffle_index_t, ppmi_s, ppmi_t)
Extract PPMI matrices for mini-batch nodes.
| Parameters: |
|
|---|
| Returns: |
|
|---|
compute_ppmi(a)
Compute Positive Pointwise Mutual Information (PPMI) matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
PPMI captures the statistical significance of node co-occurrences in random walks.
fit(source_data, target_data)
Train the ACDNE model.
| Parameters: |
|
|---|
Notes
Training process includes:
- Processing graph data to compute PPMI matrices
- Concatenating node features with neighbor features
- Training with mini-batch strategy
- Optimizing classification, domain adaptation, and network proximity losses
forward_model(**kwargs)
Forward pass of the model.
| Parameters: |
|
|---|
init_model(**kwargs)
Initialize the ACDNE model.
| Parameters: |
|
|---|
| Returns: |
|
|---|
my_scale_sim_mat(w)
Compute L1 row normalization of a matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
predict(data, train=False)
Make predictions on given data.
| Parameters: |
|
|---|
| Returns: |
|
|---|
process_graph(data)
Process the input graph data.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Computes PPMI matrix and aggregated neighbor features for network embedding.
shuffle_aligned_list(data)
Shuffle multiple aligned lists together.
| Parameters: |
|
|---|
| Returns: |
|
|---|