Get invited to our slack community and get access to opportunities and data science insights


sigmoid(x) – Returns 1.0 / (1.0 + exp(-x))

WITH input as (
SELECT 3.0 as x
UNION ALL
SELECT -3.0 as x
)
select
1.0 / (1.0 + exp(-x)),
sigmoid(x)
from
input;
0.04742587317756678 0.04742587357759476
0.9525741268224334 0.9525741338729858

Platforms: WhereOS, Spark, Hive
Class: hivemall.tools.math.SigmoidGenericUDF

More functions can be added to WhereOS via Python or R bindings or as Java & Scala UDF (user-defined function), UDAF (user-defined aggregation function) and UDTF (user-defined table generating function) extensions. Custom libraries can be added on via Settings-page or installed from WhereOS Store.

Related Post

Leave a Comment