Package pattern

Examples of pattern.PatternException


      pred = new CategoricalPredictor(name, coefficient, value);
    } else {
      String message = String.format("unsupported Predictor type %s",
          node.getNodeName());
      LOG.error(message);
      throw new PatternException(message);
    }

    return pred;
  }
View Full Code Here


      df.parse(reader, node);
    } else {
      String message = String.format(
          "unsupported DataField type %s / %s: ", op_type, data_type);
      LOG.error(message);
      throw new PatternException(message);
    }

    return df;
  }
View Full Code Here

    else if (operator.equals("greaterThan"))
      eval = name + " > " + value;
    else if (operator.equals("greaterOrEqual"))
      eval = name + " >= " + value;
    else
      throw new PatternException("unknown operator: " + operator);

    return eval;
  }
View Full Code Here

  public Object getValue(TridentTuple values, int i) throws PatternException {
    try {
      return values.getDouble(i);
    } catch (NumberFormatException exception) {
      LOG.error("tuple format is bad", exception);
      throw new PatternException("tuple format is bad", exception);
    }
  }
View Full Code Here

          if (points.size() != n) {
            String message = String
                .format("expected %d data points in PMML for cluster %s [ %s ]",
                    n, name, text);
            LOG.error(message);
            throw new PatternException(message);
          }
        }
      }
    }
  }
View Full Code Here

    if (operator.equals("isIn"))
      eval = String.format(
          "pattern.datafield.PortableBitSet.isIn( \"%s\", %s )",
          bits.toString(), name);
    else
      throw new PatternException("unknown operator: " + operator);

    return eval;
  }
View Full Code Here

            new Class[0], null);
      } catch (NullPointerException exception) {
        String message = String.format("predicate [ %s ] failed",
            predicates.get(i));
        LOG.error(message, exception);
        throw new PatternException(message, exception);
      } catch (CompileException exception) {
        String message = String.format(
            "predicate [ %s ] did not compile", predicates.get(i));
        LOG.error(message, exception);
        throw new PatternException(message, exception);
      }

    param_values = new Object[schema.size()];
    pred_eval = new Boolean[predicates.size()];
  }
View Full Code Here

            pred_param_values).toString());
      } catch (InvocationTargetException exception) {
        String message = String.format(
            "predicate [ %s ] did not evaluate", predicates.get(i));
        LOG.error(message, exception);
        throw new PatternException(message, exception);
      }

    return pred_eval;
  }
View Full Code Here

            {
              paramResult *= Math.pow(Double.parseDouble(data),
                  power);
            }
          } else
            throw new PatternException(
                "XML and tuple fields mismatch");
        }

        result += paramResult * beta;
      } else {
View Full Code Here

TOP

Related Classes of pattern.PatternException

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.