Comments (4)
I see the code of parse_line function and it has:
return uid, iid, float(r) + self.offset, timestamp
So im presuming that rating always need be converted to float on custom dataset. Is it ok? Only float?
from surprise.
Please give me the fisrt 10 lines of your dataset + your code.
from surprise.
The problem was solve with force float convertion, the script dont break more.
But im using your sample for panda dataframe, im using in this way:
for (user_id, product_id, rating, timestamp) in fnc.db_cursor:
ratings_dict['itemID'].append(product_id)
ratings_dict['userID'].append(user_id)
ratings_dict['rating'].append(rating)
df = pd.DataFrame(ratings_dict)
data = Dataset.load_from_df(df[['userID', 'itemID', 'rating']], reader)
I changed:
ratings_dict['rating'].append(rating)
To:
ratings_dict['rating'].append(float(rating))
Becuase rating from mysql connector is comming as Decimal.
from surprise.
Great.
from surprise.
Related Issues (20)
- Using Cross Validate with a Pandas Dataframe, running into datatype error
- build_anti_testset() takes along time and at the end it doesnot work HOT 2
- question - surprise for implicit rating data? HOT 1
- Can Surprise work with PySpark?
- What to do if the dataset I want to read has more than three parameters HOT 1
- A bug when importing data from DataFrame HOT 2
- How do I apply ALS minimization in SVD? HOT 1
- Error: Sample larger than population or is negative? HOT 1
- Issues with running Suprise on M1 mac HOT 1
- trainset do not recommend new products
- Cross-validation kNN wrong results on custom dataset
- Possible memory leakage in SVDpp HOT 1
- GridSearchCV always recommends the first parameter combination as best HOT 2
- Wrong mapping of the raw IDs to the internal IDs
- How to remove NumPy installation in setup.py HOT 4
- Couldn't install Surprise in windows HOT 5
- No timestamp data in trainset HOT 1
- Couldn't install Surprise HOT 5
- How to do kfold crossvalidation on trainset (eg splitting movielens-100k using u1 split. then kfold crossvalidation on u1.base, test on u1.test) HOT 1
- Unexpected RMSE Differences in SVD Models with almost the same Training Data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surprise.