loaders.load_MNIST_with_embeddings

pai4sk.simsearch.loaders.load_MNIST_with_embeddings(image_file_path, label_file_path, norm='l1', use_sparse=True)

Loads MNIST dataset into arrays W, X, labels, ids

Parameters
  • image_file_path (string) – file path location for the MNIST images

  • label_file_path (string) – file path location for the MNIST labels

  • norm (string (default='l1')) – l2 if the user wants to normalize the data using l2 normalization

  • use_sparse (bool (default='True')) – False if the user wants to load MNIST in non-sparse format

Returns

  • W (array_like, shape (n_features, n_dimensions)) – Embedding vectors

  • X (array_like, sparse_matrix, shape (n_samples, n_features)) – Feature vectors

  • labels (array-like, shape (n_samples,)) – labels are the class labels of the samples in X

  • ids (array_like, shape (n_samples,)) – ids are the ids of the samples in X