Strong typedef for an int to signify a label id.
Implementation of the Model class that stores the weights as a single, dense matrix.
bool has_sparse_weights() const final
A dense model doesn't have sparse weights.
types::DenseColMajor< real_t > WeightMatrix
weight_matrix_ptr m_Weights
The matrix of weights.
const WeightMatrix & get_raw_weights() const
provides read-only access to the raw weight matrix.
void set_weights_for_label_unchecked(label_id_t label, const WeightVectorIn &weights) override
Unchecked version of set_weights_for_label().
long num_features() const override
How many weights are in each weight vector, i.e. how many features should the input have.
void predict_scores_unchecked(const FeatureMatrixIn &instances, PredictionMatrixOut target) const override
Unchecked version of predict_scores().
void get_weights_for_label_unchecked(label_id_t label, Eigen::Ref< DenseRealVector > target) const override
Unchecked version of get_weights_for_label().
std::shared_ptr< WeightMatrix > weight_matrix_ptr
DenseModel(const weight_matrix_ptr &weights)
Creates a (complete) dense model with the given weight matrix.
A model combines a set of weight with some meta-information about these weights.
GenericInMatrix FeatureMatrixIn
long num_labels() const noexcept
How many labels are in the underlying dataset.
Eigen::Ref< PredictionMatrix > PredictionMatrixOut
GenericInVector WeightVectorIn
outer_const< T, dense_col_major_h > DenseColMajor
Specifies how to interpret a weight matrix for a partial model.