Package fr.lip6.jkernelmachines.io

Examples of fr.lip6.jkernelmachines.io.FvecImporter.readFile()


    FvecImporter fvecimp = new FvecImporter();

    // read train features
    List<double[]> feat = null;
    try {
      feat = fvecimp.readFile(args[1]);
    } catch (IOException e1) {
      System.out.println("Unable to read train features: " + args[1]);
      return;
    }
View Full Code Here


    }
    System.out.println("Train features loaded.");

    // load test features
    try {
      feat = fvecimp.readFile(args[3]);
    } catch (IOException e1) {
      System.out.println("Unable to read test features: " + args[3]);
      return;
    }
View Full Code Here

   */
  @Test
  public final void testReadFile() {
    try {
      FvecImporter fvecimp = new FvecImporter();
      List<double[]> l = fvecimp.readFile("resources/dict.fvec");
      assertEquals(32, l.size());
      assertEquals(40, l.get(0).length);
    }
    catch(IOException e) {

View Full Code Here

      File f = new File("resources/testwrite.fvec");
     
      assertEquals(4+4*10, f.length());
     
     
      l = fvecimp.readFile("resources/testwrite.fvec");
      assertEquals(10, l.get(0).length);
      for(int i = 0 ; i < 10 ; i++)
        assertEquals(i, l.get(0)[i], 1e-7);
     
      f.delete();
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.