Aggregate

Aggregate functions that operate on a group of features to produce a single result.

class forml.io.dsl.function.Avg(arg: dsl.Operable)[source]

Average of the feature values.

Examples

>>> ETL = (
...     Student
...     .select(Student.level, function.Avg(Student.score))
...     .groupby(Student.level)
... )
class forml.io.dsl.function.Count(arg: dsl.Operable)[source]

Number of the input rows returned by query.

Examples

>>> ETL = (
...     Student
...     .select(Student.level, function.Count(Student.id))
...     .groupby(Student.level)
... )
class forml.io.dsl.function.Max(arg: dsl.Operable)[source]

Maximum of the feature values.

Examples

>>> ETL = (
...     Student
...     .select(Student.level, function.Max(Student.score))
...     .groupby(Student.level)
... )
class forml.io.dsl.function.Min(arg: dsl.Operable)[source]

Minimum of the feature values.

Examples

>>> ETL = (
...     Student
...     .select(Student.level, function.Min(Student.score))
...     .groupby(Student.level)
... )
class forml.io.dsl.function.Sum(arg: dsl.Operable)[source]

Sum of the feature values.

Examples

>>> ETL = (
...     Run
...     .select(Run.month, function.Sum(Run.distance))
...     .groupby(Run.month)
... )