You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

utils.py 516 B

1234567891011121314151617181920
  1. # test the utils function
  2. from autogl.datasets import utils, build_dataset_from_name
  3. def test_graph_cross_validation():
  4. dataset = build_dataset_from_name('imdb-b')
  5. # first level, 10 folds
  6. utils.graph_cross_validation(dataset, 10)
  7. # set to fold id
  8. utils.set_fold(dataset, 1)
  9. # get train split
  10. train_dataset = utils.graph_get_split(dataset, "train", False)
  11. # further split train to train / val
  12. utils.graph_random_splits(train_dataset, 0.8, 0.2)
  13. test_graph_cross_validation()