-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented MovieRecommender class, All Junit tests passed #73
base: master
Are you sure you want to change the base?
Conversation
src/test/java/nearsoft/academy/bigdata/recommendation/MovieRecommender.java
Outdated
Show resolved
Hide resolved
…w user preference insertion
|
||
} | ||
|
||
GenericPreference getPreference(String filePath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Handle access modifier
- Investigated what kind of access do you have there.
String userID = ""; | ||
Float score = 0.0f; | ||
|
||
BufferedReader reader; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable doesn't have any purpose here!
src/test/java/nearsoft/academy/bigdata/recommendation/MovieRecommender.java
Outdated
Show resolved
Hide resolved
|
||
void addPreference(String userID, String productID, float score) { | ||
|
||
reviewCount++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part doesn't have any relationship with addPreference method.
Try to split the methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Hayde, I split the function
return null; | ||
} | ||
|
||
void addPreference(String userID, String productID, float score) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle access modifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I forgot that
…calration of the BufferReader
Solution implemented reading from the movies.txt file and inserting reviews data into a FastByIDMap of PreferenceArray, this map is used to create the model.