24 #ifndef MODELPARAMETERSRBFN_H 25 #define MODELPARAMETERSRBFN_H 32 #include <eigen3/Eigen/Core> 61 return centers_.cols();
69 return centers_.rows();
76 void kernelActivations(
const Eigen::Ref<const Eigen::MatrixXd>& inputs, Eigen::MatrixXd& kernel_activations)
const;
81 void getParameterVectorMask(
const std::set<std::string> selected_values_labels, Eigen::VectorXi& selected_mask)
const;
85 return all_values_vector_size_;
91 const Eigen::VectorXd&
weights(
void)
const {
return weights_; }
96 inline void weights(Eigen::VectorXd& weights)
const { weights=weights_; }
102 Eigen::MatrixXd centers_;
103 Eigen::MatrixXd widths_;
104 Eigen::VectorXd weights_;
106 int all_values_vector_size_;
119 if (!caching_) clearCache();
126 mutable Eigen::MatrixXd inputs_cached_;
127 mutable Eigen::MatrixXd kernel_activations_cached_;
129 inline void clearCache(
void)
131 inputs_cached_.resize(0,0);
132 kernel_activations_cached_.resize(0,0);
152 template<
class Archive>
153 void serialize(Archive & ar,
const unsigned int version);
159 #include <boost/serialization/export.hpp> 166 #endif // #ifndef MODELPARAMETERSRBFN_H BOOST_CLASS_IMPLEMENTATION(DmpBbo::ModelParametersRBFN, boost::serialization::object_serializable)
Register this derived class.
int getExpectedInputDim(void) const
The expected dimensionality of the input data.
UnifiedModel * toUnifiedModel(void) const
Convert these model parameters to unified model parameters.
RBFN (Radial Basis Function Network) function approximator.
void kernelActivations(const Eigen::Ref< const Eigen::MatrixXd > &inputs, Eigen::MatrixXd &kernel_activations) const
Get the kernel activations for given inputs.
void set_caching(bool caching)
Turn caching for the function kernelActivations() on or off.
ModelParameters * clone(void) const
Return a pointer to a deep copy of the ModelParameters object.
BOOST_CLASS_EXPORT_KEY2(DmpBbo::TimeSystem,"TimeSystem")
Register this derived class.
int getParameterVectorAllSize(void) const
Get the size of the parameter values vector when it contains all available parameter values...
const Eigen::VectorXd & weights(void) const
Return the weights of the basis functions.
std::string toString(void) const
Returns a string representation of the object.
friend class boost::serialization::access
Give boost serialization access to private members.
The unified model, which can be used to represent the model of all other function approximators...
ModelParameters class header file.
void setParameterVectorAll(const Eigen::VectorXd &values)
Set all available parameter values with one vector.
void getParameterVectorAll(Eigen::VectorXd &all_values) const
Return a vector that returns all available parameter values.
Base class for all model parameters of function approximators.
void setParameterVectorModifierPrivate(std::string modifier, bool new_value)
Turn certain modifiers on or off, see Parameterizable::setParameterVectorModifier().
Model parameters for the Radial Basis Function Network (RBFN) function approximator.
void weights(Eigen::VectorXd &weights) const
Return the weights of the basis functions.
unsigned int getNumberOfBasisFunctions() const
Get the number of basis functions in this model.
void getParameterVectorMask(const std::set< std::string > selected_values_labels, Eigen::VectorXi &selected_mask) const
Get a mask for selecting parameters.
void getSelectableParameters(std::set< std::string > &selected_values_labels) const
Return all the names of the parameter types that can be selected.