Turi Create  4.0
turi::drawing_classifier::data_iterator Class Referenceabstract

#include <toolkits/drawing_classifier/dc_data_iterator.hpp>

Classes

struct  batch
 
struct  parameters
 

Public Member Functions

virtual batch next_batch (size_t batch_size)=0
 
virtual bool has_next_batch ()=0
 
virtual void reset ()=0
 
virtual const flex_listclass_labels () const =0
 

Detailed Description

Pure virtual interface for classes that produce batches of data (pre-augmentation) from a raw SFrame. Factor out the shared structure for data iterators with the other iterators!

Definition at line 28 of file dc_data_iterator.hpp.

Member Function Documentation

◆ class_labels()

virtual const flex_list& turi::drawing_classifier::data_iterator::class_labels ( ) const
pure virtual

Returns a sorted list of the unique "label" values found in the target.

Implemented in turi::drawing_classifier::simple_data_iterator.

◆ has_next_batch()

virtual bool turi::drawing_classifier::data_iterator::has_next_batch ( )
pure virtual

Returns true if and only if the next call to next_batch will return a batch with size greater than 0.

Implemented in turi::drawing_classifier::simple_data_iterator.

◆ next_batch()

virtual batch turi::drawing_classifier::data_iterator::next_batch ( size_t  batch_size)
pure virtual

Returns a vector whose size is equal to batch_size.

If repeat was set in the parameters, then the iterator will cycle indefinitely through the SFrame over and over. Otherwise, the last non-empty batch may contain fewer than batch_size elements, and every batch after that will be empty.

Implemented in turi::drawing_classifier::simple_data_iterator.

◆ reset()

virtual void turi::drawing_classifier::data_iterator::reset ( )
pure virtual

Begins a fresh traversal of the dataset.

Implemented in turi::drawing_classifier::simple_data_iterator.


The documentation for this class was generated from the following file: