

/*------------------------------------
   Filtering method (model) selection */

filterModel = 0; /*  0 = Rocchio; 1=Centroid; 2=kNN. No other options yet */

/* After how many Oracle judgments will the classifier	be updated. 
   Default is 1 (update after each judgment). 
   -1 means "never" (batch filtering) */
updateFreq = 1; 

/* Max number of classifier updates allowed per topic. (-1 = unlimited).
   Use a positive value, e.g. 10000, to cut cost of adaptive filtering. */
maxUpdateCnt = -1; 

/* This flag is used by the "ProjTest1" application only. If it is 0,
   we take the document with the exact rank=k, and find it's position
   in the approximate-ranking list (Lewis's approach); if it is 1,
   we take the document with the approx rank=k, and find it's position
   in the exact-ranking list (Ostrowski's approach); */
cmp.reverse=1;

/*-------------------------------------
Input files */

trainIndex = train-bindex.bsc; /* database index, prepared with LEMUR indexer*/
index = all-bindex.bsc; /* database index */
textQuery = query; /* query text stream */

trainQrelFile= train-qrel;  /* Qrel data file for TRAIN set */
testQrelFile = test-qrel;  /* Qrel data file for TEST set */
docOrderFile = doc-order; /* TEST set document order file */

/* How should the QREL files be interpreted? 0=all judgments are explicit
   (missing=U); 1=fully judged corpus (missing=N) */
train.fullyJudged=0;
test.fullyJudged=0;

/*--------------------------------------
 Output control */


/** This tag appears at the end of each output line, if TREC format is used */
runTag="DIMACSTest";

resultFile = "res.filter"; /* result file */
/* How many results to print per batch. This parameter
only control how often the output buffer is flushed;
it does not the actual computation. */
resultCount = 100;
/* 0 = simple-format (3 columns); 1 = TREC-format (6 col); 
2=Fradkin's 4-column fmt for fusion experiments */ 
resultFormat = 1; 

/* ResultLogModeType {LOG_ALL=0, LOG_SELECTED=1, LOG_ORACLE=2}; */

resultLogMode = 1;

/*-----------------------------------------
 Contingency tables will be printed to these files. Use an empty string ("")
as the value to avoid producing the table and save computation time */
/* Training set, scored by classifier after initial training */
trainTable = "train-table"; 
 /* Training set, scored by classifier before pseudofeedback. This file is
 only produced in methods with pseudo-feedback  */
train1Table = "train1-table";
/* Test set, scored during the actual filtering process */
testTable = "test-table";

/*-----------------------------------------
  (These params is for the Index2SVM application only). 
  The topic ID for which  we want to produce the output files, 
  to feed to Alex Genkin's Bayesian software, or to Andrei Anghelescu's
  aiSVM. */
/* The name of the topic whose labels will go to the output SVM files  */
svm.topic = "A101";
/* The name of the output SVM file describing the training set */
svm.trainOut = "train.dat";
/* The name of the output SVM file describing the test set */
svm.testOut = "test.dat";
/* Output QREL files in the one-line-per doc format needed by aiSVM. 
   Use an empty string for file name to disable this output. */
svm.trainQrelOut = "train.qrel.dat";
svm.testQrelOut = "test.qrel.dat";

/*--------------------------------------
 Random number generation */

/* The seed for random number generator (as used for pseudofeedback, etc).
  If it is &ge; 0, it it is passed to srnad().  
  If it is &lt; 0, no srand() call will be done.  */
randomSeed=1;

/*--------------------------------------
 Performance tuning */

/* How many queries are run "in parallel". A higher number reduces
the costs of reading document F data from disk, but increases memory needs */
queryBatch=100;

/* How many documents' TF info can be cached at once. Use 0 to disable
caching.  For efficient caching, the number should as large as the
total number of docs (in TRAIN + TEST) that are labeled (or
pseudo-labeled) during the processing of one query; but of course you
should keep RAM size in mind, and not set it so large as to cause
excessive swapping */

	
cache.maxDocCacheSize=10000;
cache.cacheAllDocs=0;
cache.clearForEachQuery=1;
cache.termCache=0;


/*----------------------------------------------------
Classifier parameters (common to all vector-sum based models,
i.e. both Rocchio and Centroid)
---------------------------------------------------- */

/*  (Formerly, qup.fw)  FW_NONE = 0,    FW_IDF = 1,     FW_IDF_ALL = 3 */
fw.fw= 1;
/* (qup,x) = (qup * idf^pwr * y). Default for Rocchio is 1; you can
use 2 to be more like kNN */
fw.idfPwr=1;
/* 0: traditional Rocchio (as in 2002); 1: normalize each doc vector
(like in kNN) */
fw.normalize= 1;

/* TFIDF within-document weighting parameters (TF scaling),
  for queries and documents.
The log scaling is defined by David Lewis, and is different
from what Lemur retrieval application uses. */

doc.tfMethod = 1;   /* 0 = RawTF; 1 = log-TF; */
query.tfMethod = 1; /* 0 = RawTF; 1 = log-TF; */

/* Pseudo-feedback parameters. Definitions are per David Lewis:
  3a. PosProportion: The topranking PosProportion of
examples will be sampled from to choose pseudopositive
examples.
       3b. PosDensity: Proportion of the topranking examples
to use as pseudopositives.
       3c. TotalPosWeight: Sum of weights of all
pseudopositive examples.
       3d. NegProportion: The bottomranking NegProportion of
examples will be sampled from to choose pseudonegative
examples.
       3e. NegDensity: Proportion of the bottomranking
examples to use as pseudonegatives.
       3f. TotalNegWeight: Sum of weights of all
pseudonegative examples
 */

fb.posProportion=0.02;  /* what section of TRAIN is used for pseudo pos */
fb.posDensity=1.0; 
fb.totalPosWeight= 5;  
fb.negProportion = 0.98; 
fb.negDensity = 0.05; 
fb.totalNegWeight = 5;


/*-----------------------------------------------------------
Effectiveness measure (used in thresholding and final eval)  
-------------------------------------------------------------*/
/* 1=default=automatic thresholding (David Lewis' LOO procedure).
   0=use fixed ("analytic") threshold */
thres.learnThreshold=1;
/* Fixed "analytic" threshold; only used if thres.learnThreshold=0,
i.e. if automatic thresholding is turned off. For a method like 
Rocchio with normalized vector and no feedback, using 1.0 means selecting
(almost) none; using 0.0 means selecting all (useful for ranking 
experiments). */
thres.threshold=0.0;


thres.measure=0; /* 0 linear utility, 1 F-measure */
 /* Weight of a discovered unjudged example, relative to that of
a properly labeled negative example */
thres.unjWt=0.0;

/* for linear utility, a*(P+) - b*(N-) */

thres.linear.a= 1.0;
thres.linear.b= 0.5; 

/* The minimum value of T11NU, used to bound it when computing T11SU */
thres.linear.minNU= -0.5; 


/* for F measure */
thres.f.const= 0.0;
thres.f.beta=0.5;



/*-------------------------------------------------
Classifier parameters (specific to Rocchio model)
------------------------------------------------- */

/* Coefficients of the Q_up vector:
   alpha*query + beta*mean_pos - gamma*sum_neg */    
qup.alpha = 1.0;
qup.beta = 0.5;
qup.gamma = 0.25;
qup.fs = 1;  /* Feature selection method: 0 none, 1 positive, 2 "top fsTop" */
qup.fsTop = 30; /* How many top components to keep, if qup.fs=2 */


/*-------------------------------------------------
Classifier parameters (specific to Centroid [a.k.a. Paul1] model)
------------------------------------------------- */
/* QueryVec fading coefficient */
paul1.a = 0.99;
/* If set to one, P+P' and N+N' sums are divided by the sum of their 
respective weights, as it is done in Rocchio model. */
paul1.useCentroid=0;
paul1.fs = 0;  /* Feature selection method: 0 none, 2 "top fsTop" */
paul1.fsTop = 30; /* How many top components to keep, if paul1.fs=2 */

/*-------------------------------------------------
Classifier parameters (specific to LAD model). 
For full details, please refer to include/LADParamManager.hpp
------------------------------------------------- */

/* 1 on, 0 off */
LAD.on=0;

/* LAD re-training frequency. One classifier update out of every
 retrainFrqw updates will cause LAD re-training; the rest will
 be "small updates" (without changing the predicate list). 
 The value 1 means "do LAD update every time"; -1 means "never". */
LAD.retrainFreq=10;

/* Keep this 0 to use built-in C++ LAD code. Invoking outside
Perl script is no longer supported */
LAD.usePerl = 0;
/* LAD run directory: the directory into which *.cut, *.pat etc. files will be written */
LAD.rundir=  "/home/vmenkov/lemur/test-data/lad";
/* The location of the Perl scripts. Does not matter any more */
LAD.progdir= "/home/vmenkov/boros/code";
/* The location of the Perl scripts. Does not matter any more */
LAD.progname=    "filterFront.pl";
 
/* If 1, document weights are used for all LAD purposes (starting
with document multiplicity); otherwise, use plain doc counts */
LAD.useDocWt=1;

/* 0= FW_NONE, 2=FW_PRED_WT2 */
LAD.fw=0;
/* The constant in the denominator */
LAD.fw2.c=1.0;

LAD.minTermCov = 0.0;
LAD.nMCP = 5;
LAD.depthCut = 10;
LAD.maxCutLen = -1;
LAD.alpha = 0.5;
LAD.spGenMode = 0; /* breadth */
LAD.dMax = 5;
LAD.maxPatterns = 50;
LAD.maxF = 0.0;
LAD.pCMin = -1;
LAD.qft = 10;
LAD.kft = 10;

/*-------------------------------------------------
Classifier parameters (specific to kNN classifier)
------------------------------------------------- */

/* k-NN Lookup method: 
  -1=random (for testing),
  0=direct, 1=inverted, 2=truncated inverted, 
  4=restricted inverted, 
  3=dot product in RP, 5=big cube Hamming, 6=small cubes Hamming... */
knn.lookup=1; 
/* k-NN classiffier method: 0=traditional, 1=Yang94, 2=New02a, 3="Density" */
knn.classifier=0; 
/* Number of nearest neighbors that are used in the classifier.
  (With BL85 truncation, this is also the HoodSize) */	
knn.k=5;
/* 0=fixed threshold, 1=classifier will learn threshold. The value must
be 1 for Yang92 and New02a. */
knn.learnThreshold=1;
/* 1=Compute and use a local threshold for each test doc. This is not
 a practical approach; it is only used for some experiments.
 (If you do that, set MODT.k=-1 to avoid excessive tracing) */
knn.localThreshold=0;
/* The fixed threshold value. This param is ignored unless knn.learnThreshold=0 */
knn.threshold=1.0;

/* NN_Rocchio_Beta for New02a. Ignored in other methods. */
knn.beta=1.0;
/* If 1, similarity is computed as dot product of *normalized* vectors */
knn.similarity.normalize=1;
/* If 1, we don't count a document as its own neighbor when finding the
k next neighbors. This is meant to make thresholding more realistic */
knn.leaveOneOut=1;
/* How we interpret (topic, document) pairs absent in the qrel file.
   0 means implicit NONREL; -1 means implicit UNJUDGED/UNLABELED */
knn.implicit=-1;

/* 1 = we abbreviate the traininig set, including into the document pool 
 only documents that have a non-trivial judgment for at least one topic. 
  This is suitable for computers with not a lot of RAM. The default =0
  (include the entire training set into the doc pool) */
knn.compactTrain=0;

/* If simCutoff>0, only docs with sim(d,x)>simCutoff are included into
  the neighborhood. This is for an experiment for Martin Strauss (June 2003) */
knn.simCutoff=0.0;	

/* Only terms with minDF <= DF(train)/train.size <= maxDF will   be included
 into the index. This is for the experiments with  "pseudo stop words".
 Feb-12-2003 */
knn.minDF=0.0;	
knn.maxDF=1.0;	



/* Neighborhood completion method: 0 none, 1 pseudo-random */
knn.completion=1;

/*-----------------------------------------*
 * Feature selection method in kNN, ILH 1: *
 *-----------------------------------------*/
knn.fs.train=0; /* Truncate pool vectors */
knn.fs.test=0;  /* Truncate vectors whose neighbors are sought */
/*
    NONE = 0, // none: default
    TOPX = 1, // select X top components 
    TOPXFRAC = 2, // select top fraction (X*100%)
    SUMXFRAC = 3//,  // sum_{top impact}/sum_{impact} >= X
    RANDOM  = -1  // random selection (X*100%)
*/
knn.fs.mode = 0; 
knn.fs.top = 30; /* X */
knn.fs.normalize1st=0; /* If true, normalize doc vec before truncating */
/** If this flag is on, we reverse the list order (i.e., take the
   bottom X elements, rather than top X). This is just a silly
   experiment, done in connection with the random-drop paradox. (Mar-20-2004) */
knn.fs.reverse=0;

/*-----------------------------------------*
 * Feature selection method in kNN, ILH 2: *
 *-----------------------------------------*/
/* ILH2: ordering lists.
   NONE = 0, // none: default
   LEN=1, // list length
   TF=3, // TF in the test doc (equive to ILH1 applied to TEST)
   MAX=7, // max impact in the list
   AVG=9, // avg impact in the list	
  */
knn.ilh2.order=0;
/* ILH2: termination criterion (mode) 
   NONE = 0, // none: default
   XLISTS = 1, // select X lists
   XPCLISTS = 2, // select (X*100%) of all lists
   XPCSUMLEN = 3 // select lists with the total length of (X*100%) of all lists' length
 */
knn.ilh2.term=0;
/** ILH2: termination criterion (stoppping point) */
knn.ilh2.top=30;
knn.ilh2.normalize1st=0;


/* ILH3 mode:
  NONE = 0, // none: default
  TOPX = 1, // select X top components 
  TOPXFRAC = 2, // select top fraction (X*100%)
  IMPX = 3,  //  impact >= X 
  IMPXMAX = 4  //  impact >= X * max(list)
*/
knn.ilh3.mode=0;
knn.ilh3.top=0.10;

/* ILH6:
    NONE = 0, // none: default
    CLOSEST_X = 1, // select X components with closest weight
    CLOSEST_XFRAC = 2, // select fraction (X*100%) with closest weights
    MAXRATIO = 3, // pick components with |log(wt/w0)| <= log(MAXRATIO)|
*/
knn.ilh6.mode=0;
knn.ilh6.x=0.10;


/* Parameters for PrunedInvertedLookup */
/* It is better not to provide SureSize  explicitly; in this case,
  by default it will be set to 0.5*HoodSize=0.5*k */
/* knn.prune.sureSize = 20; */
knn.prune.maxAerr=1.0;
knn.prune.maxRerr=1.0;


/*--------------------------------------------------------------*
 * Parameters for Proj1NNLookup, and other methods that use PPV *
 *--------------------------------------------------------------*/

/* The function for obtaining RPV coordinates. 
   0= three-pt, 1=binomial, 2=Gaussian, 3= three-pt pre-computed (fast).  */
knn.proj.f=0;
/* Denominator for RPVs. 0=expected, 1=actual  */
knn.proj.denom=0;
/* Number of RPVs */
knn.proj.dGdrp=100;
/* Blocks in RPV matrix (for proj.f=3 only). */
knn.proj.nBlk=1;

/* Parameters for Proj2 and other methods that use the Big Cube */
/* Number of cutpoints for each coordinate */
knn.bc.numCP= 100;
/* How many docs are randomly selected from the training set to decide on the
   cutpoint placement */
knn.bc.cpSampleSize=1000;
/* Relative size of the middle section of the coordinate range, 
   over which we distribute cutpoints for that coordinate. */
knn.bc.cpSampleInterval=0.8;

/* Parameters for Proj4 and other methods that use the Small Cubes */

/* L for the first cube. Perhaps 1.0 or 2.0;	*/
knn.sc.L0=5000;	
/* "eps" defines the scale of L's: L_{k+1} = (1+eps) * L_k.  E.g., eps=0.1 */
knn.sc.eps=0.0;	
/* Probability of a bit in a small-cube conversion vector being  set
  = 1/((1+gamma)L). Typically, gamma ~= 1.0 */
knn.sc.gamma=1.0;	
/* How many small cubes? (20) */
knn.sc.numSC=20;	

/* If this is not zero, we ignore L0, eps, and dGdrp provided in the
   config file; instead, we create just enough RPVs so that 
   exactly "fixedBitPerRpv"  small-cube coordinates were based on 
   each RPV, and L=M/2. This ensures full utilization of all RPVs created.*/
knn.sc.fixedBitPerRpv=1;

/* Fusion Method: 0=Union Fusion, 1=Sum-HD Fusion, 2=Union Ltd, 3=Union Top */
knn.sc.fusionMethod=0;
/* The dimension of a small cube = number of bits in a small-cube
 fingerprint of a document. Suggested value should be at, or a bit higher than,
 log_2( dGdrp * numCP) = log_2( dimension-of-big-cube = 14 */
knn.sc.dSC= 16;	
/* The Hamming-distance "radius" of the putative neighborhood (5) */
knn.sc.radius=5;	

/* Precompute r-vicinity population list? */    
knn.sc.precVic=1;

/* Parameters for RestrictedInvertedNNLookup */

/** For RestrictedInvertedLookup: the number of top high-frequency
 terms for which the [ti][di] array is created */
knn.restricted.topTerms = 200;


/* Putative neighborhood size; the default is 2*k */
/* knn.restricted.kPutative=768; */
/* The "first-stage method": the appoximate lookup method used to
    restrict the neighborhood */
knn.restricted.approxLookup=3;
   

/*-------------------------------------------------
Tracing. See details in README 
------------------------------------------------- */


/* The following values produce little output, and do not cost much. To
disable even that, set trace.MODT.k=-1 as well  */
trace.MODT.k=0;
trace.DOCT.m=-1;
trace.DOCT.n=0;
trace.THRT.m=-1;
trace.THRT.n=0;
trace.KNN.kshow=0;

/* The following values produce quite a bit of output, at a considerable cost*/
/*
trace.MODT.k=5;
trace.DOCT.m=0.75;
trace.DOCT.n=7;
trace.THRT.m=0.75;
trace.THRT.n=7;
trace.KNN.kshow=20;
*/

/* For how many top neighbors we display information (contributors to DP) */
knn.trace.topNei= 0;
/* How long a list of contributions is displayed for each neighbor */
knn.trace.listLen=10;
