ghamrouni / recommender Goto Github PK
View Code? Open in Web Editor NEWA C library for product recommendations/suggestions using collaborative filtering (CF)
License: BSD 2-Clause "Simplified" License
A C library for product recommendations/suggestions using collaborative filtering (CF)
License: BSD 2-Clause "Simplified" License
the generate_random_matrix is using srand(0) to generate random number everytime.
srand(0) sets the seed of the random number generator to 0. Calling it again with the same parameter sets the seed to 0 again, and will cause the random generator to create the same output.
e.g.
srand(0);
for(int i = 0; i<5; i++)
printf(" %d ", rand());
return 0;
prints 1804289383 846930886 1681692777 1714636915 1957747793 all the time (should use something like srand(time(0)))
So the matrix is not generated randomly as it should be.
Function call in test.c
estimate_rating_from_factors(0, 0, learned, model)
gives the following error
test.c: In function ‘main’:
test.c:80:4: error: incompatible type for argument 2 of ‘estimate_rating_from_factors’
estimate_rating_from_factors(0, 0, learned, model));
Function prototype from recommender.h
double
estimate_rating_from_factors(rating_estimator_parameters_t* estim_param,
struct learning_model model);
Comment from above prototype has 4 arguments while you have only defined 2.
Hi There,
This project is still using an old implementation of LGTM's automated code review, which has now been disabled. To continue using automated code review, and receive checks on your Pull Requests, please install the GitHub App on this repository.
Thanks,
The LGTM Team
error: format specifies type 'unsigned int *' but the argument has
type 'size_t *' (aka 'unsigned long *') [-Werror,-Wformat]
if (fscanf (file, "%u %u", &i, &j) != 2)
~~ ^~
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.