|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mymedialite.data.RatingsChronologicalSplit
public class RatingsChronologicalSplit
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. This kind of split is the most realistic kind of split, because in a real application you also can only use past data to make predictions for the future. The dataset must not be modified after the split - this would lead to undefined behavior.
Constructor Summary | |
---|---|
RatingsChronologicalSplit(ITimedRatings ratings,
java.util.Date split_time)
Create a chronological split of rating prediction data. |
|
RatingsChronologicalSplit(ITimedRatings ratings,
double ratio)
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 |
Constructor Detail |
---|
public RatingsChronologicalSplit(ITimedRatings ratings, double ratio)
ratings
- the datasetratio
- the ratio of ratings to use for validationpublic RatingsChronologicalSplit(ITimedRatings ratings, java.util.Date split_time)
ratings
- the datasetsplit_time
- the point in time to use for splitting the data set;
everything from that point on will be used for validationMethod 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 |