datasystemslab / recdb-postgresql Goto Github PK
View Code? Open in Web Editor NEWRecDB is a recommendation engine built entirely inside PostgreSQL
RecDB is a recommendation engine built entirely inside PostgreSQL
After recommender materialization a (previously working) recommendation query does not work anymore.
How to reproduce the problem:
0) load the movie dataset
Here is the complete list of SQL statements (except point 0):
CREATE RECOMMENDER MovieRec ON ml_ratings
USERS FROM userid
ITEMS FROM itemid
EVENTS FROM ratingid
USING ItemCosCF;
SELECT * FROM ml_ratings R
RECOMMEND R.itemid TO R.userid ON R.ratingval
USING ItemCosCF
WHERE R.userid = 1
ORDER BY R.ratingval
LIMIT 10;
SELECT * FROM ml_ratings R
RECOMMEND R.itemid TO R.userid ON R.ratingval
USING ItemCosCF
WHERE R.userid = 1
ORDER BY R.ratingval
LIMIT 10;
ERROR: column r.ratingval does not exist at character 62
STATEMENT: SELECT * FROM ml_ratings R
RECOMMEND R.itemid TO R.userid ON R.ratingval
USING ItemCosCF
WHERE R.userid = 1
ORDER BY R.ratingval
LIMIT 10;
DROP RECOMMENDER MovieRec;
SELECT * FROM ml_ratings R
RECOMMEND R.itemid TO R.userid ON R.ratingval
USING ItemCosCF
WHERE R.userid = 1
ORDER BY R.ratingval
LIMIT 10;
When combining two recommenders, the nested loop join does not end !
I have installed the needed packages using:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev
But when I run the install.pl script I get the following error:
***
ERROR: `flex' is missing on your system. It is needed to create the
file `bootscanner.c'. You can either get flex from a GNU mirror site
or download an official distribution of PostgreSQL, which contains
pre-packaged flex output.
***
make[3]: *** [bootscanner.c] Error 1
make[2]: *** [bootstrap-recursive] Error 2
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2
Compilation error.
How can I solve this?
Dear Sir,
My project have already run (luckily in Postgresql) so migration data to new DB system will be cost inefffective. Do your RecDB engine support directly install on the ordinary database.
Thanks
Hi,
I've created a recommender based off a table I have in the RecDB. My understanding is that when I run a recommending query after creating a recommender, RecDB automatically sees a created recommender and uses it for a faster response.
However, after creating a recommender and running a recommend query, I get the following error server side
select * from relations recommend anime_id to user_id on score using ItemCosCF where user_id = 499231 order by score desc limit 20;
LOG: server process (PID 17044) was terminated by signal 11: Segmentation fault
DETAIL: Failed process was running: select * from relations recommend anime_id to user_id on score using ItemCosCF where user_id = 499231 order by score desc limit 20;
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
FATAL: the database system is in recovery mode
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted; last known up at 2016-04-28 03:13:29 UTC
LOG: database system was not properly shut down; automatic recovery in progress
LOG: record with zero length at C/2257FB40
LOG: redo is not required
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
Could anyone kindly suggest what the problem might be? Thanks for your time.
when ./configure this error shows ,how to fix it?
Hi,
Just start to install RecDB on my Mac.
But got failed with logs:
Compiling PostgreSQL.
In file included from bootparse.y:27:
In file included from ../../../src/include/bootstrap/bootstrap.h:17:
../../../src/include/nodes/execnodes.h:1494:8: error: expected member name or ';' after declaration specifiers
int ID; /* the user or item ID /
~~~ ^
bootparse.c:107:12: note: expanded from macro 'ID'
#define ID 259
^
In file included from bootparse.y:27:
In file included from ../../../src/include/bootstrap/bootstrap.h:17:
../../../src/include/nodes/execnodes.h:1494:5: error: expected ';' at end of declaration list
int ID; / the user or item ID */
^
;
2 errors generated.
make[3]: *** [bootparse.o] Error 1
make[2]: *** [bootstrap-recursive] Error 2
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2
Any help? Got postgresql installed already.
See this paper for an interesting algorithm: http://ls13-www.cs.tu-dortmund.de/homepage/publications/jannach/Conference_RecSys_2017.pdf
Hello,
I am new to programming, and I am attempting to execute RecATHON.
So far, I found startrecathonserver.jar
on recdb-postgresql\PostgreSQL\experiments
directory.
I have executed it by using java -jar
, but I have encountered this error that recathonconfig.properties
is missing.
So, I created it without writing a code, and terminal prints as 'Server Listening!
' once I executed it again.
I am not sure I am on right track and/or I don't know of next step.
How do I start to run RecATHON?
building the server from scratch is not an option for me unfortunately, as I want to deploy to a PAAS. Is there any chance to get this API packaged into an extension for psql sometime?
best
Bernd
Hi, everyone!
Thanks for such an interesting implementation as recdb.
I tried to play with different options and successfully applied item-item recommenders.
But, got this problem using UserPearCF and UserCosCF recommenders
I created a rating table
create table ratings
(
record_id bigserial not null
constraint ratings_users_pk
primary key,
user_id integer not null,
story_id integer not null,
rating integer not null
);
create unique index ratings_record_id_uindex
on ratings (record_id);
create index ratings_story_id_index
on ratings (story_id);
create index ratings_user_id_index
on ratings (user_id);
Then, I created a recommender for this
CREATE RECOMMENDER UserRec ON ratings
USERS FROM user_id
ITEMS FROM story_id
EVENTS FROM rating
USING userpearcf;
Trying to execute a query similar to the example
SELECT R.story_id, R.rating
FROM ratings R RECOMMEND R.story_id TO R.user_id ON R.rating USING UserPearCF
WHERE R.user_id = 1000
ORDER BY R.rating DESC
Got this error:
ERROR: type mismatch in getTupleFloat()
Is there a way that I can use my own implemented algorithm to produce recommendations using RecDB.
I want to link my algo with RecDB so that it can be used in the same way as the built in ones are used.
Please tell me the way to do this.
So, I am trying to experiment on using RecDB to deal with a MASSIVE database with about 170 million entries and have had some rather slow query times, as you can imagine. I was wondering if indexing userID or itemID columns of my database would provide any noticeable speed advantages since none of the examples scripts appeared to create indexes on the DB. Also for a DB of a 170 million reviews what would you expect the runtime for creating the APRIORI recommender? Hours? Days? Weeks?
Any information would be extremely helpful.
EXPLAIN ANALYZE breaks with a recommendation query. To reproduce the problem, first load the MovieLens dataset and then perform the following queries:
CREATE RECOMMENDER MovieRec ON ml_ratings USERS FROM userid ITEMS FROM itemid EVENTS FROM ratingval USING itemcoscf;
Then execute the following:
EXPLAIN ANALYZE SELECT * FROM ml_ratings RECOMMEND itemid TO userid ON ratingval USING itemcoscf WHERE userid = 1 ORDER BY ratingval LIMIT 10;
The back-end ends unexpectedly and returns a segmentation fault.
Note that EXPLAIN alone works just fine.
I have noticed that while connecting with Postgres JDBC driver, the system can not recognize Recommend statement. Since connecting to the applications using java is an important part of the DBMS, I think this would be useful to add this feature to RecDB.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.