GithubHelp home page GithubHelp logo

takuti / flurs Goto Github PK

View Code? Open in Web Editor NEW
108.0 8.0 17.0 631 KB

:ocean: FluRS: A Python library for streaming recommendation algorithms

Home Page: https://flurs.readthedocs.io/

License: MIT License

Python 100.00%
factorization-machines matrix-factorization recommender-system machine-learning python data-science

flurs's Introduction

FluRS: Streaming Recommendation in Python

Build status PyPI version

FluRS is a Python library for online item recommendation. The name indicates Flu-* (Flux, Fluid, Fluent) Recommender Systems which incrementally adapt to dynamic user-item interactions in a streaming environment.

image

Installation

pip install flurs

Usage

See documentation for detail.

flurs's People

Contributors

sergioperezf avatar takuti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flurs's Issues

TypeError: no supported conversion for types: (dtype('<U32'),)

I have a list of a dataset of user,item,context that I have mapped to a list of Event with

Event(User(e.user), Item(e.item), context=np.array([e.context]))

I am using a FM but I don't know what is p here so I tried the number of possible values for the context column:

recommender = FMRecommender(p=count_context_column_values)

I do:

recommender.initialize()

and then try to use it in an Evaluator:

evaluator = Evaluator(recommender, repeat=False)
for x in evaluator.evaluate(events_list):
    print(x)

But I always get the error:

TypeError: no supported conversion for types: (dtype('<U32'),)

From line 126 of the score method: u_mat = sp.csr_matrix(np.repeat(u_vec, n_target, axis=1))

Questions

  1. why is this happening, how to fix?
  2. what should I use for p
  3. repeat=False in the evaluator means that not to consider repeated entries in the dataset??

Thank you for your help and time.

P.S.: I've tried without Evaluator and by calling the recommender.recommend function myself and it either complained about index out of range in the i_mat or, when I passed candidates with an empty or with a single 0 value it gave the same error as described above.

error installing on windows computer and python 3

Please help how install on Windows computer and Python 3

details about python installation are:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

D:\code>python
Python 3.5.4 |Anaconda custom (64-bit)| (default, Aug 14 2017, 13:41:13) [MSC v.
1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

error message is
D:\code>pip install flurs
Collecting flurs
Downloading flurs-0.0.2.tar.gz
Requirement already satisfied: numpy in c:\anaconda3\lib\site-packages (from flu
rs)
Requirement already satisfied: scipy in c:\anaconda3\lib\site-packages (from flu
rs)
Requirement already satisfied: scikit_learn in c:\anaconda3\lib\site-packages (f
rom flurs)
Collecting mmh3 (from flurs)
Downloading mmh3-2.5.1.tar.gz
Building wheels for collected packages: flurs, mmh3
Running setup.py bdist_wheel for flurs ... done
Stored in directory: C:\Users\AppData\Local\pip\Cache\wheels\4d\57\63\2
79a1b015f85bafe80a65708340abde3313d0ed3a76e68beb9
Running setup.py bdist_wheel for mmh3 ... error
Complete output from command c:\anaconda3\python.exe -u -c "import setuptools,
tokenize;file='C:\Users\AppData\Local\Temp\pip-build-stf4mwne
\mmh3\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().repla
ce('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d
C:\Users\AppData\Local\Temp\tmpme3fog09pip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_ext
building 'mmh3' extension
creating build
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\anaconda3\include -Ic:\anacond
a3\include /EHsc /Tpmmh3module.cpp /Fobuild\temp.win-amd64-3.5\Release\mmh3modul
e.obj
error: command 'cl.exe' failed: No such file or directory


Failed building wheel for mmh3
Running setup.py clean for mmh3
Successfully built flurs
Failed to build mmh3
Installing collected packages: mmh3, flurs
Running setup.py install for mmh3 ... error
Complete output from command c:\anaconda3\python.exe -u -c "import setuptool
s, tokenize;file='C:\Users\AppData\Local\Temp\pip-build-stf4mwn
e\mmh3\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().rep
lace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --re
cord C:\Users\AppData\Local\Temp\pip-4_zt8393-record\install-record.txt -
-single-version-externally-managed --compile:
running install
running build
running build_ext
building 'mmh3' extension
creating build
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\anaconda3\include -Ic:\anaco
nda3\include /EHsc /Tpmmh3module.cpp /Fobuild\temp.win-amd64-3.5\Release\mmh3mod
ule.obj
error: command 'cl.exe' failed: No such file or directory

----------------------------------------

Command "c:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:
\Users\AppData\Local\Temp\pip-build-stf4mwne\mmh3\setup.py';f=get
attr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.clo
se();exec(compile(code, file, 'exec'))" install --record C:\Users\App
Data\Local\Temp\pip-4_zt8393-record\install-record.txt --single-version-external
ly-managed --compile" failed with error code 1 in C:\Users\AppData\Local
Temp\pip-build-stf4mwne\mmh3\

D:\code>

error while running import nltk

i have installed python,nltk .did coding related stemming .
everything was fine.
but suddenly error came by showing that 'python' is not recognized as internal and external command
reinstalled python 2.7
now while importing nltk below error is showing
github
my project has come to end suddenly it happen
how to resolve this
thank you in advance

Revising project paths

  • Evaluation related code into a unified module
  • metric -> metrics
  • Modules under data are bit confusing

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.