Log transforms can often be helpful for heavily skewed numeric data.
Code Example
class Logarithm(TransformPrimitive):
"""Computes the logarithm of base 10 of a number.
"""
name = "logarithm"
input_types = [ColumnSchema(semantic_tags={"numeric"})]
return_type = ColumnSchema(logical_type=Double, semantic_tags={"numeric"})
compatibility = [Library.PANDAS, Library.DASK, Library.SPARK]
description_template = "the logarithm of {}"
def get_function(self):
return np.log10
Log transforms can often be helpful for heavily skewed numeric data.
Code Example