eolearn.features.feature_extractor

A simple feature extraction module. The notation is from Hollstein [1].

The grammar of the language:

E -> T | T;E T -> I(T,T) | S(T,T) | D(T,T,T) | R(T,T) | B B -> B01 | B02 | B03 | … | B12

[1] http://www.mdpi.com/2072-4292/8/8/666

class eolearn.features.feature_extractor.Lexer(iterable=(), /)[source]

Bases: list

skip_whitespace()[source]
popleft()[source]
next()[source]
peek()[source]
class eolearn.features.feature_extractor.FeatureExtendedExtractor(expr)[source]

Bases: object

static ensure_follows(lexer, expected_ch)[source]
parse_E(lexer)[source]
parse_T(lexer)[source]
parse_I(lexer)[source]
parse_S(lexer)[source]
parse_R(lexer)[source]
parse_D(lexer)[source]
static parse_B(lexer)[source]
class eolearn.features.feature_extractor.FeatureExtractionTask(*args, **kwargs)[source]

Bases: eolearn.core.eotask.EOTask

Task that applies an algebraic expression on each value of the feature

Parameters

feature – A feature which will be transformed. If specified it will be saved under new feature name

Example: (FeatureType.DATA, ‘bands’) or (FeatureType.DATA, ‘bands’, ‘transformed_bands’)

Parameters

expression (str) – Algebraic expression that works on each value of the feature

execute(eopatch)[source]

Implement execute function