congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
SupportVectorMachineModel.setKernel
Code IndexAdd Tabnine to your IDE (free)

How to use
setKernel
method
in
org.dmg.pmml.support_vector_machine.SupportVectorMachineModel

Best Java code snippets using org.dmg.pmml.support_vector_machine.SupportVectorMachineModel.setKernel (Showing top 3 results out of 315)

origin: jpmml/jpmml-sklearn

@Override
public SupportVectorMachineModel encodeModel(Schema schema){
  int[] shape = getSupportVectorsShape();
  int numberOfVectors = shape[0];
  int numberOfFeatures = shape[1];
  List<Integer> support = getSupport();
  List<? extends Number> supportVectors = getSupportVectors();
  List<? extends Number> dualCoef = getDualCoef();
  List<? extends Number> intercept = getIntercept();
  SupportVectorMachineModel supportVectorMachineModel = LibSVMUtil.createRegression(new CMatrix<>(ValueUtil.asDoubles(supportVectors), numberOfVectors, numberOfFeatures), SupportVectorMachineUtil.formatIds(support), ValueUtil.asDouble(Iterables.getOnlyElement(intercept)), ValueUtil.asDoubles(dualCoef), schema)
    .setKernel(SupportVectorMachineUtil.createKernel(getKernel(), getDegree(), getGamma(), getCoef0()));
  return supportVectorMachineModel;
}
origin: jpmml/jpmml-sklearn

@Override
public SupportVectorMachineModel encodeModel(Schema schema){
  int[] shape = getSupportVectorsShape();
  int numberOfVectors = shape[0];
  int numberOfFeatures = shape[1];
  List<Integer> support = getSupport();
  List<? extends Number> supportVectors = getSupportVectors();
  List<Integer> supportSizes = getSupportSizes();
  List<? extends Number> dualCoef = getDualCoef();
  List<? extends Number> intercept = getIntercept();
  SupportVectorMachineModel supportVectorMachineModel = LibSVMUtil.createClassification(new CMatrix<>(ValueUtil.asDoubles(supportVectors), numberOfVectors, numberOfFeatures), supportSizes, SupportVectorMachineUtil.formatIds(support), ValueUtil.asDoubles(intercept), ValueUtil.asDoubles(dualCoef), schema)
    .setKernel(SupportVectorMachineUtil.createKernel(getKernel(), getDegree(), getGamma(), getCoef0()));
  List<SupportVectorMachine> supportVectorMachines = supportVectorMachineModel.getSupportVectorMachines();
  for(SupportVectorMachine supportVectorMachine : supportVectorMachines){
    String category = supportVectorMachine.getTargetCategory();
    // LibSVM: (decisionFunction > 0 ? first : second)
    // PMML: (decisionFunction < 0 ? first : second)
    supportVectorMachine.setTargetCategory(supportVectorMachine.getAlternateTargetCategory());
    supportVectorMachine.setAlternateTargetCategory(category);
  }
  return supportVectorMachineModel;
}
origin: jpmml/jpmml-r

supportVectorMachineModel.setKernel(svmKernel.createKernel(degree.asScalar(), gamma.asScalar(), coef0.asScalar()));
org.dmg.pmml.support_vector_machineSupportVectorMachineModelsetKernel

Popular methods of SupportVectorMachineModel

  • getSupportVectorMachines
  • getKernel
  • getVectorDictionary
  • hasSupportVectorMachines
  • setOutput
  • <init>
  • getAlternateBinaryTargetCategory
  • getExtensions
  • getLocalTransformations
  • getMathContext
  • getMiningSchema
  • getModelExplanation
  • getMiningSchema,
  • getModelExplanation,
  • getModelStats,
  • getModelVerification,
  • getOutput,
  • getRepresentation,
  • getTargets,
  • getThreshold,
  • hasExtensions

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Kernel (java.awt.image)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JOptionPane (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now