Version: 8.3.0
Methods dedicated to linear regression

Functions

PMMLLIB_EXPORT void PMMLlib::PMMLlib::AddRegressionModel (std::string modelName, PMMLMiningFunction functionName, std::string targetFieldName)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT void PMMLlib::PMMLlib::AddRegressionTable ()
 No property "intercept" will be set. More...
 
PMMLLIB_EXPORT void PMMLlib::PMMLlib::AddRegressionTable (double intercept)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT void PMMLlib::PMMLlib::AddNumericPredictor (std::string neuronName, int exponent, double coefficient)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT void PMMLlib::PMMLlib::AddPredictorTerm (double coefficient, std::vector< std::string > fieldRef)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT bool PMMLlib::PMMLlib::HasIntercept ()
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT double PMMLlib::PMMLlib::GetRegressionTableIntercept ()
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT int PMMLlib::PMMLlib::GetNumericPredictorNb ()
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT int PMMLlib::PMMLlib::GetPredictorTermNb ()
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT std::string PMMLlib::PMMLlib::GetNumericPredictorName (int num_pred_index)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT std::string PMMLlib::PMMLlib::GetPredictorTermName (int num_pred_index)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT double PMMLlib::PMMLlib::GetNumericPredictorCoefficient (int num_pred_index)
 (The coefficient is the value of property "coefficient") More...
 
PMMLLIB_EXPORT double PMMLlib::PMMLlib::GetPredictorTermCoefficient (int pred_term_index)
 (The coefficient is the value of property "coefficient") More...
 
PMMLLIB_EXPORT int PMMLlib::PMMLlib::GetPredictorTermFieldRefNb (int pred_term_index)
 Specific to RegressionModel. More...
 
PMMLLIB_EXPORT std::string PMMLlib::PMMLlib::GetPredictorTermFieldRefName (int pred_term_index, int field_index)
 (The name is the value of property "field") More...
 
PMMLLIB_EXPORT std::string PMMLlib::PMMLlib::ReadRegressionStructure ()
 Specific to RegressionModel. More...
 
xmlNodePtr PMMLlib::PMMLlib::GetRegressionPtr (int reg_index)
 
xmlNodePtr PMMLlib::PMMLlib::GetRegressionPtr (std::string reg_name)
 
void PMMLlib::PMMLlib::CheckRegression ()
 Called in all methods specific to the RegressionModel model. More...
 

Detailed Description

Methods dedicated to linear regression

Function Documentation

void PMMLlib::PMMLlib::AddNumericPredictor ( std::string  neuronName,
int  exponent,
double  coefficient 
)

Specific to RegressionModel.

Add a numeric predictor to the Regression model.

Parameters
neuronNameValue of property "name"
exponentValue of property "exponent"
coefficientValue of property "coefficient"

Definition at line 2310 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentNode, and PMMLlib::PMMLlib::CheckRegression().

2313 {
2314  CheckRegression();
2315  stringstream ss;
2316  xmlNodePtr numPrecNode = xmlNewChild(_currentNode, 0, (const xmlChar*)"NumericPredictor", 0);
2317  xmlNewProp(numPrecNode, (const xmlChar*)"name", (const xmlChar*)(neuronName.c_str()) );
2318  ss.str(""); ss << exponent;
2319  xmlNewProp(numPrecNode, (const xmlChar*)"exponent", (const xmlChar*)(ss.str().c_str()) );
2320  ss.str(""); ss << scientific << coefficient;
2321  xmlNewProp(numPrecNode, (const xmlChar*)"coefficient", (const xmlChar*)(ss.str().c_str()) );
2322 }
void PMMLlib::PMMLlib::AddPredictorTerm ( double  coefficient,
std::vector< std::string >  fieldRef 
)

Specific to RegressionModel.

Add a predictor term to the Regression model.

Parameters
coefficientValue of property "coefficient"
fieldRefList of values for property "field", one per FieldRef to add to the PredictorTerm

Definition at line 2330 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentNode, and PMMLlib::PMMLlib::CheckRegression().

2332 {
2333  CheckRegression();
2334  stringstream ss;
2335  xmlNodePtr predTermNode = xmlNewChild(_currentNode, 0, (const xmlChar*)"PredictorTerm", 0);
2336  ss.str(""); ss << scientific << coefficient;
2337  xmlNewProp(predTermNode, (const xmlChar*)"coefficient", (const xmlChar*)(ss.str().c_str()) );
2338  vector<string>::iterator it;
2339  for(it=fieldRef.begin() ; it!=fieldRef.end() ; it++)
2340  {
2341  xmlNodePtr fieldRefNode = xmlNewChild(predTermNode, 0, (const xmlChar*)"FieldRef", 0);
2342  ss.str(""); ss << (*it);
2343  xmlNewProp(fieldRefNode, (const xmlChar*)"field", (const xmlChar*)(ss.str().c_str()) );
2344  }
2345 }
void PMMLlib::PMMLlib::AddRegressionModel ( std::string  modelName,
PMMLMiningFunction  functionName,
std::string  targetFieldName 
)

Specific to RegressionModel.

Add a RegressionModel to the root node

Parameters
modelNameName of the model (Value of property "modelName")
functionNameValue of property "functionName"
targetFieldNameValue of Property "targetFieldName"

Definition at line 2249 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelName, PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentModelType, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::CheckRegression(), PMMLlib::kLR, and PMMLlib::kREGRESSION.

2252 {
2254  _currentModelName = modelName;
2255  // Check regression after setting model type!
2256  CheckRegression();
2257 
2258  string function;
2259  switch(functionName)
2260  {
2261  case kREGRESSION:
2262  function = "regression";
2263  break;
2264  }
2265  xmlNodePtr netNode = xmlNewChild(_rootNode, 0, (const xmlChar*)"RegressionModel", 0);
2266  xmlNewProp(netNode, (const xmlChar*)"functionName", (const xmlChar*)(function.c_str()) );
2267  xmlNewProp(netNode, (const xmlChar*)"modelName", (const xmlChar*)(_currentModelName.c_str()) );
2268  xmlNewProp(netNode, (const xmlChar*)"targetFieldName", (const xmlChar*)(targetFieldName.c_str()) );
2269  _currentModelNode = netNode ;
2270 }
void PMMLlib::PMMLlib::AddRegressionTable ( )

No property "intercept" will be set.

Add a RegressionTable to the Regression model. Specific to RegressionModel

Definition at line 2277 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentNode, and PMMLlib::PMMLlib::CheckRegression().

2278 {
2279  CheckRegression();
2280  xmlNodePtr tableNode = xmlNewChild(_currentModelNode, 0, (const xmlChar*)"RegressionModel", 0);
2281  _currentNode = tableNode;
2282 }
void PMMLlib::PMMLlib::AddRegressionTable ( double  intercept)

Specific to RegressionModel.

Add a RegressionTable to the Regression model with a given value of property "intercept".

Parameters
interceptValue of property "intercept"

Definition at line 2289 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentNode, and PMMLlib::PMMLlib::CheckRegression().

2290 {
2291  CheckRegression();
2292 
2293  stringstream ss;
2294  xmlNodePtr tableNode = xmlNewChild(_currentModelNode, 0, (const xmlChar*)"RegressionTable", 0);
2295  if(intercept!=0.0)
2296  {
2297  ss << scientific << intercept;
2298  xmlNewProp(tableNode, (const xmlChar*)"intercept", (const xmlChar*)(ss.str().c_str()) );
2299  }
2300  _currentNode = tableNode;
2301 }
double PMMLlib::PMMLlib::GetNumericPredictorCoefficient ( int  num_pred_index)

(The coefficient is the value of property "coefficient")

Get the coefficient of the numeric predictor given by its index. Specific to RegressionModel

Parameters
num_pred_indexIndex of the numeric predictor
Returns
Coefficient of the numeric predictor

Definition at line 2504 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2505 {
2506  CheckRegression();
2507 
2508  double coef = 0.;
2509  xmlNodePtr numPredNodes = GetChildByName(_currentModelNode,"RegressionTable");
2510  if ( numPredNodes == NULL )
2511  return coef;
2512  numPredNodes = GetChildByName(numPredNodes,"NumericPredictor");
2513  if ( numPredNodes == NULL )
2514  return coef;
2515  // Positionnement sur la bonne sortie
2516  for(int i=0;i<num_pred_index;i++)
2517  {
2518  numPredNodes = numPredNodes->next;
2519  if ( numPredNodes == NULL ||
2520  string((const char*)(numPredNodes->name)) != "NumericPredictor" )
2521  return coef;
2522  }
2523  string strValue = _getProp(numPredNodes, string("coefficient"));
2524  coef = atof(strValue.c_str());
2525  return coef;
2526 }
std::string PMMLlib::PMMLlib::GetNumericPredictorName ( int  num_pred_index)

Specific to RegressionModel.

Get the name of the numeric predictor given by its index.

Parameters
num_pred_indexIndex of the numeric predictor
Returns
Name of the numeric predictor

Definition at line 2439 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2440 {
2441  CheckRegression();
2442  string strName("");
2443  xmlNodePtr numPredNodes = GetChildByName(_currentModelNode,"RegressionTable");
2444  if ( numPredNodes == NULL )
2445  return strName;
2446 
2447  numPredNodes = GetChildByName(numPredNodes,"NumericPredictor");
2448  if ( numPredNodes == NULL )
2449  return strName;
2450  // Positionnement sur la bonne sortie PredictorTerm
2451  for(int i=0;i<num_pred_index;i++)
2452  {
2453  numPredNodes = numPredNodes->next;
2454  if ( numPredNodes == NULL ||
2455  string((const char*)(numPredNodes->name)) != "NumericPredictor" )
2456  return strName;
2457  }
2458  strName = _getProp(numPredNodes, string("name"));
2459  return strName;
2460 }
int PMMLlib::PMMLlib::GetNumericPredictorNb ( )

Specific to RegressionModel.

Get the number of numeric predictors.

Returns
Number of numeric predictors

Definition at line 2393 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckRegression(), and PMMLlib::PMMLlib::GetChildByName().

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2394 {
2395  CheckRegression();
2396 
2397  int nb=0;
2398  xmlNodePtr tableNode = GetChildByName(_currentModelNode,"RegressionTable");
2399  if ( tableNode == NULL )
2400  return nb;
2401  xmlNodePtr numPredNodes = tableNode->children;
2402  while (numPredNodes != NULL )
2403  {
2404  if ( string((const char*)(numPredNodes->name)) == "NumericPredictor" )
2405  nb++;
2406  numPredNodes = numPredNodes->next;
2407  }
2408  return nb;
2409 }
double PMMLlib::PMMLlib::GetPredictorTermCoefficient ( int  pred_term_index)

(The coefficient is the value of property "coefficient")

Get the coefficient of the predictor term given by its index. Specific to RegressionModel

Parameters
pred_term_indexIndex of the predictor term
Returns
Coefficient of the predictor term

Definition at line 2535 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2536 {
2537  CheckRegression();
2538 
2539  double coef = 0.;
2540  xmlNodePtr predTermNodes = GetChildByName(_currentModelNode,"RegressionTable");
2541  if ( predTermNodes == NULL )
2542  return coef;
2543  predTermNodes = GetChildByName(predTermNodes,"PredictorTerm");
2544  if ( predTermNodes == NULL )
2545  return coef;
2546  // Positionnement sur la bonne sortie
2547  for(int i=0;i<pred_term_index;i++)
2548  {
2549  predTermNodes = predTermNodes->next;
2550  if ( predTermNodes == NULL ||
2551  string((const char*)(predTermNodes->name)) != "PredictorTerm" )
2552  return coef;
2553  }
2554  string strValue = _getProp(predTermNodes, string("coefficient"));
2555  coef = atof(strValue.c_str());
2556  return coef;
2557 }
std::string PMMLlib::PMMLlib::GetPredictorTermFieldRefName ( int  pred_term_index,
int  field_index 
)

(The name is the value of property "field")

Get the name of the field_index-th FieldRef for the pred_term_index-th predictor term. Specific to RegressionModel

Parameters
pred_term_indexIndex of the predictor term
field_indexIndex of the FieldRef
Returns
Name of the FieldRef

Definition at line 2601 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.

2602 {
2603  CheckRegression();
2604 
2605  string strName("");
2606  xmlNodePtr fieldRefNodes = GetChildByName(_currentModelNode,"RegressionTable");
2607  if ( fieldRefNodes == NULL )
2608  return strName;
2609  fieldRefNodes = GetChildByName(fieldRefNodes,"PredictorTerm");
2610  if ( fieldRefNodes == NULL )
2611  return strName;
2612  // Positionnement sur la bonne sortie PredictorTerm
2613  for(int i=0;i<pred_term_index;i++)
2614  {
2615  fieldRefNodes = fieldRefNodes->next;
2616  if ( fieldRefNodes == NULL ||
2617  string((const char*)(fieldRefNodes->name)) != "PredictorTerm" )
2618  return strName;
2619  }
2620  fieldRefNodes = fieldRefNodes->children;
2621  if ( fieldRefNodes == NULL )
2622  return strName;
2623  // Positionnement sur la bonne sortie FieldRef
2624  for(int i=0;i<field_index;i++)
2625  {
2626  fieldRefNodes = fieldRefNodes->next;
2627  if ( fieldRefNodes == NULL )
2628  return strName;
2629  }
2630  strName = _getProp(fieldRefNodes, string("field"));
2631  return strName;
2632 }
int PMMLlib::PMMLlib::GetPredictorTermFieldRefNb ( int  index)

Specific to RegressionModel.

Get the number of FieldRef for the predictor term given by its index.

Parameters
indsexIndex of the predictor term
Returns
Number of FieldRef

Definition at line 2565 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckRegression(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.

2566 {
2567  CheckRegression();
2568 
2569  int nb=0;
2570  xmlNodePtr fieldRefNodes = GetChildByName(_currentModelNode,"RegressionTable");
2571  if ( fieldRefNodes == NULL )
2572  return nb;
2573  fieldRefNodes = GetChildByName(fieldRefNodes,"PredictorTerm");
2574  if ( fieldRefNodes == NULL )
2575  return nb;
2576  // Positionnement sur la bonne sortie
2577  for(int i=0;i<index;i++)
2578  {
2579  fieldRefNodes = fieldRefNodes->next;
2580  if ( fieldRefNodes == NULL ||
2581  string((const char*)(fieldRefNodes->name)) != "PredictorTerm" )
2582  return nb;
2583  }
2584  fieldRefNodes = fieldRefNodes->children;
2585  while (fieldRefNodes != NULL)
2586  {
2587  nb++;
2588  fieldRefNodes = fieldRefNodes->next;
2589  }
2590  return nb;
2591 }
std::string PMMLlib::PMMLlib::GetPredictorTermName ( int  pred_term_index)

Specific to RegressionModel.

Get the name of the predictor term given by its index.

Parameters
pred_term_indexIndex of the predictor term
Returns
Name of the predictor term

Definition at line 2468 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2469 {
2470  CheckRegression();
2471  string strName("");
2472  xmlNodePtr fieldRefNodes = GetChildByName(_currentModelNode,"RegressionTable");
2473  if ( fieldRefNodes == NULL )
2474  return strName;
2475 
2476  fieldRefNodes = GetChildByName(fieldRefNodes,"PredictorTerm");
2477  if ( fieldRefNodes == NULL )
2478  return strName;
2479  // Positionnement sur la bonne sortie
2480  for(int i=0;i<pred_term_index;i++)
2481  {
2482  fieldRefNodes = fieldRefNodes->next;
2483  if ( fieldRefNodes == NULL ||
2484  string((const char*)(fieldRefNodes->name)) != "PredictorTerm" )
2485  return strName;
2486  }
2487 
2488  fieldRefNodes = fieldRefNodes->children;
2489  while (fieldRefNodes != NULL)
2490  {
2491  strName += _getProp(fieldRefNodes, string("field"));
2492  fieldRefNodes = fieldRefNodes->next;
2493  }
2494  return strName;
2495 }
int PMMLlib::PMMLlib::GetPredictorTermNb ( )

Specific to RegressionModel.

Get the number of predictor terms.

Returns
Number of predictor terms

Definition at line 2416 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckRegression(), and PMMLlib::PMMLlib::GetChildByName().

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2417 {
2418  CheckRegression();
2419  int nb=0;
2420  xmlNodePtr tableNode = GetChildByName(_currentModelNode,"RegressionTable");
2421  if ( tableNode == NULL )
2422  return nb;
2423  xmlNodePtr numPredNodes = tableNode->children;
2424  while ( numPredNodes != NULL )
2425  {
2426  if ( string((const char*)(numPredNodes->name)) == "PredictorTerm" )
2427  nb++;
2428  numPredNodes = numPredNodes->next;
2429  }
2430  return nb;
2431 }
xmlNodePtr PMMLlib::PMMLlib::GetRegressionPtr ( int  reg_index)
private
xmlNodePtr PMMLlib::PMMLlib::GetRegressionPtr ( std::string  name)
private

Get the pointeur to the regression model node.

Parameters
nameName of the regression model
Returns
Pointer to the XML node

Definition at line 2237 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::GetPtr(), and PMMLlib::PMMLlib::GetTypeString().

2238 {
2239  return GetPtr(name, GetTypeString() );
2240 }
double PMMLlib::PMMLlib::GetRegressionTableIntercept ( )

Specific to RegressionModel.

Get the value of property "intercept" in the RegressionTable.

Returns
Value of property "intercept"

Definition at line 2377 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), and PMMLlib::PMMLlib::GetChildByName().

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2378 {
2379  CheckRegression();
2380  double reg = 0.;
2381  xmlNodePtr tableNode = GetChildByName(_currentModelNode,"RegressionTable");
2382  if ( tableNode == NULL )
2383  return reg;
2384  string strValue = _getProp(tableNode, string("intercept") );
2385  return atof(strValue.c_str());
2386 }
bool PMMLlib::PMMLlib::HasIntercept ( )

Specific to RegressionModel.

Check if the RegressionTable has a property called "intercept".

Returns
true if it has, false otherwise

Definition at line 2352 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_stringToXmlChar(), gui.CONNECTOR::b, PMMLlib::PMMLlib::CheckRegression(), and PMMLlib::PMMLlib::GetChildByName().

Referenced by PMMLlib::PMMLlib::ExportLinearRegressionCpp(), PMMLlib::PMMLlib::ExportLinearRegressionFortran(), and PMMLlib::PMMLlib::ExportLinearRegressionPyStr().

2353 {
2354  CheckRegression();
2355  bool b = false;
2356  xmlNodePtr tableNode = GetChildByName(_currentModelNode,"RegressionTable");
2357  if ( tableNode == NULL )
2358  return b;
2359  xmlChar *xp = _stringToXmlChar("intercept");
2360  xmlChar * attr ;
2361  attr = xmlGetProp(tableNode, xp);
2362  if ( attr )
2363  {
2364  xmlFree(attr);
2365  xmlFree(xp);
2366  return true;
2367  }
2368  xmlFree(xp);
2369  return false;
2370 }
std::string PMMLlib::PMMLlib::ReadRegressionStructure ( )

Specific to RegressionModel.

Read the structure of the regression model

Returns
Structure read

Definition at line 2874 of file PMMLlib.cxx.

References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckRegression(), and PMMLlib::PMMLlib::GetChildByName().

2875 {
2876  CheckRegression();
2877 
2878  string structure("");
2879  string structureActive("");
2880  string structurePredicted("@");
2881  int nPred = 0;
2882  xmlNodePtr mNode = GetChildByName(_currentModelNode,"MiningSchema");
2883  if ( mNode != NULL )
2884  {
2885  xmlNodePtr dNode = GetChildByName(mNode,"MiningField");
2886  while (dNode != NULL)
2887  {
2888  string name = _getProp(dNode, string("name"));
2889  string usage = _getProp(dNode, string("usageType"));
2890  if ( usage == "active" )
2891  {
2892  structureActive += name;
2893  structureActive += ":";
2894  }
2895  else if ( usage == "predicted" )
2896  {
2897  structurePredicted += name;
2898  structurePredicted += ":";
2899  nPred++;
2900  }
2901  dNode = dNode->next;
2902  }
2903  // Delete the last ":"
2904  if ( structureActive.length() > 0 )
2905  structureActive.erase(structureActive.size()-1);
2906  structurePredicted.erase(structurePredicted.size()-1);
2907  }
2908  std::ostringstream oss;
2909  oss << nPred;
2910  structure = structureActive + "," + oss.str() + "," + structurePredicted;
2911  return structure;
2912 }