private Instance generateInstance(Instances format,Random randomG,double stdDev,double[] center,String cName){
  Instance example;
  int numAtts=getNumAttributes();
  if (getClassFlag()) {
    numAtts++;
  }
  example=new DenseInstance(numAtts);
  example.setDataset(format);
  for (int i=0; i < getNumAttributes(); i++) {
    example.setValue(i,randomG.nextGaussian() * stdDev + center[i]);
  }
  if (getClassFlag()) {
    example.setClassValue(cName);
  }
  return example;
}

private Instance generateInstance ( Instances format , Random randomG , double stdDev , double [ ] center , String cName ) { Instance example ; int numAtts = getNumAttributes ( ) ; if ( getClassFlag ( ) ) { numAtts ++ ; } example = new DenseInstance ( numAtts ) ; example . setDataset ( format ) ; for ( int i = 0 ; i < getNumAttributes ( ) ; i ++ ) { example . setValue ( i , randomG . nextGaussian ( ) * stdDev + center [ i ] ) ; } if ( getClassFlag ( ) ) { example . setClassValue ( cName ) ; } return example ; }
generate an example of the dataset .
