Rosetta
Public Types | Public Member Functions | Public Attributes | List of all members
protocols::sparta::ANN Class Reference

#include <ANN.hh>

Public Types

typedef utility::vector0< float > ANN_Vector
 
typedef std::map< int, ANN_VectorANN_Matrix
 

Public Member Functions

 ANN ()
 
 ANN (const std::string &dPATH, const std::string &dNAME_PREFIX)
 
 ANN (int N1_nodeI, int N1_nodeH, int N1_nodeO, const std::string &dPATH, const std::string &dNAME_PREFIX)
 
 ANN (int N1_nodeI, int N1_nodeH, int N1_nodeO, int N2_nodeI, int N2_nodeH, int N2_nodeO, const std::string &dPATH, const std::string &dNAME_PREFIX)
 
void init (int N1_nodeI, int N1_nodeH, int N1_nodeO, int N2_nodeI, int N2_nodeH, int N2_nodeO, const std::string &dPATH, const std::string &dNAME_PREFIX)
 
void getSlashChar ()
 
void set_input_code (int c)
 
void loadWeights ()
 
void loadWeightBias3 (const std::string &fName, ANN_Matrix &W1, ANN_Vector &B1, ANN_Matrix &W2, ANN_Vector &B2, ANN_Matrix &W3, ANN_Vector &B3, int N_W_row, int N_W_col, int N_B)
 
void calcLevel1 ()
 
void calcLevel2 ()
 
void runSpartaANN (ANN_Matrix &inMatrix)
 
void applyANNTransformation (ANN_Vector &inp, ANN_Matrix &w, ANN_Vector &b, ANN_Vector &out, int code)
 
void applyVecAverage (ANN_Vector &v1, ANN_Vector &v2, ANN_Vector &v3, ANN_Vector &vout)
 
void applyVecNormalization (ANN_Vector &v)
 
float getConfidence (ANN_Vector &v)
 
int getNumberMissCS (ANN_Vector &v)
 
char * ftoa (float n, char *buff, platform::Size s, char f='g', int prec=6)
 
char * itoa (int n, char *buff, platform::Size s, int base=10)
 

Public Attributes

char buf [30]
 
std::string slash_char
 
int input_code
 
std::string DB_PATH
 
std::string DB_NAME_PREFIX
 
std::string DB_FNAME_LEVEL1_1
 
std::string DB_FNAME_LEVEL1_2
 
std::string DB_FNAME_LEVEL1_3
 
std::string DB_FNAME_LEVEL2_1
 
std::string DB_FNAME_LEVEL2_2
 
std::string DB_FNAME_LEVEL2_3
 
int N1_NODE_I
 
int N1_NODE_H
 
int N1_NODE_O
 
int N2_NODE_I
 
int N2_NODE_H
 
int N2_NODE_O
 
ANN_Matrix WI_1
 
ANN_Matrix WI_2
 
ANN_Matrix WI_3
 
ANN_Vector BI_1
 
ANN_Vector BI_2
 
ANN_Vector BI_3
 
ANN_Matrix WL1_1
 
ANN_Matrix WL1_2
 
ANN_Matrix WL1_3
 
ANN_Vector BL1_1
 
ANN_Vector BL1_2
 
ANN_Vector BL1_3
 
ANN_Matrix WL2_1
 
ANN_Matrix WL2_2
 
ANN_Matrix WL2_3
 
ANN_Vector BL2_1
 
ANN_Vector BL2_2
 
ANN_Vector BL2_3
 
ANN_Matrix W2I_1
 
ANN_Matrix W2I_2
 
ANN_Matrix W2I_3
 
ANN_Vector B2I_1
 
ANN_Vector B2I_2
 
ANN_Vector B2I_3
 
ANN_Matrix W2L1_1
 
ANN_Matrix W2L1_2
 
ANN_Matrix W2L1_3
 
ANN_Vector B2L1_1
 
ANN_Vector B2L1_2
 
ANN_Vector B2L1_3
 
ANN_Matrix W2L2_1
 
ANN_Matrix W2L2_2
 
ANN_Matrix W2L2_3
 
ANN_Vector B2L2_1
 
ANN_Vector B2L2_2
 
ANN_Vector B2L2_3
 
ANN_Matrix ANN_IN_MTX
 
ANN_Matrix ANN_IN_MTX_LEVEL1
 
ANN_Matrix ANN_IN_MTX_LEVEL2
 
ANN_Matrix ANN_OUT_MTX_LEVEL1
 
ANN_Matrix ANN_OUT_MTX_LEVEL2
 

Member Typedef Documentation

◆ ANN_Matrix

◆ ANN_Vector

typedef utility::vector0<float> protocols::sparta::ANN::ANN_Vector

Constructor & Destructor Documentation

◆ ANN() [1/4]

protocols::sparta::ANN::ANN ( )

◆ ANN() [2/4]

protocols::sparta::ANN::ANN ( const std::string &  dPATH,
const std::string &  dNAME_PREFIX 
)

◆ ANN() [3/4]

protocols::sparta::ANN::ANN ( int  N1_nodeI,
int  N1_nodeH,
int  N1_nodeO,
const std::string &  dPATH,
const std::string &  dNAME_PREFIX 
)

◆ ANN() [4/4]

protocols::sparta::ANN::ANN ( int  N1_nodeI,
int  N1_nodeH,
int  N1_nodeO,
int  N2_nodeI,
int  N2_nodeH,
int  N2_nodeO,
const std::string &  dPATH,
const std::string &  dNAME_PREFIX 
)

Member Function Documentation

◆ applyANNTransformation()

void protocols::sparta::ANN::applyANNTransformation ( ANN_Vector inp,
ANN_Matrix w,
ANN_Vector b,
ANN_Vector out,
int  code 
)

◆ applyVecAverage()

void protocols::sparta::ANN::applyVecAverage ( ANN_Vector v1,
ANN_Vector v2,
ANN_Vector v3,
ANN_Vector vout 
)

Referenced by calcLevel1(), and calcLevel2().

◆ applyVecNormalization()

void protocols::sparta::ANN::applyVecNormalization ( ANN_Vector v)

◆ calcLevel1()

void protocols::sparta::ANN::calcLevel1 ( )

◆ calcLevel2()

void protocols::sparta::ANN::calcLevel2 ( )

◆ ftoa()

char * protocols::sparta::ANN::ftoa ( float  n,
char *  buff,
platform::Size  s,
char  f = 'g',
int  prec = 6 
)

◆ getConfidence()

float protocols::sparta::ANN::getConfidence ( ANN_Vector v)

References MAX, and MIN.

◆ getNumberMissCS()

int protocols::sparta::ANN::getNumberMissCS ( ANN_Vector v)

◆ getSlashChar()

void protocols::sparta::ANN::getSlashChar ( )

References slash_char.

Referenced by ANN(), and init().

◆ init()

void protocols::sparta::ANN::init ( int  N1_nodeI,
int  N1_nodeH,
int  N1_nodeO,
int  N2_nodeI,
int  N2_nodeH,
int  N2_nodeO,
const std::string &  dPATH,
const std::string &  dNAME_PREFIX 
)

◆ itoa()

char * protocols::sparta::ANN::itoa ( int  n,
char *  buff,
platform::Size  s,
int  base = 10 
)

Referenced by loadWeightBias3().

◆ loadWeightBias3()

void protocols::sparta::ANN::loadWeightBias3 ( const std::string &  fName,
ANN_Matrix W1,
ANN_Vector B1,
ANN_Matrix W2,
ANN_Vector B2,
ANN_Matrix W3,
ANN_Vector B3,
int  N_W_row,
int  N_W_col,
int  N_B 
)

◆ loadWeights()

void protocols::sparta::ANN::loadWeights ( )

◆ runSpartaANN()

void protocols::sparta::ANN::runSpartaANN ( ANN_Matrix inMatrix)

References ANN_IN_MTX_LEVEL1, and calcLevel1().

◆ set_input_code()

void protocols::sparta::ANN::set_input_code ( int  c)

References input_code.

Member Data Documentation

◆ ANN_IN_MTX

ANN_Matrix protocols::sparta::ANN::ANN_IN_MTX

◆ ANN_IN_MTX_LEVEL1

ANN_Matrix protocols::sparta::ANN::ANN_IN_MTX_LEVEL1

Referenced by calcLevel1(), and runSpartaANN().

◆ ANN_IN_MTX_LEVEL2

ANN_Matrix protocols::sparta::ANN::ANN_IN_MTX_LEVEL2

Referenced by calcLevel2().

◆ ANN_OUT_MTX_LEVEL1

ANN_Matrix protocols::sparta::ANN::ANN_OUT_MTX_LEVEL1

Referenced by calcLevel1().

◆ ANN_OUT_MTX_LEVEL2

ANN_Matrix protocols::sparta::ANN::ANN_OUT_MTX_LEVEL2

Referenced by calcLevel2().

◆ B2I_1

ANN_Vector protocols::sparta::ANN::B2I_1

Referenced by calcLevel2().

◆ B2I_2

ANN_Vector protocols::sparta::ANN::B2I_2

Referenced by calcLevel2().

◆ B2I_3

ANN_Vector protocols::sparta::ANN::B2I_3

Referenced by calcLevel2().

◆ B2L1_1

ANN_Vector protocols::sparta::ANN::B2L1_1

Referenced by calcLevel2().

◆ B2L1_2

ANN_Vector protocols::sparta::ANN::B2L1_2

Referenced by calcLevel2().

◆ B2L1_3

ANN_Vector protocols::sparta::ANN::B2L1_3

Referenced by calcLevel2().

◆ B2L2_1

ANN_Vector protocols::sparta::ANN::B2L2_1

Referenced by calcLevel2().

◆ B2L2_2

ANN_Vector protocols::sparta::ANN::B2L2_2

Referenced by calcLevel2().

◆ B2L2_3

ANN_Vector protocols::sparta::ANN::B2L2_3

Referenced by calcLevel2().

◆ BI_1

ANN_Vector protocols::sparta::ANN::BI_1

Referenced by calcLevel1(), and loadWeights().

◆ BI_2

ANN_Vector protocols::sparta::ANN::BI_2

Referenced by calcLevel1(), and loadWeights().

◆ BI_3

ANN_Vector protocols::sparta::ANN::BI_3

Referenced by calcLevel1(), and loadWeights().

◆ BL1_1

ANN_Vector protocols::sparta::ANN::BL1_1

Referenced by calcLevel1(), and loadWeights().

◆ BL1_2

ANN_Vector protocols::sparta::ANN::BL1_2

Referenced by calcLevel1(), and loadWeights().

◆ BL1_3

ANN_Vector protocols::sparta::ANN::BL1_3

Referenced by calcLevel1(), and loadWeights().

◆ BL2_1

ANN_Vector protocols::sparta::ANN::BL2_1

Referenced by calcLevel1(), and loadWeights().

◆ BL2_2

ANN_Vector protocols::sparta::ANN::BL2_2

Referenced by calcLevel1(), and loadWeights().

◆ BL2_3

ANN_Vector protocols::sparta::ANN::BL2_3

Referenced by calcLevel1(), and loadWeights().

◆ buf

char protocols::sparta::ANN::buf[30]

Referenced by loadWeightBias3().

◆ DB_FNAME_LEVEL1_1

std::string protocols::sparta::ANN::DB_FNAME_LEVEL1_1

◆ DB_FNAME_LEVEL1_2

std::string protocols::sparta::ANN::DB_FNAME_LEVEL1_2

◆ DB_FNAME_LEVEL1_3

std::string protocols::sparta::ANN::DB_FNAME_LEVEL1_3

◆ DB_FNAME_LEVEL2_1

std::string protocols::sparta::ANN::DB_FNAME_LEVEL2_1

◆ DB_FNAME_LEVEL2_2

std::string protocols::sparta::ANN::DB_FNAME_LEVEL2_2

◆ DB_FNAME_LEVEL2_3

std::string protocols::sparta::ANN::DB_FNAME_LEVEL2_3

◆ DB_NAME_PREFIX

std::string protocols::sparta::ANN::DB_NAME_PREFIX

Referenced by ANN(), init(), and loadWeights().

◆ DB_PATH

std::string protocols::sparta::ANN::DB_PATH

Referenced by ANN(), init(), and loadWeights().

◆ input_code

int protocols::sparta::ANN::input_code

Referenced by ANN(), init(), and set_input_code().

◆ N1_NODE_H

int protocols::sparta::ANN::N1_NODE_H

Referenced by ANN(), init(), and loadWeights().

◆ N1_NODE_I

int protocols::sparta::ANN::N1_NODE_I

Referenced by ANN(), init(), and loadWeights().

◆ N1_NODE_O

int protocols::sparta::ANN::N1_NODE_O

Referenced by ANN(), init(), and loadWeights().

◆ N2_NODE_H

int protocols::sparta::ANN::N2_NODE_H

Referenced by ANN(), and init().

◆ N2_NODE_I

int protocols::sparta::ANN::N2_NODE_I

Referenced by ANN(), and init().

◆ N2_NODE_O

int protocols::sparta::ANN::N2_NODE_O

Referenced by ANN(), and init().

◆ slash_char

std::string protocols::sparta::ANN::slash_char

Referenced by getSlashChar(), and loadWeights().

◆ W2I_1

ANN_Matrix protocols::sparta::ANN::W2I_1

Referenced by calcLevel2().

◆ W2I_2

ANN_Matrix protocols::sparta::ANN::W2I_2

Referenced by calcLevel2().

◆ W2I_3

ANN_Matrix protocols::sparta::ANN::W2I_3

Referenced by calcLevel2().

◆ W2L1_1

ANN_Matrix protocols::sparta::ANN::W2L1_1

Referenced by calcLevel2().

◆ W2L1_2

ANN_Matrix protocols::sparta::ANN::W2L1_2

Referenced by calcLevel2().

◆ W2L1_3

ANN_Matrix protocols::sparta::ANN::W2L1_3

Referenced by calcLevel2().

◆ W2L2_1

ANN_Matrix protocols::sparta::ANN::W2L2_1

Referenced by calcLevel2().

◆ W2L2_2

ANN_Matrix protocols::sparta::ANN::W2L2_2

Referenced by calcLevel2().

◆ W2L2_3

ANN_Matrix protocols::sparta::ANN::W2L2_3

Referenced by calcLevel2().

◆ WI_1

ANN_Matrix protocols::sparta::ANN::WI_1

Referenced by calcLevel1(), and loadWeights().

◆ WI_2

ANN_Matrix protocols::sparta::ANN::WI_2

Referenced by calcLevel1(), and loadWeights().

◆ WI_3

ANN_Matrix protocols::sparta::ANN::WI_3

Referenced by calcLevel1(), and loadWeights().

◆ WL1_1

ANN_Matrix protocols::sparta::ANN::WL1_1

Referenced by calcLevel1(), and loadWeights().

◆ WL1_2

ANN_Matrix protocols::sparta::ANN::WL1_2

Referenced by calcLevel1(), and loadWeights().

◆ WL1_3

ANN_Matrix protocols::sparta::ANN::WL1_3

Referenced by calcLevel1(), and loadWeights().

◆ WL2_1

ANN_Matrix protocols::sparta::ANN::WL2_1

Referenced by calcLevel1(), and loadWeights().

◆ WL2_2

ANN_Matrix protocols::sparta::ANN::WL2_2

Referenced by calcLevel1(), and loadWeights().

◆ WL2_3

ANN_Matrix protocols::sparta::ANN::WL2_3

Referenced by calcLevel1(), and loadWeights().


The documentation for this class was generated from the following files: