Codota Logo
MiningSegmentTransfer.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.kie.pmml.pmml_4_2.model.mining.MiningSegmentTransfer
constructor

Best Java code snippets using org.kie.pmml.pmml_4_2.model.mining.MiningSegmentTransfer.<init> (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.drools/kie-pmml

@Test
public void testSimpleResult() {
  MiningSegmentTransfer mst = new MiningSegmentTransfer(simpleResult,"SEGMENT_2");
  doBaselineAssertions(simpleResult,mst);
}
origin: org.drools/kie-pmml

public MiningSegmentTransfer getSegmentTransfer( MiningSegment targetSegment, String targetFieldName) {
  MiningSegmentTransfer xfer = null;
  int lastIndex = targetSegment.getSegmentIndex() - 1;
  if (lastIndex < 0) {
    throw new IndexOutOfBoundsException("Cannot have an undefined mining field in the first segment");
  }
  for (int idx = lastIndex; idx >= 0; idx--) {
    MiningSegment seg = miningSegments.get(idx);
    if (seg != null && seg.getInternalModel() != null) {
      List<PMMLOutputField> outputs = seg.getInternalModel().getOutputFields();
      if (outputs != null) {
        for (PMMLOutputField field: outputs) {
          if (field.getName().equals(targetFieldName)) {
            xfer = new MiningSegmentTransfer(this.segmentationId, seg.getSegmentId(), targetSegment.getSegmentId());
            xfer.addResultToRequestMapping(targetFieldName, targetFieldName);
            return xfer;
          }
        }
      }
    }
  }
  return xfer;
}
origin: org.drools/kie-pmml

@Test
public void testSimpleWithFieldNamesMap() {
  MiningSegmentTransfer mst = new MiningSegmentTransfer(simpleResult,"SEGMENT_2");
  mst.addResultToRequestMapping("var1", "someVarA");
  doBaselineAssertions(simpleResult,mst);
  assertEquals(1,mst.getResultFieldNameToRequestFieldName().size());
}

origin: org.drools/kie-pmml

  @Test
  public void testComplexResult() {
    MiningSegmentTransfer mst = new MiningSegmentTransfer(complexResult,"SEGMENT_2");
    mst.addResultToRequestMapping("firstObject", "object1");
    mst.addResultToRequestMapping("myComplex.varA", "stringFromMyComplex");
    mst.addResultToRequestMapping("myComplex.varB", "intValue");
    doBaselineAssertions(complexResult,mst);
    assertEquals(3,mst.getResultFieldNameToRequestFieldName().size());
    PMMLRequestData rqst = mst.getOutboundRequest();
    assertNotNull(rqst);
    assertEquals(complexResult.getCorrelationId(),rqst.getCorrelationId());
    Map<String,ParameterInfo> params = rqst.getMappedRequestParams();
    assertEquals(complexResult.getResultValue("firstObject", null), params.get("object1").getValue());
    assertEquals(complexResult.getResultValue("myComplex", "varA"), params.get("stringFromMyComplex").getValue());
    assertEquals(complexResult.getResultValue("myComplex", "varB"), params.get("intValue").getValue());
    System.out.println(rqst);
    System.out.println(complexResult);
  }
}
org.kie.pmml.pmml_4_2.model.miningMiningSegmentTransfer<init>

Popular methods of MiningSegmentTransfer

  • addResultToRequestMapping
  • getOutboundRequest
  • getCorrelationId
  • getFromSegmentId
  • getResultFieldNameToRequestFieldName
  • getSegmentationId
  • getToSegmentId
  • getValueFromResult

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now