Giter Site home page Giter Site logo

fail to use topN_cold about cmfrec HOT 6 CLOSED

wyfoffice avatar wyfoffice commented on May 26, 2024
fail to use topN_cold

from cmfrec.

Comments (6)

david-cortes avatar david-cortes commented on May 26, 2024

I'm sorry but I cannot see the error from the ipython notebook as it seems it failed earlier and didn't run all the code. Nevertheless, this could perhaps be caused by:

  • Passing more than 1 user (or more than 1 row, with attributes for the same user).
  • Some problem with pandas or numpy (please try using the latest versions if possible).

from cmfrec.

wyfoffice avatar wyfoffice commented on May 26, 2024

sorry, I shall upload the jupyter notebook that shows the error
cmf with cold start-Copy1.zip

from cmfrec.

david-cortes avatar david-cortes commented on May 26, 2024

Oops yeah that's an error there, will correct it later today - thanks for reporting it! In the meantime, you can pass offsets_model=False and it should work fine with it. Also just FYI, the parameters cols_bin_user and cols_bin_item are ignored when using offsets_model=True.

In the mean time, if you want to fix it yourself, you can go to line 1807 of cmfrec/__init__.py (if you're using anaconda and installed it with pip, this is typically under some path like anaconda3/lib/python3.6/site-packages/, and change it from:
user_vec = attributes.reshape(1,-1).dot(self.C).astype(self.A.dtype)
to:
user_vec = attributes.reshape(1,-1).dot(self.C).astype(self.A.dtype).reshape(-1)

from cmfrec.

wyfoffice avatar wyfoffice commented on May 26, 2024

thanks! I will have a try!

from cmfrec.

david-cortes avatar david-cortes commented on May 26, 2024

Fixed the bug now in github and pip. Please install the latest version from pip (you might need to do a forced reinstalled or an update) and confirm that it's corrected.

from cmfrec.

wyfoffice avatar wyfoffice commented on May 26, 2024

sure!

from cmfrec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.