def test_validation_shuffle_split():
 skip_if_no_sklearn()
 from pylearn2.cross_validation.subset_iterators import ValidationShuffleSplit
 n = 30
 cv = ValidationShuffleSplit(n)
 for (train, valid, test) in cv:
  assert (np.unique(np.concatenate((train, valid, test))).size == n)
  assert (valid.size == (n * cv.test_size))
  assert (test.size == (n * cv.test_size))

def test_validation_shuffle_split ( ) : skip_if_no_sklearn ( ) from pylearn2 . cross_validation . subset_iterators import ValidationShuffleSplit n = 30 cv = ValidationShuffleSplit ( n ) for ( train , valid , test ) in cv : assert ( np . unique ( np . concatenate ( ( train , valid , test ) ) ) . size == n ) assert ( valid . size == ( n * cv . test_size ) ) assert ( test . size == ( n * cv . test_size ) )
test validationshufflesplit .