private void setPoint() {
Random rand=new Random();
        for(int y=-1;y<=1;y+=2) {
            Map<Integer,Integer> weights=new HashMap<Integer,Integer>();
            Map<Integer,Double> values=new HashMap<Integer,Double>();
            for(Integer index:wordLengths.keySet()) {
                double x=1;
                x*=densities.get(1).get(index)/(1-densities.get(1).get(index));
                x/=densities.get(-1).get(index)/(1-densities.get(-1).get(index));
                x=Math.pow(x,y);
                x=Math.log(x);
                //if(rand.nextInt(1000)==0) {
                  //  System.out.println("P( C=1 | x_{"+index+"}=1 ) = "+densities.get(1).get(index));
                    //System.out.println("P( C=-1 | x_{"+index+"}=1 ) = "+densities.get(-1).get(index));
                    //System.out.println("value is "+x+" when maximizing for class "+y);
//System.out.println();
  //              }
                values.put(index,x);
                weights.put(index,wordLengths.get(index)+1);
            }
            Knapsack knapsack=new Knapsack(values,weights,1201);
    //        System.out.println("sack value " +knapsack.getSackValue());
      //      System.out.println("sack chosen " +knapsack.getSack());
            if(y==-1||knapsack.getSackValue()>bestValue) {
                bestValue=knapsack.getSackValue();
                bestPoint=knapsack.getSack();
                bestClass=y;
            }
        }
    }