ArimaPlain#
- class ArimaPlain#
A class representing a plaintext Arima model
-
class ArimaPlain : public helayers::PlainModel#
The Arima class is an FHE implementation of an Arima(P,1,1) time series prediction model.
This class (ArimaPlain) is the plain version of an encrypted Arima model. The ArimaPlain version can be decrypted from the encrypted Arima model by the secret key owner using the decryptDecode() method of the Arima object (see example in arima_example.cpp). The secret key owner may then proceed to use examine the model parameters or use it to make predictions in plaintext.
Public Functions
-
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
-
double getErrorVariance() const#
Get the variance of the error component (e) of the Arima model as observed in the input samples when these were considered as corresponding to the model: x_(t+1) = mu + sum(phi[i]*x[t-i]) + theta1*e[t] + e_[t+1] This variance can then be used to assess the accuracy of predictions made using the model (see arima_example.cpp).
- Returns:
The variance of the error component (e) of the Arima model
-
virtual std::shared_ptr<HeModel> getEmptyHeModel(const HeContext &he) const override#
Get an Empty Arima HeModel object.
-
inline virtual std::string getClassName() const override#
Returns the name of this class.
-
virtual std::vector<PlainTensorMetadata> getInputsPlainTensorMetadata() const override#
Returns a vector of PlainTensorMetadata objects.
The i-th element of this vector contains metadata relating to the i-th input of this PlainModel (such as shape and batch dimension). If this PlainModel is initialized for prediction, the returned vector describes inputs for the the predict() method. If this PlainModel is initialized for fitting, the returned vector describes the inputs for the fit() method.
-
virtual void debugPrint(const std::string &title = "", Verbosity verbosity = VERBOSITY_REGULAR, std::ostream &out = std::cout) const override#