Examples of Sample


Examples of com.m11n.android.model.Sample

    {
      item = new Extra();
    }
    else if(Sample.ELEMENT_NAME.equals(parent.getNodeName()))
    {
      item = new Sample();
    }
    else if(Doc.ELEMENT_NAME.equals(parent.getNodeName()))
    {
      item = new Doc();
    }
View Full Code Here

Examples of com.peterhi.sample.Sample

import com.peterhi.sample.Sample;

public class TestWrite {

  public static void main(String[] args) throws Exception {
    Sample sample = Functions.newLocalInstance(Sample.class);
    sample.setName("Sample 1");
   
    Person jason = Functions.newLocalInstance(Person.class);
    jason.setName("Jason");
    Gender jasonGender = Functions.newLocalInstance(Gender.class);
    jasonGender.setName("Male");
View Full Code Here

Examples of com.sishuok.es.showcase.sample.entity.Sample

            @RequestParam("fieldId") String fieldId, @RequestParam("fieldValue") String fieldValue,
            @RequestParam(value = "id", required = false) Long id) {
        ValidateResponse response = ValidateResponse.newInstance();

        if ("name".equals(fieldId)) {
            Sample sample = getSampleService().findByName(fieldValue);
            if (sample == null || (sample.getId().equals(id) && sample.getName().equals(fieldValue))) {
                //如果msg 不为空 将弹出提示框
                response.validateSuccess(fieldId, "");
            } else {
                response.validateFail(fieldId, "该名称已被其他人使用");
            }
View Full Code Here

Examples of com.sun.appserv.management.base.Sample

      {
        conn.isRegistered( delegateObjectName );
      }
      printPerf( "Time to call MBeanServerConnection.isRegistered() " + ITER + " times: " + (now() - start) + " ms" );
     
      final Sample  sample  = (Sample)getDomainRoot().getContainee( XTypes.SAMPLE );

            final int BANDWIDTH_ITER = 3;
           
            for ( int i = 0; i < BANDWIDTH_ITER; ++i )
            {
                // test upload bandwidth
                final byte[]  uploadBytes  = new byte[ 1 * MB ];
                final long  uploadStart  = now();
                sample.uploadBytes( uploadBytes );
                final long  uploadElapsed  = now() - uploadStart;
                final int  uploadKBPerSec  = (int)((uploadBytes.length / 1024.0) / (uploadElapsed / 1000.0));
                printPerf( "Upload bandwidth (" + uploadBytes.length + " bytes): " + uploadKBPerSec + "kb/sec" );
               
                // test download bandwidth
                final long      downloadStart  = now();
                final byte[]  downloadedBytes  = sample.downloadBytes( 256 * K );
                final long  downloadElapsed  = now() - downloadStart;
                final int  downloadKBPerSec  = (int)((downloadedBytes.length / 1024.0) / (downloadElapsed / 1000.0));
                printPerf( "Download bandwidth (" + uploadBytes.length + " bytes): " + downloadKBPerSec + "kb/sec\n" );
            }
     
View Full Code Here

Examples of com.sun.appserv.management.base.Sample

 
    private void
  testTransferSizePerformance( final MBeanServerConnection conn )
    throws IOException
  {
    final Sample  sample  = (Sample)getDomainRoot().getContainee( XTypes.SAMPLE );
   
        final int   ITER  = 10;
    final int   TEST_SIZE   = 4 * MB;
       
    printPerf( "Upload bandwidth, test size = " + (TEST_SIZE / (float)(MB)) + "MB X " + ITER + " iterations." );
   
    for( int chunkSize = 8 * K; chunkSize <= TEST_SIZE; chunkSize *= 2 )
    {
      final byte[]  chunk  = new byte[ chunkSize ];
     
            long    totalElapsed    = 0;
            for( int iter = 0; iter < ITER; ++iter )
            {
                final long  uploadStart  = now();
                int total   = 0;
                while ( total < TEST_SIZE )
                {
                    sample.uploadBytes( chunk );
                    total   += chunk.length;
                }
                final long  uploadElapsed  = now() - uploadStart;
                totalElapsed    += uploadElapsed;
            }
View Full Code Here

Examples of com.sun.speech.freetts.relp.Sample

    }

    Sample[] samples = new Sample[numSamples];

    for (int i = 0; i < samples.length; i++) {
        samples[i] = new Sample(reader, numChannels);
    }
    Diphone diphone = new Diphone(name, samples, midPoint);
    add(diphone);
      } else {
    throw new Error("Unsupported tag " + tag);
View Full Code Here

Examples of com.sun.speech.freetts.relp.Sample

  int i, iSize = 0, nSize;
  SampleSet sts = db.getSts();

  // loop through all the Samples in this unit
  for (i = start; i < end; i++) {
      Sample sample = sts.getSample(i);
      nSize = iSize + sample.getResidualSize();

      if (Math.abs(index - (float) iSize) <
    Math.abs(index - (float) nSize)) {
    return sample;
      }
View Full Code Here

Examples of edu.uci.jforestsx.sample.Sample

      residuals[instance] = (2 * target) / (1 + Math.exp(2 * target * trainPredictions[d]));
      responseAbs = Math.abs(residuals[instance]);
      weights[instance] = responseAbs * (2 - responseAbs);
    }

    Sample subLearnerSample = curTrainSet.getRandomSubSample(samplingRate, rnd).getClone();
    subLearnerSample.targets = residuals;

    for (int i = 0; i < subLearnerSample.size; i++) {
      subLearnerSampleIndicesInTrainSet[i] = subLearnerSample.indicesInParentSample[i];
    }
View Full Code Here

Examples of edu.uci.jforestsx.sample.Sample

    Ensemble ensemble = new Ensemble();
    subLearner.setTreeWeight(treeWeight / bagCount);
    for (int iteration = 1; iteration <= bagCount; iteration++) {
      System.out.println("Iteration: " + iteration);
      Sample subLearnerTrainSet = trainSet.getRandomSubSample(baggingTrainFraction, rnd);
      //((TreeLearner) subLearner).setRnd();
      Sample subLearnerOutOfTrainSet = trainSet.getOutOfSample(subLearnerTrainSet);
      Sample subLearnerValidSet = (validSet == null || validSet.isEmpty() ? subLearnerOutOfTrainSet : validSet);
      Ensemble subEnsemble = subLearner.learn(subLearnerTrainSet, subLearnerValidSet);

      for (int t = 0; t < subEnsemble.getNumTrees(); t++) {
        Tree tree = subEnsemble.getTreeAt(t);
        double curTreeWeight = subEnsemble.getWeightAt(t);
View Full Code Here

Examples of edu.uci.jforestsx.sample.Sample

    int earlyStoppingIteration = 0;
    int bestIteration = 0;
    int[] treeCounts = new int[numSubModules];
    subLearner.setTreeWeight(treeWeight);
    for (curIteration = 1; curIteration <= numSubModules; curIteration++) {
      Sample subLeanerSample = getSubLearnerSample();
      Ensemble subEnsemble = subLearner.learn(subLeanerSample, validSet);
      if (subEnsemble == null) {
        break;
      }
      for (int t = 0; t < subEnsemble.getNumTrees(); t++) {
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.