MCPcopy Create free account

hub / github.com/LFhase/GIA-HAO / functions

Functions151 in github.com/LFhase/GIA-HAO

Methodforward
(self, x, adj_t)
models/model_pyg.py:119
Methodforward
(self, x, adj_t)
models/model_pyg.py:150
Methodforward
(self, x, adj_t)
models/model_pyg.py:187
Methodforward
(self, x, adj_t)
models/model_pyg.py:229
Methodforward
(self, x: Union[Tensor, OptPairTensor], edge_index: Adj, size: Size = None, return_attention_w
models/model_pyg.py:261
Methodforward
r""" Parameters ---------- x : torch.Tensor Tensor of input features. adj : list of torch.SparseTensor
models/model_pyg.py:443
Methodforward
r""" Parameters ---------- mean : torch.Tensor Tensor of mean of input features. var : torch.Tensor, optio
models/model_pyg.py:509
Methodforward
(self, x, adj)
models/model_pyg.py:596
Methodforward
(self, x, adj)
models/model_pyg.py:715
Functiongenerate_split
(dataset, seed=0, train_num_per_c=20, val_num_per_c=30)
load_graph.py:193
Functionget_index_induc
r""" Description ----------- Get index under the inductive training setting. Parameters ---------- index_a : tuple T
attacks/utils.py:376
Methodget_inject_list
(adj, n_inter, inject_id, inject_tmp_list)
attacks/speit.py:114
Functionget_num_params
r""" Description ----------- Convert scipy sparse matrix to torch sparse tensor. Parameters ---------- model : torch.nn.modu
attacks/utils.py:278
Functionget_weights_arithmetic
r""" Description ----------- Arithmetic weights for calculating weighted robust score. Parameters ---------- n : int
attacks/metric.py:128
Functionget_weights_polynomial
r""" Description ----------- Arithmetic weights for calculating weighted robust score. Parameters ---------- n : int
attacks/metric.py:162
Functioninductive_split
Split the graph into training graph, validation graph, and test graph by training and validation masks. Suitable for inductive models.
load_graph.py:117
Methodinject
(target_node_list, n_inject, n_test, mode='random-inter')
attacks/speit.py:131
Functionlabel_preprocess
r""" Description ----------- Convert labels to torch tensor. Parameters ---------- labels : torch.Tensor Labels in f
attacks/utils.py:224
Functionload_data
Loads input data from gcn/data directory ind.dataset_str.x => the feature vectors of the training instances as scipy.sparse.csr.csr_matrix o
utils.py:397
Functionload_features
Loads features saved in a variety of formats. Supported formats: - .npz compressed (assumes features are saved with name "features")
utils.py:315
Functionload_graph_dataset
(name, mode="full", self_loop=True, undirected=True)
load_graph.py:22
Functionload_np_embedding
(path: str)
utils.py:294
Functionload_prebuilt_word_embedding
Read prebuilt word embeddings from a file :param embedding_path: string, file path of the word embeddings :param embedding_dim: int, dime
utils.py:345
Functionload_split
(path)
load_graph.py:256
Functionmakedirs
Creates a directory given a path to either a directory or file. If a directory is provided, creates that directory. If a file is provided (i
utils.py:278
Methodmessage
(self, x_i: Tensor, x_j: Tensor, raw_x_i: OptTensor, raw_x_j: OptTensor, inde
models/model_pyg.py:325
Functionpreprocess_adj
Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation.
utils.py:486
Functionpreprocess_features
Row-normalize feature matrix and convert to tuple representation
utils.py:466
Methodreset_parameters
(self)
models/model_pyg.py:116
Methodreset_parameters
(self)
models/model_pyg.py:143
Methodreset_parameters
(self)
models/model_pyg.py:181
Methodreset_parameters
(self)
models/model_pyg.py:223
Methodreset_parameters
(self)
models/model_pyg.py:439
Methodreset_parameters
(self)
models/model_pyg.py:505
Methodreset_parameters
(self)
models/model_pyg.py:589
Methodreset_parameters
(self)
models/model_pyg.py:706
Functionsave_adj
r""" Description ----------- Save generated adversarial adjacency matrix. Parameters ---------- adj : scipy.sparse.csr.csr_m
attacks/utils.py:318
Functionsave_df_to_csv
r""" Description ----------- Save dataframe to .csv file. Parameters ---------- df : pandas.DataFrame Dataframe cont
attacks/utils.py:513
Functionsave_df_to_xlsx
r""" Description ----------- Save dataframe to .xlsx file. Parameters ---------- df : pandas.DataFrame Dataframe con
attacks/utils.py:486
Functionsave_dict_to_json
r""" Description ----------- Save dictinary to .json file. Parameters ---------- result_dict : dict Dictionary conta
attacks/utils.py:540
Functionsave_dict_to_xlsx
r""" Description ----------- Save result dictionary to .xlsx file. Parameters ---------- result_dict : dict Dictiona
attacks/utils.py:456
Functionsave_features
Saves features to a compressed .npz file with array name "features". :param path: Path to a .npz file where the features will be saved.
utils.py:305
Functionsave_features
r""" Description ----------- Save generated adversarial features. Parameters ---------- features : torch.Tensor or numpy.arr
attacks/utils.py:294
Functionsave_model
r""" Description ----------- Save trained model. Parameters ---------- model : torch.nn.module Model implemented bas
attacks/utils.py:343
Functionsave_np_embedding
(path: str, embedding: np.ndarray)
utils.py:299
Functiontdgia_class_injection
(adj, n_inject, n_edge_max, origin_labels, current_pred, target_idx, device, weight1=0.9, weight2
attacks/injection.py:375
Functiontdgia_ranking_select
(adj, n_inject, n_edge_max, origin_labels, current_pred, target_idx, ratio=0.5, neg=False, weight1=0.9, weight
attacks/injection.py:311
Functiontensor_to_adj
(adj_tensor)
attacks/utils.py:103
Functiontrain_test_split_edges
r"""Splits the edges of a :obj:`torch_geometric.data.Data` object into positive and negative train/val/test edges, and adds attributes of `tra
utils.py:101
Methodupdate_active_edges
(active_edges, n_inject_edges, threshold)
attacks/speit.py:124
Functionupdate_features
(attacker, model, adj_attack, features, features_attack, origin_labels, target_idx, n_epoch=499, dist="cos")
attacks/attack.py:109
← previous101–151 of 151, ranked by callers