Exemplo n.º 1
0
func NewWritingCollector(ivr *input.InputVectorRealizer, writer *input.TrainDataWriter) *WritingCollector {
	return &WritingCollector{
		inputVectorRealizer: ivr,
		labelNumberer:       system.NewLabelNumberer(),
		writer:              writer,
	}
}
Exemplo n.º 2
0
func NewHashCollector(featureGenerator symbolic.FeatureGenerator,
	featureHash symbolic.FeatureHashFun, maxFeatures uint) *HashCollector {
	return &HashCollector{
		labelNumberer:    system.NewLabelNumberer(),
		featureGenerator: featureGenerator,
		featureHash:      featureHash,
		problem:          golinear.NewProblem(),
		maxFeatures:      maxFeatures,
	}
}
Exemplo n.º 3
0
func NewFeatureCollector(featureGenerator symbolic.FeatureGenerator) *FeatureCollector {
	return &FeatureCollector{NewFeatureVectorizer(), system.NewLabelNumberer(),
		featureGenerator, golinear.NewProblem()}
}