Class MLInferenceFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.ScalarFunction
-
- com.codedstreams.otterstreams.sql.udf.MLInferenceFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.table.functions.FunctionDefinition
public class MLInferenceFunction extends org.apache.flink.table.functions.ScalarFunctionFlink SQL scalar function for ML inference. Usage: SELECT ml_score(features, 'fraud-model') FROM transactions;- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MLInferenceFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Doubleeval(Map<String,Object> features, String modelName)-
Methods inherited from class org.apache.flink.table.functions.ScalarFunction
getKind, getParameterTypes, getResultType, getTypeInference
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toString
-
-
-
-
Method Detail
-
eval
public Double eval(Map<String,Object> features, String modelName) throws InferenceException
- Throws:
InferenceException
-
-