File feature_vector_numerical.hpp

class NumericalFeatureVector : public Vector<IndexedValue<float32>>
#include <feature_vector_numerical.hpp>

A feature vector that stores the values of training examples for a certain numerical feature, except for the examples associated with a sparse value.

Public Functions

NumericalFeatureVector(IndexedValue<float32> *array, uint32 numElements, float32 sparseValue = 0, bool sparse = false)
Parameters:
  • array – A pointer to an array of type IndexedValue<float32> that stores the values in the feature vector

  • numElements – The number of elements in the vector, excluding those associated with the sparse value

  • sparseValue – The value of sparse elements not explicitly stored in the vector

  • sparse – True, if there are any sparse elements not explicitly stored in the vector, false otherwise

NumericalFeatureVector(const NumericalFeatureVector &other)
Parameters:

other – A const reference to an object of type NumericalFeatureVector that should be copied

NumericalFeatureVector(NumericalFeatureVector &&other)
Parameters:

other – A reference to an object of type NumericalFeatureVector that should be moved

inline virtual ~NumericalFeatureVector() override

Public Members

float32 sparseValue

The value of sparse elements not explicitly stored in the vector.

bool sparse

True, if there are any sparse elements not explicitly stored in the vector, false otherwise.