|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mymedialite.data.RatingsPerUserChronologicalSplit
public class RatingsPerUserChronologicalSplit
Per-user chronological split for rating prediction. Chronological splits (splits according to the time of the rating) treat all ratings before a certain time as training ratings, and the ones after that time as test/validation ratings. Here, the split date may differ from user to user. In the constructor, you can either specify which part (ratio) or how many of a user's rating are supposed to be used for validation. The dataset must not be modified after the split - this would lead to undefined behavior.
Field Summary | |
---|---|
java.util.List<ITimedRatings> |
test
|
java.util.List<ITimedRatings> |
train
|
Constructor Summary | |
---|---|
RatingsPerUserChronologicalSplit(ITimedRatings ratings,
double ratio)
Create a chronological split of rating prediction data. |
|
RatingsPerUserChronologicalSplit(ITimedRatings ratings,
int num_test_ratings_per_user)
Create a chronological split of rating prediction data. |
Method Summary | |
---|---|
int |
numberOfFolds()
The number of folds in this split. |
java.util.List<ITimedRatings> |
test()
Test data for the different folds. |
java.util.List<ITimedRatings> |
train()
Training data for the different folds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.List<ITimedRatings> train
public java.util.List<ITimedRatings> test
Constructor Detail |
---|
public RatingsPerUserChronologicalSplit(ITimedRatings ratings, double ratio)
ratings
- the datasetratio
- the ratio of ratings to use for validation (per user)public RatingsPerUserChronologicalSplit(ITimedRatings ratings, int num_test_ratings_per_user)
ratings
- the datasetnum_test_ratings_per_user
- the number of test ratings (per user)Method Detail |
---|
public int numberOfFolds()
ISplit
numberOfFolds
in interface ISplit<ITimedRatings>
public java.util.List<ITimedRatings> train()
ISplit
train
in interface ISplit<ITimedRatings>
public java.util.List<ITimedRatings> test()
ISplit
test
in interface ISplit<ITimedRatings>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |