Expands the input samples by applying to them one or more functions provided.
The functions to be applied are specified by a list [f_0, ..., f_k], where
f_i, for 0 <= i <= k, denotes a particular function.
The input data given to these functions is a two-dimensional array and
the output is another two-dimensional array. The dimensionality of the output
should depend only on the dimensionality of the input.
Given a two-dimensional input array x, the output of the node
is then [f_0(x), ..., f_k(x)], that is, the concatenation of each one of
the computed arrays f_i(x).
This node has been designed to facilitate nonlinear, fixed but arbitrary
transformations of the data samples within MDP flows.
Original code contributed by Alberto Escalante.
|
__init__(self,
funcs,
input_dim=None,
dtype=None)
Short argument description: |
|
|
|
|
|
execute(self,
x)
Process the data contained in x . |
|
|
|
expanded_dim(self,
n)
The expanded dim is computed by directly applying the expansion
functions f_i to a zero input of dimension n. |
|
|
|
output_sizes(self,
n)
Return the individual output sizes of each expansion function
when the input has lenght n. |
|
|
|
pseudo_inverse(self,
x,
use_hint=None)
Calculate a pseudo inverse of the expansion using
scipy.optimize. |
|
|
Inherited from unreachable._ExpansionNode (private):
_set_input_dim ,
_set_output_dim
Inherited from unreachable.newobject :
__long__ ,
__native__ ,
__nonzero__ ,
__unicode__ ,
next
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
|
|
__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. |
|
|
|
|
|
|
|
|
|
train(self,
x,
*args,
**kwargs)
Update the internal structures according to the input data x . |
|
|