protected void setInitValue(double lambda[]) {
        if (params.miscOptions.getProperty("initValues") != null) {
            // starting values stored in a file where each line has (featureName, value) pair
            String fname = params.miscOptions.getProperty("initValues");
            BufferedReader in;
            try {
                in = new BufferedReader(new FileReader(fname));
            
            String line;
            boolean idOrdered=Boolean.parseBoolean(params.miscOptions.getProperty("initValuesOrdered", "false"));
            Hashtable<String, Double> initVals = new Hashtable<String, Double>();
            for(int l = 0; ((line=in.readLine())!=null); l++) {
                StringTokenizer entry = new StringTokenizer(line);
                String featureName = entry.nextToken();
                double fval = Double.parseDouble(entry.nextToken());
                if (!idOrdered) 
                    initVals.put(featureName,fval);
                else
                    lambda[l] = fval;
            }
            if (!idOrdered) {
            for (int j = 0 ; j < lambda.length ; j ++) {
                String featureName = featureGenerator.featureName(j);
                lambda[j] = (initVals.get(featureName) != null)?initVals.get(featureName):getInitValue();
            }
            }
            return;
            } catch (IOException e) {
                e.printStackTrace();
                System.err.println("ERROR: in file initialization, using default init process");
            }
        } else if (Boolean.parseBoolean(params.miscOptions.getProperty("initValuesUseExisting", "false"))) {
            // use existing values of lambda from the model as starting point.
            return;
        } else
        for (int j = 0 ; j < lambda.length ; j ++) {
            lambda[j] = getInitValue();
        }
    }