Documentation ¶
Index ¶
- func CreateView(brokers []string, group goka.Group) (*goka.View, func(ctx context.Context) func() error)
- func StartLearner(ctx context.Context, brokers []string, group goka.Group, ...) func() error
- func StartProducer(ctx context.Context, brokers []string, group goka.Group, ...) func() error
- func StartRefeeder(ctx context.Context, brokers []string, group goka.Group, delay time.Duration) func() error
- func StartValidator(ctx context.Context, view *goka.View, ratings []cofire.Rating, ...) func() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateView ¶
func CreateView(brokers []string, group goka.Group) (*goka.View, func(ctx context.Context) func() error)
CreateView creates a view of the cofire table and a function to start it if no error occurred.
func StartLearner ¶
func StartLearner(ctx context.Context, brokers []string, group goka.Group, params cofire.Parameters) func() error
StartLearner starts a Cofire processor that factorizes a rating matrix with SGD. A simple validator prints to stdout the RMSE every second.
func StartProducer ¶
func StartProducer(ctx context.Context, brokers []string, group goka.Group, ratings []cofire.Rating) func() error
StartProducer starts a producer that emits a slice of ratings into the input of the learner, one rating every 5 milliseconds.
func StartRefeeder ¶
func StartRefeeder(ctx context.Context, brokers []string, group goka.Group, delay time.Duration) func() error
StartRefeeder starts a Cofire refeeder processor, ie, a process that refeeds the stream into the learner's input after a delay. This can be used to train for multiple iterations.
func StartValidator ¶
func StartValidator(ctx context.Context, view *goka.View, ratings []cofire.Rating, params cofire.Parameters) func() error
StartValidator starts a go routine that loops over all given ratings and calculates the RSME calculating the ratings with the error predicted from the model.
Types ¶
This section is empty.