Examples of Training


Examples of com.google.api.services.prediction.model.Training

    predict(prediction, "�Es esta frase en Espa�ol?");
    predict(prediction, "Est-ce cette phrase en Fran�ais?");
  }

  private static void train(Prediction prediction) throws IOException {
    Training training = new Training();
    training.setId(MODEL_ID);
    training.setStorageDataLocation(STORAGE_DATA_LOCATION);
    prediction.trainedmodels().insert(training).execute();
    System.out.println("Training started.");
    System.out.print("Waiting for training to complete");
    System.out.flush();

    int triesCounter = 0;
    while (triesCounter < 100) {
      // NOTE: if model not found, it will throw an HttpResponseException
      // with a 404 error
      try {
        HttpResponse response = prediction.trainedmodels()
            .get(MODEL_ID).executeUnparsed();
        if (response.getStatusCode() == 200) {
          training = response.parseAs(Training.class);
          String trainingStatus = training.getTrainingStatus();
          if (trainingStatus.equals("DONE")) {
            System.out.println();
            System.out.println("Training completed.");
            System.out.println(training.getModelInfo());
            return;
          }
        }
        response.ignore();
      } catch (HttpResponseException e) {
View Full Code Here

Examples of etc.aloe.processes.Training

        //Extract features
        FeatureExtraction extraction = getFeatureExtractionImpl();
        ExampleSet examples = extraction.extractFeatures(basicExamples, this.featureSpecification);

        //Train the model
        Training training = getTrainingImpl();
        this.featureValues = examples.getInstances();
        this.model = training.train(examples);

        //Get the top features
        this.topFeatures = getFeatureWeightingImpl().getTopFeatures(examples, this.model, NUM_TOP_FEATURES);
        this.featureWeights = getFeatureWeightingImpl().getFeatureWeights(examples, this.model);
    }
View Full Code Here

Examples of etc.aloe.processes.Training

                FeatureExtraction extraction = getFeatureExtractionImpl();
                System.out.println("- Extracting features from training set");
                ExampleSet trainingSet = extraction.extractFeatures(basicTrainingExamples, spec);
                basicTrainingExamples = null;

                Training training = getTrainingImpl();
                Model model = training.train(trainingSet);
                trainingSet = null;
               
                System.out.println("- Splitting out test set");
                SegmentSet testingSegments = new SegmentSet();
                testingSegments.setSegments(split.getTestingForFold(segmentSet.getSegments(), foldIndex, this.folds));
View Full Code Here

Examples of zdenekdrahos.AI.Training.Training

        this.settings = setttings;
    }

    @Override
    public ITraining build() {
        return new Training(settings);
    }
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.