RME-EP Expert System Shell with Predictive Modeling and Deep Learning

Good news: Now you can develop decision support expert systems using deep learning techniques very easily. RME-EP is a perfect platform for that!

RME-EP (Rule-based Model Evaluation - Event Processing) is a very powerful expert system shell rule engine, supporting predictive modeling such as neural network, self organizing maps, decision tree, regression, time series, etc. It combines rule based "forward-inference" reasoning with predictive modeling, providing a powerful platform for Deep Learning.

RME-EP has been developed to use SQL-like expressions which can be learnt by business users and domain experts very easily and quickly. Non-IT professional users can write RME-EP expert system rules by themselves without IT professional help. RME-EP opens a new era for business users and domain experts.

SQL-like Business Rules for Business users

The popularity of SQL as the preferred database query language has been largely due to the natural intuitiveness of the language as well as the richness of logical expressions. SQL is very easy to learn. Expressions written in SQL is very easy to understand and hence has been widely used by many non-IT professional such as business analysts and users, as well as by IT professionals. RME-EP is based on SQL-99 syntax supporting most logical and arithmetic language features.

Predictive Modeling

The core concept of RME-EP is Rule-based Predictive Model Evaluation. RME-EP incorporates predictive models with many logical and mathematical functions of SQL-99 as patterns. By incorporating advanced predictive models into rule engine, RME-EP provides a superb platform for advanced rule-based expert systems and deep learning. RME-EP supports the following predictive models;

  1. Neural network: Neural network is a very powerful predictive modeling technique. CMSR/RME-EP provides neural modeling tools which are robust and intuitive but still easy to use. Neural network can be used to predict numerical scores as well as classifications.
  2. Neural Clustering: Neural clustering also known as Self Organizing Maps (SOM) is a very powerful clustering and segmentation method. When combined with other modeling methods, it renders very poweful Radial Basis Functions.
  3. Decision tree: Decision tree is primarily used for classification task. In addition, CMSR decision trees can also predict statistical probability of events.
  4. Regression: Regression is widely used technique by statisticians. It can predict numerical scores.
  5. Time-series analysis: RME-EP has built-in time-series regression functions. It can develop best regression functions based on RME-EP fact working sets.

(Example) Deep Learning Risk Modeling

The following is a RME-EP example for risk scoring, a la Deep Learning style. Note that this uses five neural network models: Model1, Model2, Model3, Model5 and Model6. In addition, it also uses a decision tree model Model4. Total 6 predictive models. Model1, 2, 3 and 4 evaluate input data. Model5 and 6 are used to integerate results of Model1 ~ 4.

In the begining, variables are declared. Rule 1, 2, 3 and 4 evaluate first four models and store on variables "Model1 score", "Model2 score", "Model3 score" and "Model4 score", respectively. Rule 5, then, computes maximum, minimum and average values of these three models. Rule 6 and 7 evaluate second tier integration models "Model5" and "Model6", using four model output values, maximum, minimum and average values. Final result scores will be stored on "Final score1" and "Final score2". Then average of these final value is computed by Rule 8. Based on "Final average" and Max/Min/Avg values, risk levels are verbalized by Rule 9 and 10. Viz;

  1. Three nueral networks (Model1, Model2 and Model3) and a decision tree (Model4) are evaluated (Rule 1, 2, 3 and 4).
  2. Maximum, minimum and average scores of three neural network models are computed (Rule 5).
  3. Two upper-level neural networks (Model5 and Model6) are evaluated (Rule 6 and 7).
  4. Final average score of two upper-level networks is computed (Rule 8).
  5. Final average score and max/min/avg scores are used to classify risk, and alternative classification based on max/min/avg scores is also given (Rule 9 and 10).

It is noted that this model incorporates neural network, decision tree and regression as a single RME-EP model. It is a decision support expert system on a model. The following is a screenshot of of this deep learning model output on MyDataSay Android Application. MyDataSay download has this model. You can download from the link. Note that RME-EP is a feature of CMSR Data Miner, you can download and try this model with CMSR Data Miner. Downloads contain more advanced sample models.

Deep Learning Model

The following is a coding of this model. It works! You just need to include your predictive models here.

// declare runtime options;
DECLARE OPTIONS EXPLICIT,ERRORNULL,MAXFIRE(0);

// define input data fields and values in appearing order;
DECLARE Gender AS STRING INPUT VALUES IN GENDER OF Model1;
DECLARE Race AS STRING INPUT VALUES IN RACE OF Model1;
DECLARE Jobpost AS STRING INPUT VALUES IN JOBPOST OF Model1;
DECLARE CLASSIFICATION1 AS STRING INPUT VALUES IN CLASSIFICATION1 OF Model1;
DECLARE EDUCLEVEL AS STRING INPUT VALUES IN EDUCLEVEL OF Model1;
DECLARE AGEGROUP AS STRING INPUT VALUES IN AGEGROUP OF Model1;
DECLARE Salary AS INTEGER INPUT VALUES IN SALARY OF Model1;

// define output fields in appearing order;
DECLARE "Model1 score", "Model2 score", "Model3 score" AS REAL OUTPUT;
DECLARE "Maximum score", "Minimum score", "Average score" AS REAL OUTPUT;
DECLARE "" AS STRING OUTPUT INITIAL VALUE ''; // to insert extra line in output
DECLARE "Model4 ratio"  AS REAL OUTPUT;
DECLARE " " AS STRING OUTPUT INITIAL VALUE '';  // to insert extra line in output
DECLARE "Final score1", "Final score2", "Final average" AS REAL OUTPUT;
DECLARE "  " AS STRING OUTPUT INITIAL VALUE '';  // to insert extra line in output
DECLARE "Risk level", "Risk level (MMA)" AS STRING OUTPUT;

RULE 1: // compute model 1 prediction;
IF TRUE THEN
	SET "Model1 score" AS PREDICT(Model1) USING(
		GENDER AS Gender,
		RACE AS Race,
		JOBPOST AS Jobpost,
		CLASSIFICATION1 AS CLASSIFICATION1,
		EDUCLEVEL  AS  EDUCLEVEL,
		AGEGROUP AS  AGEGROUP,
		SALARY AS Salary
	) 
END;

RULE 2: // compute model 2 prediction;
IF TRUE THEN
	SET "Model2 score" AS PREDICT(Model2) USING(
		GENDER AS Gender,
		RACE AS Race,
		JOBPOST AS Jobpost,
		CLASSIFICATION1 AS CLASSIFICATION1,
		EDUCLEVEL  AS  EDUCLEVEL,
		AGEGROUP AS  AGEGROUP,
		SALARY AS Salary
	) 
END;

RULE 3: // compute model 3 prediction;
IF TRUE THEN
	SET "Model3 score" AS PREDICT(Model3) USING(
		GENDER AS Gender,
		RACE AS Race,
		JOBPOST AS Jobpost,
		CLASSIFICATION1 AS CLASSIFICATION1,
		EDUCLEVEL  AS  EDUCLEVEL,
		AGEGROUP AS  AGEGROUP,
		SALARY AS Salary
	) 
END;

RULE 4: // compute model 4 decision tree probability of 'Risky' class;
IF TRUE THEN
	SET "Model4 ratio" AS PREDICT(Model4, 'Risky') USING(
		GENDER AS Gender,
		RACE AS Race,
		JOBPOST AS Jobpost,
		CLASSIFICATION1 AS CLASSIFICATION1,
		EDUCLEVEL  AS  EDUCLEVEL,
		AGEGROUP AS  AGEGROUP,
		SALARY AS Salary
	) 
END;

// compute max/min/avg of three neural network models;
RULE 5:  // decision tree output is excluded as it outputs different values;
IF TRUE THEN 
{
	SET "Maximum score" AS MAX("Model1 score", "Model2 score", "Model3 score");
	SET "Minimum score" AS MIN("Model1 score", "Model2 score", "Model3 score");
	SET "Average score" AS AVG("Model1 score", "Model2 score", "Model3 score");
}
END;

RULE 6: // compute final score1 using Model5;
IF TRUE THEN
	SET "Final score1" AS PREDICT(Model5) USING(
		Model1Score AS "Model1 score",
		Model2Score AS "Model2 score",
		Model3Score AS "Model3 score",
		Model4Score AS "Model4 ratio",  // for decision tree probability
		MaximumScore AS "Maximum score",
		MinimumScore  AS  "Minimum score",
		AverageScore AS  "Average score"
	) 
END;

RULE 7: // compute final score2 using Model6;
IF TRUE THEN
	SET "Final score2" AS PREDICT(Model6) USING(
		Model1Score AS "Model1 score",
		Model2Score AS "Model2 score",
		Model3Score AS "Model3 score",
		Model4Score AS "Model4 ratio",  // for decision tree probability
		MaximumScore AS "Maximum score",
		MinimumScore  AS  "Minimum score",
		AverageScore AS  "Average score"
	) 
END;

RULE 8:  // compute the average of final scores;
IF TRUE THEN 
	SET "Final average" AS AVG("Final score1", "Final score2")
END;

RULE  9:   // classify risk levels;
CASE  
WHEN "Final average" >= 0.7 THEN 
	SET "Risk level" AS 'Very high risk'    
WHEN "Final average" < 0.01 THEN 
	SET "Risk level" AS 'Low risk'    
WHEN "Final average" < 0.1 THEN 
	SET "Risk level" AS 'Medium risk'    
WHEN "Maximum score" >= 0.6 OR "Minimum score" >= 0.2 OR "Average score" >= 0.5 THEN 
	SET "Risk level" AS 'High risk'    
WHEN "Maximum score" >= 0.3 OR "Minimum score" >= 0.05 OR "Average score" >= 0.2 THEN 
	SET "Risk level" AS 'High risk'    
WHEN "Maximum score" >= 0.2 OR "Minimum score" >= 0.0 OR "Average score" >= 0.1 THEN 
	SET "Risk level" AS 'Medium risk'    
ELSE 
	SET "Risk level" AS 'Low risk'   
END;

RULE  10:   // alternative classification without using final average;
CASE  
WHEN "Maximum score" >= 0.6 OR "Minimum score" >= 0.2 OR "Average score" >= 0.5 THEN 
	SET "Risk level (MMA)" AS 'Very high risk'    
WHEN "Maximum score" >= 0.3 OR "Minimum score" >= 0.05 OR "Average score" >= 0.2 THEN 
	SET "Risk level (MMA)" AS 'High risk'    
WHEN "Maximum score" >= 0.2 OR "Minimum score" >= 0.0 OR "Average score" >= 0.1 THEN 
	SET "Risk level (MMA)" AS 'Medium risk'    
ELSE 
	SET "Risk level (MMA)" AS 'Low risk'   
END;

For more and software downloads, read CMSR Data Miner.