Perform a trainable radial basis expansion, where the centers and
sizes of the basis functions are learned through a growing neural
gas.
The positions of RBFs correspond to position of the nodes of the neural gas
The sizes of the RBFs correspond to mean distance to the neighbouring nodes.
|
|
__init__(self,
start_poss=None,
eps_b=0.2,
eps_n=0.006,
max_age=50,
lambda_=100,
alpha=0.5,
d=0.995,
max_nodes=100,
input_dim=None,
dtype=None)
Initializes an object of type 'GrowingNeuralGasExpansionNode'. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
execute(self,
x)
Process the data contained in x. |
|
|
|
|
|
|
Inherited from unreachable.newobject:
__long__,
__native__,
__nonzero__,
__unicode__,
next
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__subclasshook__
|
|
|
|
|
|
|
|
|
_get_nearest_nodes(self,
x)
Return the two nodes in the graph that are nearest to x and their
squared distances. |
|
|
|
|
_insert_new_node(self)
Insert a new node in the graph where it is more necessary (i.e.
where the error is the largest). |
|
|
|
|
_move_node(self,
node,
x,
eps)
Move a node by eps in the direction x. |
|
|
|
|
|
|
|
|
|
|
|
|
tuple
|
nearest_neighbor(self,
input)
Assign each point in the input data to the nearest node in
the graph. Return the list of the nearest node instances, and
the list of distances. |
|
|
|
|
train(self,
input)
Update the internal structures according to the input data x. |
|
|
|
|
|
|
|
__call__(self,
x,
*args,
**kwargs)
Calling an instance of Node is equivalent to calling
its execute method. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_refcast(self,
x)
Helper function to cast arrays to the internal dtype. |
|
|
|
|
|
|
|
copy(self,
protocol=None)
Return a deep copy of the node. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inverse(self,
y,
*args,
**kwargs)
Invert y. |
|
|
|
|
is_training(self)
Return True if the node is in the training phase,
False otherwise. |
|
|
|
|
save(self,
filename,
protocol=-1)
Save a pickled serialization of the node to filename.
If filename is None, return a string. |
|
|
|
|
set_dtype(self,
t)
Set internal structures' dtype. |
|
|
|
|
|
|
|
|