def random_dense_design_matrix(rng, num_examples, dim, num_classes):
 X = rng.randn(num_examples, dim)
 if num_classes:
  Y = rng.randint(0, num_classes, (num_examples, 1))
  y_labels = num_classes
 else:
  Y = None
  y_labels = None
 return DenseDesignMatrix(X=X, y=Y, y_labels=y_labels)

def random_dense_design_matrix ( rng , num_examples , dim , num_classes ) : X = rng . randn ( num_examples , dim ) if num_classes : Y = rng . randint ( 0 , num_classes , ( num_examples , 1 ) ) y_labels = num_classes else : Y = None y_labels = None return DenseDesignMatrix ( X = X , y = Y , y_labels = y_labels )
creates a random dense design matrix that has class labels .