Class NearestNeighborModel

java.lang.Object
weka.core.pmml.jaxbbindings.NearestNeighborModel

public class NearestNeighborModel extends Object

Java class for NearestNeighborModel element declaration.

The following schema fragment specifies the expected content contained within this class.

 <element name="NearestNeighborModel">
   <complexType>
     <complexContent>
       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
         <sequence>
           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}MiningSchema"/>
           <element ref="{http://www.dmg.org/PMML-4_1}Output" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}ModelStats" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}ModelExplanation" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}Targets" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}LocalTransformations" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}TrainingInstances"/>
           <element ref="{http://www.dmg.org/PMML-4_1}ComparisonMeasure"/>
           <element ref="{http://www.dmg.org/PMML-4_1}KNNInputs"/>
           <element ref="{http://www.dmg.org/PMML-4_1}ModelVerification" minOccurs="0"/>
           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
         </sequence>
         <attribute name="algorithmName" type="{http://www.w3.org/2001/XMLSchema}string" />
         <attribute name="categoricalScoringMethod" type="{http://www.dmg.org/PMML-4_1}CAT-SCORING-METHOD" default="majorityVote" />
         <attribute name="continuousScoringMethod" type="{http://www.dmg.org/PMML-4_1}CONT-SCORING-METHOD" default="average" />
         <attribute name="functionName" use="required" type="{http://www.dmg.org/PMML-4_1}MINING-FUNCTION" />
         <attribute name="instanceIdVariable" type="{http://www.w3.org/2001/XMLSchema}string" />
         <attribute name="isScorable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
         <attribute name="modelName" type="{http://www.w3.org/2001/XMLSchema}string" />
         <attribute name="numberOfNeighbors" use="required" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
         <attribute name="threshold" type="{http://www.dmg.org/PMML-4_1}REAL-NUMBER" default="0.001" />
       </restriction>
     </complexContent>
   </complexType>
 </element>
 
  • Constructor Details

    • NearestNeighborModel

      public NearestNeighborModel()
  • Method Details

    • getContent

      public List<Object> getContent()
      Gets the rest of the content model.

      You are getting this "catch-all" property because of the following reason: The field name "Extension" is used by two different parts of a schema. See: line 814 of file:/home/david/workspace/weka/pmml-4-1.xsd line 803 of file:/home/david/workspace/weka/pmml-4-1.xsd

      To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the content property.

      For example, to add a new item, do as follows:

          getContent().add(newItem);
       

      Objects of the following type(s) are allowed in the list ModelExplanation ModelStats TrainingInstances Output ComparisonMeasure LocalTransformations Targets KNNInputs MiningSchema ModelVerification Extension

    • getAlgorithmName

      public String getAlgorithmName()
      Gets the value of the algorithmName property.
      Returns:
      possible object is String
    • setAlgorithmName

      public void setAlgorithmName(String value)
      Sets the value of the algorithmName property.
      Parameters:
      value - allowed object is String
    • getCategoricalScoringMethod

      public CATSCORINGMETHOD getCategoricalScoringMethod()
      Gets the value of the categoricalScoringMethod property.
      Returns:
      possible object is CATSCORINGMETHOD
    • setCategoricalScoringMethod

      public void setCategoricalScoringMethod(CATSCORINGMETHOD value)
      Sets the value of the categoricalScoringMethod property.
      Parameters:
      value - allowed object is CATSCORINGMETHOD
    • getContinuousScoringMethod

      public CONTSCORINGMETHOD getContinuousScoringMethod()
      Gets the value of the continuousScoringMethod property.
      Returns:
      possible object is CONTSCORINGMETHOD
    • setContinuousScoringMethod

      public void setContinuousScoringMethod(CONTSCORINGMETHOD value)
      Sets the value of the continuousScoringMethod property.
      Parameters:
      value - allowed object is CONTSCORINGMETHOD
    • getFunctionName

      public MININGFUNCTION getFunctionName()
      Gets the value of the functionName property.
      Returns:
      possible object is MININGFUNCTION
    • setFunctionName

      public void setFunctionName(MININGFUNCTION value)
      Sets the value of the functionName property.
      Parameters:
      value - allowed object is MININGFUNCTION
    • getInstanceIdVariable

      public String getInstanceIdVariable()
      Gets the value of the instanceIdVariable property.
      Returns:
      possible object is String
    • setInstanceIdVariable

      public void setInstanceIdVariable(String value)
      Sets the value of the instanceIdVariable property.
      Parameters:
      value - allowed object is String
    • isIsScorable

      public boolean isIsScorable()
      Gets the value of the isScorable property.
      Returns:
      possible object is Boolean
    • setIsScorable

      public void setIsScorable(Boolean value)
      Sets the value of the isScorable property.
      Parameters:
      value - allowed object is Boolean
    • getModelName

      public String getModelName()
      Gets the value of the modelName property.
      Returns:
      possible object is String
    • setModelName

      public void setModelName(String value)
      Sets the value of the modelName property.
      Parameters:
      value - allowed object is String
    • getNumberOfNeighbors

      public BigInteger getNumberOfNeighbors()
      Gets the value of the numberOfNeighbors property.
      Returns:
      possible object is BigInteger
    • setNumberOfNeighbors

      public void setNumberOfNeighbors(BigInteger value)
      Sets the value of the numberOfNeighbors property.
      Parameters:
      value - allowed object is BigInteger
    • getThreshold

      public double getThreshold()
      Gets the value of the threshold property.
      Returns:
      possible object is Double
    • setThreshold

      public void setThreshold(Double value)
      Sets the value of the threshold property.
      Parameters:
      value - allowed object is Double