6 #ifndef DISMEC_SPARSE_H
7 #define DISMEC_SPARSE_H
Strong typedef for an int to signify a label id.
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
SparseModel(long num_features, long num_labels)
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 set_weights_for_label_unchecked(label_id_t label, const WeightVectorIn &weights) override
Unchecked version of set_weights_for_label().
bool has_sparse_weights() const override
whether this model stores the weights in a sparse format, or a dense format.
std::vector< SparseRealVector > m_Weights
void get_weights_for_label_unchecked(label_id_t label, Eigen::Ref< DenseRealVector > target) const override
Unchecked version of get_weights_for_label().
Specifies how to interpret a weight matrix for a partial model.