Interface Featurizer
- All Known Subinterfaces:
Featurizer.DataFeaturizer,PreparedFeaturizer
public interface Featurizer
An interface that convert String to numeric data.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAFeaturizerthat only supports the data featurize operations, but not the full deFeaturize operations used by labels. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the length of the data array required bydeFeaturize(float[]).deFeaturize(float[] data) Converts the output data for a label back into the Java type.voidfeaturize(DynamicBuffer buf, String input) Puts encoded data into the float buffer.
-
Method Details
-
featurize
Puts encoded data into the float buffer.- Parameters:
buf- the float buffer to be filledinput- the string input
-
dataRequired
int dataRequired()Returns the length of the data array required bydeFeaturize(float[]).- Returns:
- the length of the data array required by
deFeaturize(float[])
-
deFeaturize
Converts the output data for a label back into the Java type.- Parameters:
data- the data vector correspondign to the feature- Returns:
- a Java type (depending on the
Featurizer) representing the data.
-