sentipy.lib package

Submodules

sentipy.lib.activations module

sentipy.lib.activations.linear(x)[source]

Implements a linear activation function

sentipy.lib.activations.tanh(x)[source]

Implements a tanh activation function

sentipy.lib.neuralnet module

class sentipy.lib.neuralnet.Network(hidden_layers: Tuple[List[sentipy.lib.neuralnet.Neuron]], output_neuron: sentipy.lib.neuralnet.Neuron)[source]

Bases: object

A neural network (fully-connected MLP) to implement the sentinel-2 toolbox algorithms

forward(input_arr: <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee7d50>) → <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee7d90>[source]

Completes a forward pass of the network, given an array of inputs.

class sentipy.lib.neuralnet.Neuron(weights: <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee7110>, bias: float, activation: str)[source]

Bases: object

Neuron in a Neural Network

Takes an arbitrary number of weights (depending on the number of incoming connections) activation must be one of ‘tansig’ or ‘linear’

calculate_potential(input_arr: <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee78d0>)[source]

Calculates the activation potential of the neuron given an input array

The length of the input array must match the number of weights (ie. the number of incoming connections)

forward(input_arr: <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee7310>) → <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee7890>[source]

Completes a forward pass of the neuron, given an input array, by applying the activation function to the neuron’s activation potential.

sentipy.lib.preprocessing module

class sentipy.lib.preprocessing.Normaliser(x_min: Union[float, <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368ee7f10>], x_max: Union[float, <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368eea090>])[source]

Bases: object

denormalise(x: Union[float, <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368eeaad0>]) → Union[float, <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368eeab90>][source]

Denormalise input x

Parameters:x – input value for denormalisation
Returns:denormalised value
normalise(x: Union[float, <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368eea150>]) → Union[float, <sphinx.ext.autodoc.importer._MockObject object at 0x7fa368eea210>][source]

Normalise input x

Parameters:x – input value for normalisation
Returns:normalised value

Module contents