Python implementation of MS-PS data mining algorithm