Class ManualDataSet

    • Constructor Detail

      • ManualDataSet

        public ManualDataSet​(List<DataSetEntry> entries,
                             double trainPercentage,
                             @Nullable
                             Long seed)
        Method separates the given data set entries into train and test rating depending on the trainPercentage. This class is used when the manual import of data is required instead of using csv or similar formats. Randomized element is introduces by shuffling the given entries.
        Parameters:
        entries - arraylist of datasetentries
        trainPercentage - set custom train data percentage
        seed - random seed for random numbers generation
      • ManualDataSet

        public ManualDataSet​(List<DataSetEntry> trainEntries,
                             List<DataSetEntry> testEntries)
        Method to specify the train and test entries. This class is used when the manual import of data is required instead of using csv or similar formats.
        Parameters:
        trainEntries - List of DataSetEntry with the train ratings
        testEntries - List of DataSetEntry with the test ratings
    • Method Detail

      • getRatingsIterator

        public Iterator<DataSetEntry> getRatingsIterator()
        Description copied from interface: DataSet
        This method generates an iterator to navigate through the raw ratings stored in DataSetEntries.
        Specified by:
        getRatingsIterator in interface DataSet
        Returns:
        Iterator of ratings
      • getTestRatingsIterator

        public Iterator<DataSetEntry> getTestRatingsIterator()
        Description copied from interface: DataSet
        This method generates an iterator to navigate through the raw test ratings stored in DataSetEntries.
        Specified by:
        getTestRatingsIterator in interface DataSet
        Returns:
        Iterator of test ratings
      • getNumberOfRatings

        public int getNumberOfRatings()
        Description copied from interface: DataSet
        This method indicates the number of (training) ratings.
        Specified by:
        getNumberOfRatings in interface DataSet
        Returns:
        Number of (training) ratings
      • getNumberOfTestRatings

        public int getNumberOfTestRatings()
        Description copied from interface: DataSet
        This method indicates the number of test ratings.
        Specified by:
        getNumberOfTestRatings in interface DataSet
        Returns:
        Number of test ratings