KMeansPlain#
- class KMeansPlain#
A plaintext representation of a KMeans model.
- set_centroids(self: pyhelayers.KMeansPlain, c: numpy.ndarray[numpy.float64]) None #
Set the Centroids. The input argument is a matrix of shape [num_centers,num_features], where the i’th row specifies the i’th centroid.
- Parameters:
c (numpy array of doubles) – The centroid matrix.
-
class KMeansPlain : public helayers::PlainModel#
A plaintext representation of a KMeans model.
Public Functions
-
KMeansPlain()#
Construct an empty object.
-
~KMeansPlain()#
Destructor.
-
KMeansPlain(const KMeansPlain &src) = delete#
Deleted copy constructor.
-
KMeansPlain &operator=(const KMeansPlain &src) = delete#
Deleted operator=.
-
void setCentroids(const DoubleTensor &c)#
Set the Centroids.
The input argument is a matrix of shape [num_centers,num_features], where the i’th row specifies the i’th centroid.
- Parameters:
c – The centroid matrix.
-
virtual std::shared_ptr<HeModel> getEmptyHeModel(const HeContext &he) const override#
Returns an empty HE KMeans object.
- Parameters:
he – the context
-
inline virtual std::string getClassName() const override#
Retunrs the name of this class.
-
virtual void debugPrint(const std::string &title = "", Verbosity verbosity = VERBOSITY_REGULAR, std::ostream &out = std::cout) const override#
Prints the content of this object.
- Parameters:
title – Text to add to the print
verbosity – Verbosity level
out – Output stream
-
KMeansPlain()#