class_docstr: The evaluation interface for unsupervised graph representation learning evaluated with 
  linear classification. You can refer to `the benchmark code 
  <https://github.com/divelab/DIG/tree/dig/benchmarks/sslgraph>`_ 
  for examples of usage.
  
  Args:
      dataset (torch_geometric.data.Dataset): The graph classification dataset.
      classifier (string, optional): Linear classifier for evaluation, :obj:`"SVC"` or 
          :obj:`"LogReg"`. (default: :obj:`"SVC"`)
      log_interval (int, optional): Perform evaluation per k epochs. (default: :obj:`1`)
      epoch_select (string, optional): :obj:`"test_max"` or :obj:`"val_max"`.
          (default: :obj:`"test_max"`)
      n_folds (int, optional): Number of folds for evaluation. (default: :obj:`10`)
      device (int, or torch.device, optional): Device for computation. (default: :obj:`None`)
      **kwargs (optional): Training and evaluation configs in :meth:`setup_train_config`.
      
  Examples
  --------
  >>> encoder = Encoder(...)
  >>> model = Contrastive(...)
  >>> evaluator = GraphUnsupervised(dataset, log_interval=10, device=0, p_lr = 0.001)
  >>> evaluator.evaluate(model, encoder)
class_docstr_tok: ["The","evaluation","interface","for","unsupervised","graph","representation","learning","evaluated","with","linear","classification",".","You","can","refer","to","`","the","benchmark","code","<","https",":","\/\/github.com\/divelab\/DIG\/tree\/dig\/benchmarks\/sslgraph",">","`","_","for","examples","of","usage",".","Args",":","dataset","(","torch_geometric.data.Dataset",")",":","The","graph","classification","dataset",".","classifier","(","string",",","optional",")",":","Linear","classifier","for","evaluation",",",":","obj",":","`","``","SVC","''","`","or",":","obj",":","`","``","LogReg","''","`",".","(","default",":",":","obj",":","`","``","SVC","''","`",")","log_interval","(","int",",","optional",")",":","Perform","evaluation","per","k","epochs",".","(","default",":",":","obj",":","`","1","`",")","epoch_select","(","string",",","optional",")",":",":","obj",":","`","``","test_max","''","`","or",":","obj",":","`","``","val_max","''","`",".","(","default",":",":","obj",":","`","``","test_max","''","`",")","n_folds","(","int",",","optional",")",":","Number","of","folds","for","evaluation",".","(","default",":",":","obj",":","`","10","`",")","device","(","int",",","or","torch.device",",","optional",")",":","Device","for","computation",".","(","default",":",":","obj",":","`","None","`",")","*","*","kwargs","(","optional",")",":","Training","and","evaluation","configs","in",":","meth",":","`","setup_train_config","`",".","Examples","--","--","--","--",">",">",">","encoder","=","Encoder","(","...",")",">",">",">","model","=","Contrastive","(","...",")",">",">",">","evaluator","=","GraphUnsupervised","(","dataset",",","log_interval=10",",","device=0",",","p_lr","=","0.001",")",">",">",">","evaluator.evaluate","(","model",",","encoder",")"]
code: def get_optim(self, optim):
      if callable(optim):
          return optim
  
      optims = {"Adam": torch.optim.Adam}
  
      return optims[optim]
  
imports: import copy
  import torch
  import numpy
  import torch.nn
  from tqdm import trange
  from sklearn.model_selection import StratifiedKFold
  from torch_geometric.loader import DataLoader
  from sklearn.svm import SVC
  from sklearn import preprocessing
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import GridSearchCV
label_desc: Use image node_id 9 for calling the GraphUnsupervised obj's underlying member method code with example usage: obj.get_optim(optim) and returns: optims, optim