Package weka.associations.tertius

Examples of weka.associations.tertius.IndividualLiteral


  && (!missingValues || m_missing == EXPLICIT)) {
      /* Case of two values.
       * If there are missing values, this case is treated like other cases.
       */
      if (individual) {
  lit = new IndividualLiteral(predicate, attr.value(0), 0,
            Literal.POS, m_missing, type);
  negation = new IndividualLiteral(predicate, attr.value(1), 1,
           Literal.POS, m_missing, type);
      } else {
  lit = new AttributeValueLiteral(predicate, attr.value(0), 0,
          Literal.POS, m_missing);
  negation = new AttributeValueLiteral(predicate, attr.value(1), 1,
               Literal.POS, m_missing);
      }
      lit.setNegation(negation);
      negation.setNegation(lit);
      predicate.addLiteral(lit);     
    } else {
      /* Case of several values. */
      for (int i = 0; i < attr.numValues(); i++) {
  if (individual) {
    lit = new IndividualLiteral(predicate, attr.value(i), i,
              Literal.POS, m_missing, type);
  } else {
    lit = new AttributeValueLiteral(predicate, attr.value(i), i,
            Literal.POS, m_missing);
  }
  if (m_negation != NONE) {
    if (individual) {
      negation = new IndividualLiteral(predicate, attr.value(i), i,
               Literal.NEG, m_missing, type);
    } else {
      negation = new AttributeValueLiteral(predicate, attr.value(i), i,
             Literal.NEG, m_missing);
    }
    lit.setNegation(negation);
    negation.setNegation(lit);
  }
  predicate.addLiteral(lit);
      }

      /* One more value if missing is significant. */
      if (missingValues && m_missing == SIGNIFICANT) {
  if (individual) {
    lit = new IndividualLiteral(predicate, "?", -1,
              Literal.POS, m_missing, type);
  } else {
    lit = new AttributeValueLiteral(predicate, "?", -1,
            Literal.POS, m_missing);
  }
  if (m_negation != NONE) {
    if (individual) {
      negation = new IndividualLiteral(predicate, "?", -1,
               Literal.NEG, m_missing, type);
    } else {
      negation = new AttributeValueLiteral(predicate, "?", -1,
             Literal.NEG, m_missing);
    }
View Full Code Here


  && (!missingValues || m_missing == EXPLICIT)) {
      /* Case of two values.
       * If there are missing values, this case is treated like other cases.
       */
      if (individual) {
  lit = new IndividualLiteral(predicate, attr.value(0), 0,
            Literal.POS, m_missing, type);
  negation = new IndividualLiteral(predicate, attr.value(1), 1,
           Literal.POS, m_missing, type);
      } else {
  lit = new AttributeValueLiteral(predicate, attr.value(0), 0,
          Literal.POS, m_missing);
  negation = new AttributeValueLiteral(predicate, attr.value(1), 1,
               Literal.POS, m_missing);
      }
      lit.setNegation(negation);
      negation.setNegation(lit);
      predicate.addLiteral(lit);     
    } else {
      /* Case of several values. */
      for (int i = 0; i < attr.numValues(); i++) {
  if (individual) {
    lit = new IndividualLiteral(predicate, attr.value(i), i,
              Literal.POS, m_missing, type);
  } else {
    lit = new AttributeValueLiteral(predicate, attr.value(i), i,
            Literal.POS, m_missing);
  }
  if (m_negation != NONE) {
    if (individual) {
      negation = new IndividualLiteral(predicate, attr.value(i), i,
               Literal.NEG, m_missing, type);
    } else {
      negation = new AttributeValueLiteral(predicate, attr.value(i), i,
             Literal.NEG, m_missing);
    }
    lit.setNegation(negation);
    negation.setNegation(lit);
  }
  predicate.addLiteral(lit);
      }

      /* One more value if missing is significant. */
      if (missingValues && m_missing == SIGNIFICANT) {
  if (individual) {
    lit = new IndividualLiteral(predicate, "?", -1,
              Literal.POS, m_missing, type);
  } else {
    lit = new AttributeValueLiteral(predicate, "?", -1,
            Literal.POS, m_missing);
  }
  if (m_negation != NONE) {
    if (individual) {
      negation = new IndividualLiteral(predicate, "?", -1,
               Literal.NEG, m_missing, type);
    } else {
      negation = new AttributeValueLiteral(predicate, "?", -1,
             Literal.NEG, m_missing);
    }
View Full Code Here

TOP

Related Classes of weka.associations.tertius.IndividualLiteral

Copyright © 2018 www.massapicom. 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.