Examples of Example


Examples of aima.core.learning.framework.Example

  @Test
  public void testNumerizesAndDeNumerizesIrisDataSetExample1()
      throws Exception {
    DataSet ds = DataSetFactory.getIrisDataSet();
    Example first = ds.getExample(0);
    Numerizer n = new IrisDataSetNumerizer();
    Pair<List<Double>, List<Double>> io = n.numerize(first);

    Assert.assertEquals(Arrays.asList(5.1, 3.5, 1.4, 0.2), io.getFirst());
    Assert.assertEquals(Arrays.asList(0.0, 0.0, 1.0), io.getSecond());
View Full Code Here

Examples of aima.core.learning.framework.Example

  @Test
  public void testNumerizesAndDeNumerizesIrisDataSetExample2()
      throws Exception {
    DataSet ds = DataSetFactory.getIrisDataSet();
    Example first = ds.getExample(51);
    Numerizer n = new IrisDataSetNumerizer();
    Pair<List<Double>, List<Double>> io = n.numerize(first);

    Assert.assertEquals(Arrays.asList(6.4, 3.2, 4.5, 1.5), io.getFirst());
    Assert.assertEquals(Arrays.asList(0.0, 1.0, 0.0), io.getSecond());
View Full Code Here

Examples of aima.core.learning.framework.Example

  @Test
  public void testNumerizesAndDeNumerizesIrisDataSetExample3()
      throws Exception {
    DataSet ds = DataSetFactory.getIrisDataSet();
    Example first = ds.getExample(100);
    Numerizer n = new IrisDataSetNumerizer();
    Pair<List<Double>, List<Double>> io = n.numerize(first);

    Assert.assertEquals(Arrays.asList(6.3, 3.3, 6.0, 2.5), io.getFirst());
    Assert.assertEquals(Arrays.asList(1.0, 0.0, 0.0), io.getSecond());
View Full Code Here

Examples of ch.unibe.jexample.internal.Example

    public static <T> T example(String reference) {
        try {
            MethodReference ref = MethodLocator.parse(reference).resolve();
            ExampleGraph g = new ExampleGraph();
            g.add(ref.jclass);
            Example e = g.findExample(ref);
            return (T) runExample(e);
        } catch (SecurityException ex) {
            throw new RuntimeException(ex);
        } catch (JExampleError ex) {
            throw new RuntimeException(ex);
View Full Code Here

Examples of ch.unibe.jexample.internal.Example

            throw new RuntimeException(ex);
        }
    }

    public static <T> T example(Class jClass, String method) {
        Example e = findExample(jClass, method);
        if (e == null) throw new NoSuchMethodError("Method not found.");
        return (T) runExample(e);
    }
View Full Code Here

Examples of com.aspose.examples.examplesmodel.Example

            return false;
        }
        try
        {
            String path = comp.getExPath();
            Example ex = comp.getExample();
            AsposeJavaComponent asposeComponent = AsposeJavaComponents.list.get(component.getComponentSelection().getSelectedItem());
            copyExample(GitHelper.getLocalRepositoryPath(asposeComponent) + File.separator + path, projectPath + File.separator + path);
            if (ex == null)
            {
                return false;
View Full Code Here

Examples of com.google.gwt.i18n.client.Messages.Example

        }
        PluralCount pluralCount = param.getAnnotation(PluralCount.class);
        if (pluralCount != null) {
          argInfo.isPluralCount = true;
        }
        Example example = param.getAnnotation(Example.class);
        if (example != null) {
          argInfo.example = example.value();
        }
      }
    }
  }
View Full Code Here

Examples of com.google.gwt.i18n.client.Messages.Example

        }
        PluralCount pluralCount = param.getAnnotation(PluralCount.class);
        if (pluralCount != null) {
          argInfo.isPluralCount = true;
        }
        Example example = param.getAnnotation(Example.class);
        if (example != null) {
          argInfo.example = example.value();
        }
      }
    }
  }
View Full Code Here

Examples of com.mangofactory.swagger.dummy.models.Example

  }

  //Calculates effective url and ignores UriComponentsBuilder
  @RequestMapping(value = "/effective", method = RequestMethod.GET)
  public ResponseEntity<Example> getEffective(UriComponentsBuilder builder) {
    return new ResponseEntity<Example>(new Example("Hello", 1, EnumType.ONE, new NestedType("test")), HttpStatus.OK);
  }
View Full Code Here

Examples of edu.stanford.nlp.sempre.Example

    List<List<List<Integer>>> deltasPerIterPerExample = new ArrayList<List<List<Integer>>>();
    int e = 0, iter = 0, beamSize = 0;
    for (List<Example> row : Vis.zipExamples(files)) {
      LogInfo.log("example " + e);
      final Example targetExample = row.get(row.size() - 1);
      final Map<Derivation, Integer> targetBeamPositions = Utils.indicesOf(targetExample.getPredDerivations());
      beamSize = targetBeamPositions.size();

      List<List<Integer>> deltasPerIter = new ArrayList<List<Integer>>();
      for (iter = 0; iter < row.size(); iter++) {
        List<Integer> deltas = new ArrayList<Integer>();
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.