load_from_svmlight_format

pai4sk.sml_io.load_from_svmlight_format(filename, num_ft=None, num_chunks=None)

Data loading from svmlight format file. It supports both local and distributed(MPI) method of loading data. For MPI execution this can be used for distributed SnapML training and inference.

Parameters
  • filename (str) – The file where the data resides.

  • num_ft (int) – Expected number of features

  • num_chunks (int) – Number of chunks per partition

Returns

data partition – Returns a data partition in sparse format which will be used for distributed _snap_ml training and inference.

Return type

_snap_ml.Partition.SparsePartition