Examples of valueOf()


Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

      return;
    DoubleLinear linear = new DoubleLinear();
   
    for(TrainingSample<double[]> t : list) {
      double[] desc = t.sample;
      double norm = Math.sqrt(linear.valueOf(desc, desc));
      for(int x = 0 ; x < desc.length ; x++)
        desc[x] /= norm;
    }
   
  }
View Full Code Here

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

    if(list.isEmpty())
      return;
    DoubleLinear linear = new DoubleLinear();
   
    for(double[] desc : list) {
      double norm = Math.sqrt(linear.valueOf(desc, desc));
      for(int x = 0 ; x < desc.length ; x++)
        desc[x] /= norm;
    }
   
  }
View Full Code Here

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

      //7.1 compute w for pegasos
      double w[] = peg.getW();
      System.out.println("peg : w : "+Arrays.toString(w));
      System.out.println("peg : bias : "+peg.getB());
      System.out.println("peg : ||w|| : "+k.valueOf(w, w));

      //7.2 w from transductive pegasos
      System.out.println("tpeg : w : "+Arrays.toString(tpeg.getW()));
      System.out.println("tpeg : bias : "+tpeg.getB());
      System.out.println("tpeg : ||w|| : "+k.valueOf(tpeg.getW(), tpeg.getW()));
View Full Code Here

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

      System.out.println("peg : ||w|| : "+k.valueOf(w, w));

      //7.2 w from transductive pegasos
      System.out.println("tpeg : w : "+Arrays.toString(tpeg.getW()));
      System.out.println("tpeg : bias : "+tpeg.getB());
      System.out.println("tpeg : ||w|| : "+k.valueOf(tpeg.getW(), tpeg.getW()));

      //8. comparing smo and peg
      System.out.println("< peg, tpeg > : "+(k.valueOf(w, tpeg.getW())/Math.sqrt(k.valueOf(w, w)*k.valueOf(tpeg.getW(), tpeg.getW()))));
    }
   
View Full Code Here

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

      System.out.println("tpeg : w : "+Arrays.toString(tpeg.getW()));
      System.out.println("tpeg : bias : "+tpeg.getB());
      System.out.println("tpeg : ||w|| : "+k.valueOf(tpeg.getW(), tpeg.getW()));

      //8. comparing smo and peg
      System.out.println("< peg, tpeg > : "+(k.valueOf(w, tpeg.getW())/Math.sqrt(k.valueOf(w, w)*k.valueOf(tpeg.getW(), tpeg.getW()))));
    }
   
    //final stats
    System.out.println();
    pegstd = Math.sqrt(pegstd/maxcv - (pegerr/maxcv)*(pegerr/maxcv));
 
View Full Code Here

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

      System.out.println("tpeg : w : "+Arrays.toString(tpeg.getW()));
      System.out.println("tpeg : bias : "+tpeg.getB());
      System.out.println("tpeg : ||w|| : "+k.valueOf(tpeg.getW(), tpeg.getW()));

      //8. comparing smo and peg
      System.out.println("< peg, tpeg > : "+(k.valueOf(w, tpeg.getW())/Math.sqrt(k.valueOf(w, w)*k.valueOf(tpeg.getW(), tpeg.getW()))));
    }
   
    //final stats
    System.out.println();
    pegstd = Math.sqrt(pegstd/maxcv - (pegerr/maxcv)*(pegerr/maxcv));
 
View Full Code Here

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleLinear.valueOf()

      System.out.println("tpeg : w : "+Arrays.toString(tpeg.getW()));
      System.out.println("tpeg : bias : "+tpeg.getB());
      System.out.println("tpeg : ||w|| : "+k.valueOf(tpeg.getW(), tpeg.getW()));

      //8. comparing smo and peg
      System.out.println("< peg, tpeg > : "+(k.valueOf(w, tpeg.getW())/Math.sqrt(k.valueOf(w, w)*k.valueOf(tpeg.getW(), tpeg.getW()))));
    }
   
    //final stats
    System.out.println();
    pegstd = Math.sqrt(pegstd/maxcv - (pegerr/maxcv)*(pegerr/maxcv));
 
View Full Code Here

Examples of javolution.util.FastCollection.valueOf()

        // Sets the maximum length for replacement text.
        Collection values = entityToReplacementText.values();
        if (values instanceof FastCollection) { // Avoids allocating iterators.
             FastCollection fc = (FastCollection) values;
             for (Record r=fc.head(), t=fc.tail(); (r = r.getNext())!= t;) {
                 CharSequence value = (CharSequence) fc.valueOf(r);
                 if (_maxLength < value.length()) {
                     _maxLength = value.length();
                 }
             }
        } else {
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

        }

        CmdUtils.croakIfMissing(parser, options, "requests", "store-dir");

        final int numThreads = CmdUtils.valueOf(options, "threads", 10);
        final int numRequests = (Integer) options.valueOf("requests");
        final int internalSortSize = CmdUtils.valueOf(options, "internal-sort-size", 500000);
        int numValues = numRequests;
        final String inputFile = (String) options.valueOf("request-file");
        final String searcherClass = CmdUtils.valueOf(options,
                                                      "search-strategy",
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

        final int numThreads = CmdUtils.valueOf(options, "threads", 10);
        final int numRequests = (Integer) options.valueOf("requests");
        final int internalSortSize = CmdUtils.valueOf(options, "internal-sort-size", 500000);
        int numValues = numRequests;
        final String inputFile = (String) options.valueOf("request-file");
        final String searcherClass = CmdUtils.valueOf(options,
                                                      "search-strategy",
                                                      BinarySearchStrategy.class.getName()).trim();
        final boolean gzipIntermediate = options.has("gzip");
        final SearchStrategy searcher = (SearchStrategy) ReflectUtils.callConstructor(ReflectUtils.loadClass(searcherClass));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.