public FgsOrienter(DataSet dataSet){
  out.println("GES constructor");
  if (dataSet.isDiscrete()) {
    DataBox box=new VerticalIntDataBox(dataSet.getNumRows(),dataSet.getNumColumns());
    for (int i=0; i < dataSet.getNumRows(); i++) {
      for (int j=0; j < dataSet.getNumColumns(); j++) {
        box.set(i,j,dataSet.getInt(i,j));
      }
    }
    BoxDataSet dataSet1=new BoxDataSet(box,dataSet.getVariables());
    setDataSet(dataSet1);
    BDeuScore score=new BDeuScore(dataSet1);
    score.setSamplePrior(10);
    score.setStructurePrior(0.001);
    setDiscreteScore(score);
    setStructurePrior(0.001);
    setSamplePrior(10.);
  }
 else {
    setCovMatrix(new CovarianceMatrixOnTheFly(dataSet));
  }
  out.println("GES constructor done");
}

public FgsOrienter ( DataSet dataSet ) { out . println ( "GES constructor" ) ; if ( dataSet . isDiscrete ( ) ) { DataBox box = new VerticalIntDataBox ( dataSet . getNumRows ( ) , dataSet . getNumColumns ( ) ) ; for ( int i = 0 ; i < dataSet . getNumRows ( ) ; i ++ ) { for ( int j = 0 ; j < dataSet . getNumColumns ( ) ; j ++ ) { box . set ( i , j , dataSet . getInt ( i , j ) ) ; } } BoxDataSet dataSet1 = new BoxDataSet ( box , dataSet . getVariables ( ) ) ; setDataSet ( dataSet1 ) ; BDeuScore score = new BDeuScore ( dataSet1 ) ; score . setSamplePrior ( 10 ) ; score . setStructurePrior ( 0.001 ) ; setDiscreteScore ( score ) ; setStructurePrior ( 0.001 ) ; setSamplePrior ( 10. ) ; } else { setCovMatrix ( new CovarianceMatrixOnTheFly ( dataSet ) ) ; } out . println ( "GES constructor done" ) ; }
the data set must either be all continuous or all discrete .
