29 #ifndef HUB_HEADER_GUARD
30 #define HUB_HEADER_GUARD
58 namespace SecureRecommendations {
77 void SetServer (
const std::shared_ptr<const Server> &server);
89 void DoAccuracyAnalysis ();
92 void DoPerformanceAnalysis ();
95 void DoTrafficAnalysis ();
150 void loadSafetyTestData (
const std::string &testFilesDirectory,
const std::string &safetyTestFilesPrefix);
153 TestDataRow parseTestDataRow (
const std::string &line)
const;
156 unsigned short getVotedCluster (
const std::vector<Paillier::Ciphertext> &encryptedClusterVotes)
const;
159 std::vector<unsigned short> processSafetyPredictions (
const std::vector<Paillier::Ciphertext> &encryptedSafetyPredictions)
const;
162 unsigned int getMedicalRelevanceBlockCorrectPredictionCount ()
const;
165 void computeSafetyBlockFalsePredictions ();
168 static void resetTrafficCounters ();
171 std::string getKernelName ()
const;
177 Hub operator= (
Hub const &);
182 #endif//HUB_HEADER_GUARD
PaillierCiphertext Ciphertext
Provide public access to the T_Ciphertext type.
Definition of class Math.
std::vector< Paillier::Ciphertext > EncryptedVector
Define a vector template specialization for vectors of encrypted data.
std::vector< TestDataRow > medicalRelevanceTestData
The medical relevance block test data.
Processed test data container.
std::vector< unsigned short > predictedClusters
The predicted clusters.
std::vector< std::vector< unsigned short > > predictedQualityOfLifeMatrix
Vector of predicted quality of life values (contains 0 for negative values and 1 for positive values)...
unsigned long testVectorCount
SecureSvm::KernelTypes kernel
The SVM kernel type. We want to pre-compute only the data that is necessary for a particular kernel...
Definition of class Config.
static BigInteger bitsReceived
Counts the number of bits received from the server.
Paillier cryptoProvider
The crypto provider.
Definition of class Filesystem.
unsigned int attributeCount
The number of attributes in each test vector of the test data.
Definition of class DateTime.
static BigInteger bitsSent
Counts the numbe of bits sent to the server.
Implementation of the public-key Paillier Cryptosystem.
Definition of struct TestDataRow.
KernelTypes
Types of implemented kernels.
BigInteger svWeightScaling
The scaling applied to the SVM parameters, and .
Definition of class CpuTimer.
std::map< std::string, unsigned int > safetyBlockFalsePositives
Vector containing number of false positives per safety SVM.
Definition of class Paillier.
static bool measureTraffic
Enables traffic profiling.
std::vector< std::map< std::string, TestDataRow > > safetyTestData
The safety block test data array (vector of collection of rows; each file should have the same number...
std::shared_ptr< const Server > server
A reference to the recommendations server.
std::map< std::string, unsigned int > safetyBlockFalseNegatives
Vector containing number of false negatives per safety SVM.
~Hub()
Destructor - void implementation.
BigInteger featureScalingFactor
The scaling applied to the test and model vectors and .
Definition of class Server.
The public key container structure for the Paillier cryptosystem.