Update of /cvsroot/jboost/jboost/src/jboost/monitor
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2628/src/jboost/monitor
Modified Files:
Monitor.java
Log Message:
Visualizing fluctuations.
Index: Monitor.java
===================================================================
RCS file: /cvsroot/jboost/jboost/src/jboost/monitor/Monitor.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Monitor.java 15 Aug 2008 21:38:13 -0000 1.11
--- Monitor.java 11 Sep 2008 21:25:45 -0000 1.12
***************
*** 17,21 ****
/**
* A class whose responsibility is to generate the log files that will later be
! * analyzed with perl scripts that were written for the C++ version of Atrees
*
* @author Yoav Freund
--- 17,21 ----
/**
* A class whose responsibility is to generate the log files that will later be
! * analyzed using scripts
*
* @author Yoav Freund
***************
*** 30,39 ****
private static final char SEPARATOR = ',';
-
/** a high-level log of the program's progress. */
private String infoFilename;
private PrintWriter infoStream;
-
/** training and testing streams and variables */
private int boostingPrintRate;
--- 30,37 ----
***************
*** 43,47 ****
private String testBoostingFilename;
-
/** a stream for logging resampling activity
private PrintWriter samplingStream;
--- 41,44 ----
***************
*** 193,196 ****
--- 190,197 ----
ArrayList tScores = tSet.calcScores(iter, combined, base);
ArrayList tLabelIndices = tSet.getBinaryLabels();
+
+ double[] tIndex=null;
+ if(tSet.hasIndex()) tIndex=tSet.getIndexes();
+
double[][] tWeights = null;
double[][] tPotentials = null;
***************
*** 208,212 ****
--- 209,219 ----
boostingStream.print("" + i + FIELD_SEPARATOR);
+ // If available, output the example index
+ if(tIndex != null) {
+ boostingStream.printf("%.0f"+FIELD_SEPARATOR,tIndex[i]);
+ }
+
// output the margins
+ // I think this field is not very useful and should be eliminated (YoavFreund 9/9/08)
tmp = ((double[]) tMargin.get(i));
for (j= 0; j < tmp.length; j++){
***************
*** 274,278 ****
}
-
/** output the scores distribution of the training set */
private void logBoosting(int iter, Predictor combined, Predictor base) {
--- 281,284 ----
***************
*** 290,295 ****
// print score when highest order digit in iter changes.
double m=
! java.lang.Math.floor(
! java.lang.Math.log(iter) / java.lang.Math.log(10.0));
int t= (int) java.lang.Math.pow(10.0, m);
if (iter == 0)
--- 296,300 ----
// print score when highest order digit in iter changes.
double m=
! java.lang.Math.floor(java.lang.Math.log(iter) / java.lang.Math.log(10.0));
int t= (int) java.lang.Math.pow(10.0, m);
if (iter == 0)
***************
*** 305,311 ****
}
-
-
-
/** close the monitor output files */
public void close() throws IOException {
--- 310,313 ----
|