[rules-users] PMML - Exception excuting consequence for rule xxx in yyy: java.lang.NullPointerException : using KnowledgeAgent
Andrew Varner
drew.varner at me.com
Wed Jul 17 20:53:43 EDT 2013
Couldn't you post this to a site and just include the email in a link?
On Jul 18, 2013, at 4:51 AM, smilk <sunghee.bae at meritz.co.kr> wrote:
> rule "Eval Tree Node RPart_Model - 26 - Down"
> salience $children.size() - $children.indexOf( $child )
>
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "26", $children
> : children, children.size > 0 )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "26",
> $trail : trail,
> ( ( mAC_STAT_CD_RE == false &&
> vAC_STAT_CD_RE in ( "group0" ) ) ) || ( visitMode == "AGGREGATE_NODES" && (
> ( mAC_STAT_CD_RE == true ) ) ) )
> $child : String( this not memberOf $trail ) from $children
> then
> System.out.println( "Visiting node 26, going down to " + $child );
> modify ( $tok ) {
> getTrail().add( $child ),
> setDownward( true ),
> setCurrent( $child );
> }
> end
>
>
> rule "Eval Tree Node RPart_Model - 26 - True"
> salience 3
> no-loop
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "26", $out :
> outcome,
> children.size == 0, $conf : confidence, $tot :
> recordCount )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "26",
> $baseConf : confidence,
> $res : results, results.keySet not contains
> "26",
> visitMode != "AGGREGATE_NODES",
> ( mAC_STAT_CD_RE == false && vAC_STAT_CD_RE
> in ( "group0" ) )
> )
> then
> System.out.println( "TRUE Solution found at 26 !!!! " );
> modify( $tok ) {
> setConfidence( $baseConf * ( $conf.containsKey( $out ) ? (Double)
> $conf.get( $out ) : 1.0 ) ),
> setTotalCount( $tot ),
> setOutcome( $out ),
> setCurrent( "null" );
> }
> end
>
>
> rule "Eval Tree Node RPart_Model - 26 - Unknown Weighted"
> salience 3
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "26", $out :
> outcome )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "26",
> visitMode == "WEIGHTED_CONFIDENCE" || ==
> "LAST_PREDICTION" || == "NULL_PREDICTION",
> results.keySet not contains "26",
> ( mAC_STAT_CD_RE == true ) )
> then
> System.out.println( "UNKNOWN found at 26, collecting for later
> evaluation !!!! " );
> modify ( $tok ) { getResults().put( "26", $out ); }
> end
>
>
> rule "Eval Tree Node RPart_Model - 26 - Default Child"
> salience 3
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "26", $def :
> defaultChld != "null" && != null )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "26",
> visitMode == "DEFAULT_CHILD", downward == true,
> results.keySet not contains "26", $conf :
> confidence,
> ( mAC_STAT_CD_RE == true ) )
> then
> System.out.println( "UNKNOWN found at 26 !!!!, JUMPING TO Default Child
> " + $def );
> modify ( $tok ) {
> setConfidence( $conf * 1.0 ),
> setCurrent( $def );
> }
> end
>
>
> rule "Eval Tree Node RPart_Model - 26 - Default Child Undo Jump"
> salience 5
> no-loop
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "26", $def :
> defaultChld != "null" && != null )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "26",
> visitMode == "DEFAULT_CHILD", downward == false, $conf : confidence,
> ( mAC_STAT_CD_RE == true ) )
> then
> System.out.println( "UNKNOWN found at 26 !!!!, UNDOING JUMP penalty " +
> $def );
> modify ( $tok ) {
> setConfidence( $conf / 1.0 );
> }
> end
>
>
> rule "Eval Tree Node RPart_Model - 53 - Down"
> salience $children.size() - $children.indexOf( $child )
>
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "53", $children
> : children, children.size > 0 )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "53",
> $trail : trail,
> ( ( mAC_COT_DAY == false && vAC_COT_DAY <
> 1094 ) || ( ( mAGE_GRD == true ) && ( ( mAGE_GRD == false && vAGE_GRD in (
> "10대", "70대이상", "기타" ) ) ) ) ) || ( visitMode == "AGGREGATE_NODES" && ( ( (
> mAGE_GRD == true ) ) || ( ( mAC_COT_DAY == true ) ) ) ) )
> $child : String( this not memberOf $trail ) from $children
> then
> System.out.println( "Visiting node 53, going down to " + $child );
> modify ( $tok ) {
> getTrail().add( $child ),
> setDownward( true ),
> setCurrent( $child );
> }
> end
>
>
> rule "Eval Tree Node RPart_Model - 53 - True"
> salience 3
> no-loop
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "53", $out :
> outcome,
> children.size == 0, $conf : confidence, $tot :
> recordCount )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "53",
> $baseConf : confidence,
> $res : results, results.keySet not contains
> "53",
> visitMode != "AGGREGATE_NODES",
> ( mAC_COT_DAY == false && vAC_COT_DAY <
> 1094 ) || ( ( mAGE_GRD == true ) && ( ( mAGE_GRD == false && vAGE_GRD in (
> "10대", "70대이상", "기타" ) ) ) )
> )
> then
> System.out.println( "TRUE Solution found at 53 !!!! " );
> modify( $tok ) {
> setConfidence( $baseConf * ( $conf.containsKey( $out ) ? (Double)
> $conf.get( $out ) : 1.0 ) ),
> setTotalCount( $tot ),
> setOutcome( $out ),
> setCurrent( "null" );
> }
> end
>
>
> rule "Eval Tree Node RPart_Model - 53 - Unknown Weighted"
> salience 3
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "53", $out :
> outcome )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "53",
> visitMode == "WEIGHTED_CONFIDENCE" || ==
> "LAST_PREDICTION" || == "NULL_PREDICTION",
> results.keySet not contains "53",
> ( ( mAGE_GRD == true ) ) || ( (
> mAC_COT_DAY == true ) ) )
> then
> System.out.println( "UNKNOWN found at 53, collecting for later
> evaluation !!!! " );
> modify ( $tok ) { getResults().put( "53", $out ); }
> end
>
>
> rule "Eval Tree Node RPart_Model - 53 - Default Child"
> salience 3
> when
> $node : TreeNode( context == "RPart_Model", $id : id == "53", $def :
> defaultChld != "null" && != null )
> $tok : RPart_ModelTreeToken( context == "RPart_Model", current == "53",
> visitMode == "DEFAULT_CHILD", downward == true,
> results.keySet not contains "53", $conf :
> confidence,
> ( ( mAGE_GRD == true ) ) || ( (
> mAC_COT_DAY == true ) ) )
> then
> System.out.println( "UNKNOWN found at 53 !!!!, JUMPING TO Default Child
> " + $def );
> modify ( $tok ) {
> setConfidence( $conf * 1.0 ),
> setCurrent( $def );
> }
> end
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/PMML-Exception-excuting-consequence-for-rule-xxx-in-yyy-java-lang-NullPointerException-using-Knowledt-tp4024963p4025006.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list