Encoder to convert FeatureVector from and to Eigen::Vector. More...
#include <FeatureVectorEncoder.h>
Public Member Functions | |
| FeatureVectorEncoder () | |
| Default Constructor. | |
| FeatureVectorEncoder (const std::vector< FeatureVector::ContainerTraversalEstimatorOption > &containerTraversalEstimatorOptions, const std::vector< DataLayoutOption > &dataLayoutOptions, const std::vector< Newton3Option > &newton3Options, const NumberSet< double > &cellSizeFactors, const InteractionTypeOption &interactionType) | |
| Constructor. | |
| void | setAllowedOptions (const std::vector< FeatureVector::ContainerTraversalEstimatorOption > &containerTraversalEstimatorOptions, const std::vector< DataLayoutOption > &dataLayoutOptions, const std::vector< Newton3Option > &newton3Options, const NumberSet< double > &cellSizeFactors) |
| Set allowed options. | |
| size_t | getOneHotDims () const |
| Get the dimensions of a one-hot encoded vector. | |
| const std::array< int, tunableDiscreteDims > & | getDiscreteRestrictions () const |
| Get the number of allowed options of each discrete dimension. | |
| Eigen::VectorXd | oneHotEncode (const FeatureVector &vec) const |
| Encode FeatureVector to Eigen::VectorXd using one-hot-encoding. | |
| FeatureVector | oneHotDecode (const Eigen::VectorXd &vec) |
| Decode one-hot-encoded VectorXd to FeatureVector. | |
| std::pair< Eigen::VectorXi, Eigen::VectorXd > | convertToCluster (const FeatureVector &vec, double iteration) const |
| Convert Feature vector to cluster representation for GaussianCluster. | |
| FeatureVector | convertFromCluster (const std::pair< Eigen::VectorXi, Eigen::VectorXd > &vec) |
| Inverse of convertToCluster. | |
| std::vector< std::pair< Eigen::VectorXi, double > > | clusterNeighboursManhattan1 (const Eigen::VectorXi &target) |
| Get cluster-encoded neighbours of given target with fixed weight. | |
| std::vector< std::pair< Eigen::VectorXi, double > > | clusterNeighboursManhattan1Container (const Eigen::VectorXi &target) |
| Get cluster-encoded neighbours of given target. | |
| std::vector< FeatureVector > | lhsSampleFeatures (size_t n, Random &rng) const |
| Create n latin-hypercube-samples from given featureSpace. | |
| std::vector< Eigen::VectorXd > | lhsSampleFeatureCluster (size_t n, Random &rng, double iteration) const |
| Create n latin-hypercube-samples from the continuous featureSpace and append a value representing the current iteration to each sample. | |
Encoder to convert FeatureVector from and to Eigen::Vector.
| autopas::FeatureVectorEncoder::FeatureVectorEncoder | ( | const std::vector< FeatureVector::ContainerTraversalEstimatorOption > & | containerTraversalEstimatorOptions, |
| const std::vector< DataLayoutOption > & | dataLayoutOptions, | ||
| const std::vector< Newton3Option > & | newton3Options, | ||
| const NumberSet< double > & | cellSizeFactors, | ||
| const InteractionTypeOption & | interactionType | ||
| ) |
Constructor.
| containerTraversalEstimatorOptions | |
| dataLayoutOptions | |
| newton3Options | |
| cellSizeFactors | |
| interactionType |
| std::vector< std::pair< Eigen::VectorXi, double > > autopas::FeatureVectorEncoder::clusterNeighboursManhattan1 | ( | const Eigen::VectorXi & | target | ) |
Get cluster-encoded neighbours of given target with fixed weight.
Neighbours are all configurations which differ in at most one configuration from target.
| target |
| std::vector< std::pair< Eigen::VectorXi, double > > autopas::FeatureVectorEncoder::clusterNeighboursManhattan1Container | ( | const Eigen::VectorXi & | target | ) |
Get cluster-encoded neighbours of given target.
Neighbours are all configurations which differ in at most one configuration from target. The weight is lowered if container is changed.
| target |
| autopas::FeatureVector autopas::FeatureVectorEncoder::convertFromCluster | ( | const std::pair< Eigen::VectorXi, Eigen::VectorXd > & | vec | ) |
Inverse of convertToCluster.
Convert cluster representation back to Feature vector while ignoring the iteration.
| vec | cluster encoded vector |
| std::pair< Eigen::VectorXi, Eigen::VectorXd > autopas::FeatureVectorEncoder::convertToCluster | ( | const FeatureVector & | vec, |
| double | iteration | ||
| ) | const |
Convert Feature vector to cluster representation for GaussianCluster.
Discrete values are encoded using their index in given std::vector. Additionally, append current iteration to the continuous tuple.
| vec | vector to encode |
| iteration | current iteration which may be scaled by some factor |
| const std::array< int, autopas::FeatureVectorEncoder::tunableDiscreteDims > & autopas::FeatureVectorEncoder::getDiscreteRestrictions | ( | ) | const |
Get the number of allowed options of each discrete dimension.
| size_t autopas::FeatureVectorEncoder::getOneHotDims | ( | ) | const |
Get the dimensions of a one-hot encoded vector.
| std::vector< Eigen::VectorXd > autopas::FeatureVectorEncoder::lhsSampleFeatureCluster | ( | size_t | n, |
| autopas::Random & | rng, | ||
| double | iteration | ||
| ) | const |
Create n latin-hypercube-samples from the continuous featureSpace and append a value representing the current iteration to each sample.
| n | number of samples |
| rng | |
| iteration | Current iteration which may be scaled by some factor. |
| std::vector< autopas::FeatureVector > autopas::FeatureVectorEncoder::lhsSampleFeatures | ( | size_t | n, |
| autopas::Random & | rng | ||
| ) | const |
Create n latin-hypercube-samples from given featureSpace.
| n | number of samples |
| rng |
| autopas::FeatureVector autopas::FeatureVectorEncoder::oneHotDecode | ( | const Eigen::VectorXd & | vec | ) |
Decode one-hot-encoded VectorXd to FeatureVector.
| vec | one-hot-encoded vector |
| Eigen::VectorXd autopas::FeatureVectorEncoder::oneHotEncode | ( | const FeatureVector & | vec | ) | const |
Encode FeatureVector to Eigen::VectorXd using one-hot-encoding.
| vec | vector to encode |
| void autopas::FeatureVectorEncoder::setAllowedOptions | ( | const std::vector< FeatureVector::ContainerTraversalEstimatorOption > & | containerTraversalEstimatorOptions, |
| const std::vector< DataLayoutOption > & | dataLayoutOptions, | ||
| const std::vector< Newton3Option > & | newton3Options, | ||
| const NumberSet< double > & | cellSizeFactors | ||
| ) |
Set allowed options.
All previously encoded vector can not be decoded anymore.
| containerTraversalEstimatorOptions | |
| dataLayoutOptions | |
| newton3Options | |
| cellSizeFactors |