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, rating: 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, num_recalls=5) # return [(item_id, score),]
    recommends = cf.recommends(user_ids, num_recalls=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.5.1.tar.gz (8.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: coll-filter-1.5.1.tar.gz
  • Upload date:
  • Size: 8.7 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.5.1.tar.gz
Algorithm Hash digest
SHA256 4d433f604f6e829c7863d01230af0d5c02d5191d8f65f8c2eed87fa96a66aae1
MD5 206379889900a98ef6f54e675389b0e7
BLAKE2b-256 19120751a6d787ba3118079b50bebf46d5a333cd17a4bc33acf3217e1acdea93

See more details on using hashes here.

Supported by

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