Skip to main content

Collaborative Filtering with multi-process parallelism.

Project description

Usage Sample ''''''''''''

.. code:: python

from cf import CollFilter

if __name__ == '__main__':
    data = read_data('file_path')
    data = pre_process(data)  # return [(user_id: Any, item_id: Any, ratting: float),]
    cf = CollFilter(data)

    ucf = cf.user_cf()  # return {user_id: [(item_id, score),],}
    icf = cf.item_cf()  # return {user_id: [(item_id, score),],}

    recommend = cf.recommend(user_id, recall_num=5) # return [(item_id, score),]
    recommends = cf.recommends(user_ids, recall_num=5) # return {user_id: [(item_id, score),],}

    cf.release()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coll-filter-1.3.1.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file coll-filter-1.3.1.tar.gz.

File metadata

  • Download URL: coll-filter-1.3.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for coll-filter-1.3.1.tar.gz
Algorithm Hash digest
SHA256 4279302c177bbf287136726a63d1c02c0e49e26e02a23f243c9b0f6d5107ddf2
MD5 86d2df8060abf2adbf5bdeceed64fe24
BLAKE2b-256 b07196b60bf326795a8fc9b7bbb60a4db3f494bfd9cab2b9f6572a50b27c5d0d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page