Package rdkit :: Package ML :: Package Neural :: Module NetNode :: Class NetNode
[hide private]
[frames] | no frames]

Class NetNode

source code

a node in a neural network

  

Instance Methods [hide private]
 
Eval(self, valVect)
Given a set of inputs (valVect), returns the output of this node
source code
 
SetInputs(self, inputNodes)
Sets the input list
source code
 
GetInputs(self)
returns the input list
source code
 
SetWeights(self, weights)
Sets the weight list
source code
 
GetWeights(self)
returns the weight list
source code
 
__init__(self, nodeIndex, nodeList, inputNodes=None, weights=None, actFunc=<class 'rdkit.ML.Neural.ActFuncs.Sigmoid'>, actFuncParms=())
Constructor
source code
Method Details [hide private]

Eval(self, valVect)

source code 
Given a set of inputs (valVect), returns the output of this node

**Arguments**

 - valVect: a list of inputs

**Returns**

   the result of running the values in valVect through this node

SetInputs(self, inputNodes)

source code 
Sets the input list

**Arguments**

  - inputNodes: a list of _NetNode_s which are to be used as inputs

**Note**

  If this _NetNode_ already has weights set and _inputNodes_ is a different length,
  this will bomb out with an assertion.
  

SetWeights(self, weights)

source code 
Sets the weight list

**Arguments**

  - weights: a list of values which are to be used as weights

**Note**

  If this _NetNode_ already has _inputNodes_  and _weights_ is a different length,
  this will bomb out with an assertion.
  

__init__(self, nodeIndex, nodeList, inputNodes=None, weights=None, actFunc=<class 'rdkit.ML.Neural.ActFuncs.Sigmoid'>, actFuncParms=())
(Constructor)

source code 
Constructor

**Arguments**

  - nodeIndex: the integer index of this node in _nodeList_

  - nodeList: the list of other _NetNodes_ already in the network

  - inputNodes: a list of this node's inputs

  - weights: a list of this node's weights

  - actFunc: the activation function to be used here.  Must support the API
      of _ActFuncs.ActFunc_.

  - actFuncParms: a tuple of extra arguments to be passed to the activation function
      constructor.

**Note**
  There should be only one copy of _inputNodes_, every _NetNode_ just has a pointer
  to it so that changes made at one node propagate automatically to the others.