@frontlinesystems/rason-mcp-server 2026.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/LICENSE +35 -0
  2. package/README.md +282 -0
  3. package/examples/EXAMPLES_REFERENCE.md +128 -0
  4. package/examples/Optimization/Conic/AirlineHubConic.json +112 -0
  5. package/examples/Optimization/Conic/AirlineHubConic2.json +109 -0
  6. package/examples/Optimization/Conic/AirlineHubConic3.json +112 -0
  7. package/examples/Optimization/Conic/AirlineHubConic4.json +100 -0
  8. package/examples/Optimization/Conic/AirlineHubConic5.json +102 -0
  9. package/examples/Optimization/DataBinding/ProductMixCsv.json +82 -0
  10. package/examples/Optimization/DataBinding/ProductMixCsv4.json +96 -0
  11. package/examples/Optimization/DataBinding/ProductMixExcel.json +74 -0
  12. package/examples/Optimization/DataBinding/ProductMixExcel1.json +87 -0
  13. package/examples/Optimization/DataBinding/ProductMixExcel11.json +109 -0
  14. package/examples/Optimization/DataBinding/ProductMixExcel2.json +78 -0
  15. package/examples/Optimization/DataBinding/ProductMixTab.json +90 -0
  16. package/examples/Optimization/DataBinding/ProductMixTab1.json +74 -0
  17. package/examples/Optimization/DataBinding/ProductMixTab2.json +78 -0
  18. package/examples/Optimization/Linear/Inventory.json +200 -0
  19. package/examples/Optimization/Linear/Matop.json +120 -0
  20. package/examples/Optimization/Linear/ProductMix.json +98 -0
  21. package/examples/Optimization/Linear/ProductMix2.json +73 -0
  22. package/examples/Optimization/Linear/ProductMix3.json +50 -0
  23. package/examples/Optimization/Linear/ProductMix4.json +57 -0
  24. package/examples/Optimization/Linear/ProductMixCsv1.json +106 -0
  25. package/examples/Optimization/Linear/ProductMixCsv2.json +106 -0
  26. package/examples/Optimization/Linear/ProductMixSQL11.json +82 -0
  27. package/examples/Optimization/Linear/Rowop.json +127 -0
  28. package/examples/Optimization/NonLinear/AirlineHub.json +64 -0
  29. package/examples/Optimization/NonLinear/AirlineHub2.json +48 -0
  30. package/examples/Optimization/NonLinear/AirlineHub3.json +48 -0
  31. package/examples/Optimization/NonSmooth/Inventory2.json +160 -0
  32. package/examples/Optimization/Quadratic/PortfolioOpt.json +56 -0
  33. package/examples/Optimization/Quadratic/PortfolioOpt2.json +66 -0
  34. package/examples/Optimization/WithUncertainty/GasCompanyChance.json +79 -0
  35. package/examples/Optimization/WithUncertainty/GasCompanyRecourse.json +79 -0
  36. package/examples/Optimization/WithUncertainty/ProjectSelect.json +78 -0
  37. package/examples/Optimization/WithUncertainty/ProjectSelect2.json +82 -0
  38. package/examples/Optimization/WithUncertainty/ProjectSelect3.json +85 -0
  39. package/examples/Optimization/WithUncertainty/ProjectSelect4.json +75 -0
  40. package/examples/Simulation/CandyStoreSalesUsingSIP.json +148 -0
  41. package/examples/Simulation/CollegeFundGrowth1.json +424 -0
  42. package/examples/Simulation/CollegeFundGrowth1SIPModel.json +28 -0
  43. package/examples/Simulation/CollegeFundGrowth2.json +416 -0
  44. package/examples/Simulation/CollegeFundGrowthSIP.json +402 -0
  45. package/examples/Simulation/GBMSimulationModel.json +237 -0
  46. package/examples/Simulation/YieldManagement(Sim).json +70 -0
  47. package/examples/Simulation/YieldManagement2(Sim).json +73 -0
  48. package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +54 -0
  49. package/examples/calculation/DMNExamples/DMN Context example.json +69 -0
  50. package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -0
  51. package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -0
  52. package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -0
  53. package/examples/calculation/DMNExamples/FEEL For with two indices.json +16 -0
  54. package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -0
  55. package/examples/calculation/DMNExamples/FEEL If Then Else example.json +26 -0
  56. package/examples/calculation/DMNExamples/FEEL List example.json +38 -0
  57. package/examples/calculation/DMNExamples/FEEL List operator.json +17 -0
  58. package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +37 -0
  59. package/examples/calculation/DMNExamples/FEEL Some or Every example.json +66 -0
  60. package/examples/calculation/DecisionTables/DT Datasource example.json +53 -0
  61. package/examples/calculation/DecisionTables/DT Date and Time examples.json +92 -0
  62. package/examples/calculation/DecisionTables/DT Expression example.json +32 -0
  63. package/examples/calculation/DecisionTables/DT Hit Policy examples.json +137 -0
  64. package/examples/calculation/DecisionTables/DT Loan Recommend model.json +82 -0
  65. package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +219 -0
  66. package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -0
  67. package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +204 -0
  68. package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -0
  69. package/examples/calculation/DecisionTables/DT Output Order example.json +40 -0
  70. package/examples/calculation/DecisionTables/DT Unique example.json +39 -0
  71. package/examples/calculation/TypeDefinitions/TypeDefCF.json +65 -0
  72. package/examples/calculation/TypeDefinitions/TypeDefDT.json +58 -0
  73. package/examples/datamining/AffinityAnalysis/AssociationRules.json +52 -0
  74. package/examples/datamining/Classification/DecisionTree.json +91 -0
  75. package/examples/datamining/Classification/DiscriminantAnalysis.json +82 -0
  76. package/examples/datamining/Classification/Ensembles/Bagging.json +67 -0
  77. package/examples/datamining/Classification/Ensembles/Boosting.json +68 -0
  78. package/examples/datamining/Classification/Ensembles/RandomTrees.json +92 -0
  79. package/examples/datamining/Classification/FindBestModel.json +87 -0
  80. package/examples/datamining/Classification/LogisticRegression.json +83 -0
  81. package/examples/datamining/Classification/NaiveBayes.json +79 -0
  82. package/examples/datamining/Classification/NearestNeighbors.json +85 -0
  83. package/examples/datamining/Classification/NeuralNetwork.json +93 -0
  84. package/examples/datamining/Clustering/Hierarchical.json +55 -0
  85. package/examples/datamining/Clustering/KMeans.json +72 -0
  86. package/examples/datamining/DataSources/DelimitedFile.json +50 -0
  87. package/examples/datamining/DataSources/JSONFile.json +50 -0
  88. package/examples/datamining/DataSources/MSAccessDatabase.json +50 -0
  89. package/examples/datamining/DataSources/MSExcelTable.json +51 -0
  90. package/examples/datamining/DataSources/MSSQLDatabase.json +50 -0
  91. package/examples/datamining/DataSources/ODATATable.json +50 -0
  92. package/examples/datamining/DataSources/ODBCDatabase.json +50 -0
  93. package/examples/datamining/FeatureSelection/LinearWrapping.json +54 -0
  94. package/examples/datamining/FeatureSelection/LogisticWrapping.json +57 -0
  95. package/examples/datamining/FeatureSelection/Univariate.json +79 -0
  96. package/examples/datamining/Regression/DecisionTree.json +82 -0
  97. package/examples/datamining/Regression/Ensembles/Bagging.json +63 -0
  98. package/examples/datamining/Regression/Ensembles/Boosting.json +63 -0
  99. package/examples/datamining/Regression/Ensembles/RandomTrees.json +79 -0
  100. package/examples/datamining/Regression/FindBestModel.json +87 -0
  101. package/examples/datamining/Regression/LinearRegression.json +125 -0
  102. package/examples/datamining/Regression/NearestNeighbors.json +78 -0
  103. package/examples/datamining/Regression/NeuralNetwork.json +83 -0
  104. package/examples/datamining/Scoring/JSONClassifier.json +63 -0
  105. package/examples/datamining/Scoring/JSONClassifierNN.json +63 -0
  106. package/examples/datamining/Scoring/JSONClusterizer.json +38 -0
  107. package/examples/datamining/Scoring/JSONForecaster.json +50 -0
  108. package/examples/datamining/Scoring/JSONLinearRegression.json +57 -0
  109. package/examples/datamining/Scoring/JSONPCA.json +42 -0
  110. package/examples/datamining/Scoring/JSONRegressor.json +57 -0
  111. package/examples/datamining/Scoring/JSONTransformer.json +39 -0
  112. package/examples/datamining/Scoring/PMMLClassifier.json +43 -0
  113. package/examples/datamining/Scoring/PMMLForecaster.json +44 -0
  114. package/examples/datamining/Scoring/PMMLRegressor.json +39 -0
  115. package/examples/datamining/Scoring/PMMLTransformer.json +39 -0
  116. package/examples/datamining/Simulation/LinearRegressionSimulation.json +118 -0
  117. package/examples/datamining/Simulation/SyntheticDataGeneration.json +109 -0
  118. package/examples/datamining/Simulation/pmml-risk-scoring.json +63 -0
  119. package/examples/datamining/Summarizer/Summarization.json +55 -0
  120. package/examples/datamining/TextMining/LatentSemanticAnalysis.json +52 -0
  121. package/examples/datamining/TextMining/TfIdf-FileData.json +66 -0
  122. package/examples/datamining/TextMining/TfIdf-InlineData.json +56 -0
  123. package/examples/datamining/TimeSeries/AddHoltWinters.json +80 -0
  124. package/examples/datamining/TimeSeries/Arima.json +75 -0
  125. package/examples/datamining/TimeSeries/DoubleExponential.json +66 -0
  126. package/examples/datamining/TimeSeries/Exponential.json +65 -0
  127. package/examples/datamining/TimeSeries/LagAnalysis.json +49 -0
  128. package/examples/datamining/TimeSeries/MovingAverage.json +66 -0
  129. package/examples/datamining/TimeSeries/MulHoltWinters.json +66 -0
  130. package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +66 -0
  131. package/examples/datamining/Transformation/Binning.json +70 -0
  132. package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +48 -0
  133. package/examples/datamining/Transformation/CategoryReduction.json +52 -0
  134. package/examples/datamining/Transformation/Factorization.json +51 -0
  135. package/examples/datamining/Transformation/MissingDataHandling.json +84 -0
  136. package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +55 -0
  137. package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +49 -0
  138. package/examples/datamining/Transformation/PartitionTimeSeries.json +49 -0
  139. package/examples/datamining/Transformation/Partitioning-DF.json +73 -0
  140. package/examples/datamining/Transformation/Partitioning.json +47 -0
  141. package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +66 -0
  142. package/examples/datamining/Transformation/PartitioningWithOversampling.json +45 -0
  143. package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +53 -0
  144. package/examples/datamining/Transformation/Rescaling.json +68 -0
  145. package/examples/datamining/Transformation/Sampling.json +44 -0
  146. package/examples/datamining/Transformation/StratifiedSampling.json +47 -0
  147. package/examples/flow/SQLServerTransform.json +261 -0
  148. package/examples/flow/dm-calc-pipeline.json +278 -0
  149. package/examples/flow/dm-pipeline-simulation.json +114 -0
  150. package/examples/flow/opt-sim-pipeline.json +160 -0
  151. package/examples/flow/sim-dm-pipeline.json +107 -0
  152. package/examples/flow/sim-sim-pipeline.json +137 -0
  153. package/examples/index.json +4679 -0
  154. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +53 -0
  155. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +58 -0
  156. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +36 -0
  157. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +34 -0
  158. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +26 -0
  159. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +48 -0
  160. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +70 -0
  161. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +50 -0
  162. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +338 -0
  163. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +62 -0
  164. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +191 -0
  165. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +76 -0
  166. package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +109 -0
  167. package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +69 -0
  168. package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -0
  169. package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -0
  170. package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +155 -0
  171. package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +119 -0
  172. package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +143 -0
  173. package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +82 -0
  174. package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -0
  175. package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +114 -0
  176. package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +108 -0
  177. package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -0
  178. package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -0
  179. package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -0
  180. package/examples/rason-features/UserGuide/UGForecast.json +51 -0
  181. package/examples/rason-features/UserGuide/UGProductMix1.json +49 -0
  182. package/examples/rason-features/UserGuide/UGProductMix2.json +49 -0
  183. package/examples/rason-features/UserGuide/UGProductMixTab1.json +68 -0
  184. package/examples/rason-features/UserGuide/UGProductMixTab2.json +77 -0
  185. package/examples/rason-features/UserGuide/UGProductMixTab3.json +67 -0
  186. package/examples/rason-features/UserGuide/UGProductMixTab4.json +71 -0
  187. package/examples/rason-features/UserGuide/UGProductMixTab5.json +68 -0
  188. package/examples/rason-features/UserGuide/UGProjectSelect0.json +92 -0
  189. package/examples/rason-features/UserGuide/UGProjectSelect1.json +75 -0
  190. package/examples/rason-features/UserGuide/UGProjectSelect2.json +75 -0
  191. package/examples/rason-features/UserGuide/UGYieldManagement1.json +62 -0
  192. package/examples/rason-features/UserGuide/UGYieldManagement2.json +62 -0
  193. package/examples/rason-features/UserGuide/UGYieldManagement3.json +64 -0
  194. package/out/index.cjs +361 -0
  195. package/package.json +76 -0
@@ -0,0 +1,219 @@
1
+ {
2
+ "modelName": "DTLoanStrategyPredictiveCSVXML",
3
+ "modelDescription": "RASON Decision Table Example: Loan Strategy Example importing data using CSV and XML files: The difference between this example and the DTLoanStrategyPredictive exammple is that this example imports the predictive model from within the datasources section. The predictive model is then used to score new data. The output from the scoring is used as an input to a decision table.",
4
+ "modelType": "calculation",
5
+ "datasources": {
6
+ "comment": "Use this section to import data from an outside source.",
7
+ "score_src": {
8
+ "comment": "This data source contains the new data that will be scored by the predictive model. ",
9
+ "type": "csv",
10
+ "connection": "score_src.txt",
11
+ "colIndex": "score_h",
12
+ "direction": "import"
13
+ },
14
+ "pmml_src": {
15
+ "comment": "This data source contains the predictive model that will be used to score the new data, imported above.",
16
+ "type": "xml",
17
+ "connection": "pmml_src.xml",
18
+ "content": "pmml-model",
19
+ "direction": "import"
20
+ }
21
+ },
22
+ "decisionTables": {
23
+ "comment": "There are 8 decision tables in the decisionTables section. Outputs from some tables will be used as inputs for other tables.",
24
+ "tblAppRiskScore": {
25
+ "comment": "This decision table accepts 3 inputs, customer age, marital status and employment status, and returns a partial risk score. The collection of results will be added together to create the partial score. Note that the inputValues property limits the age to be 18 to 120, inclusive, the marital status to be s for single or m for married, the employment status as unemployed, employed, selfEmployed or student. A 40 yo single self employed person would be assigned a partialScore = 43 (rule 4) + 25 (rule 6) + 45 (rule 10) = 113.",
26
+ "inputs": [ "cust age", "marital status", "employment status" ],
27
+ "outputs": [ "partial score" ],
28
+ "refTypes": [ "", "", "", "" ],
29
+ "inputValues": [
30
+ [ "[18..120]", "s", "unemployed" ],
31
+ [ "", "m", "employed" ],
32
+ [ "", "", "selfemployed" ],
33
+ [ "", "", "student" ]
34
+ ],
35
+ "rules": [
36
+ [ "[18..21]", "-", "-", 32 ],
37
+ [ "(21..25]", "-", "-", 35 ],
38
+ [ "(25..35]", "-", "-", 40 ],
39
+ [ "(35..49]", "-", "-", 43 ],
40
+ [ ">49", "-", "-", 48 ],
41
+ [ "-", "s", "-", 25 ],
42
+ [ "-", "m", "-", 45 ],
43
+ [ "-", "-", "unemployed", 15 ],
44
+ [ "-", "-", "student", 18 ],
45
+ [ "-", "-", "employed", 45 ],
46
+ [ "-", "-", "selfemployed", 36 ]
47
+ ],
48
+ "hitPolicy": "C+"
49
+ },
50
+ "tblBureauRiskCat": {
51
+ "comment": "This decision table accepts 2 inputs, cust Exist (true if customer already has at least 1 more loans) and app Risk Score (partial score from tblAppRiskScore). With a hit policy of 'unique', only 1 rule, with a unique result, may be returned. ",
52
+ "inputs": [ "cust exist", "app risk score" ],
53
+ "outputs": [ "bureau risk cat" ],
54
+ "inputTypes": [ "", "" ],
55
+ "outputTypes": [ "" ],
56
+ "rules": [
57
+ [ false, "<100", "high" ],
58
+ [ false, "[100..120]", "medium" ],
59
+ [ false, "[120..130]", "low" ],
60
+ [ false, ">130", "veryLow" ],
61
+ [ true, "<80", "decline" ],
62
+ [ true, "[80..90]", "high" ],
63
+ [ true, "[90..110]", "medium" ],
64
+ [ true, ">110", "low" ]
65
+ ],
66
+ "hitPolicy": "U"
67
+ },
68
+ "tblBureauCallType": {
69
+ "comment": "This decision table accepts 1 input, bureau Risk Cat, which is the output of the tblBureauRiskCat decision table.",
70
+ "inputs": [ "bureau risk cat" ],
71
+ "outputs": [ "bureau call type" ],
72
+ "rules": [
73
+ [ "high, medium", "full" ],
74
+ [ "low", "mini" ],
75
+ [ "veryLow, decline", "none" ]
76
+ ],
77
+ "hitPolicy": "U"
78
+ },
79
+ "tblEligibility": {
80
+ "comment": "This decision table accepts 3 inputs, bureau Risk Cat (which is the output of the tblAppriskScore decision table), bureau afford (a statistic calculated in the formulas section) and the customer's age. The customer's eligibility will be returned in the result. Note that there are only two outputs: 'ineligible' or 'eligible' as given in the outputValues property.",
81
+ "inputs": [ "bureau risk cat", "bureau afford", "cust age" ],
82
+ "outputs": [ "eligibility" ],
83
+ "refTypes": [ "", "", "", "" ],
84
+ "outputValues": [ "ineligible", "eligible" ],
85
+ "rules": [
86
+ [ "decline", "-", "-", "ineligible" ],
87
+ [ "-", false, "-", "ineligible" ],
88
+ [ "-", "-", "<18", "ineligible" ],
89
+ [ "-", "-", "-", "eligible" ]
90
+ ],
91
+ "hitPolicy": "P"
92
+ },
93
+ "tblStrategy": {
94
+ "comment": "This decision table accepts 2 inputs, eligibility and bureau Call Type. The strategy will be returned in the result.",
95
+ "inputs": [ "eligibility", "bureau call type" ],
96
+ "outputs": [ "strategy" ],
97
+ "rules": [
98
+ [ "ineligible", "-", "decline" ],
99
+ [ "eligible", "full, mini", "bureau" ],
100
+ [ "eligible", "none", "through" ]
101
+ ],
102
+ "hitPolicy": "U"
103
+ },
104
+ "tblCreditContFactor": {
105
+ "comment": "This decision table accepts 1 input, bureau Risk Cat, and returns the credit Cont Factor.",
106
+ "inputs": [ "bureau risk cat" ],
107
+ "outputs": [ "credit cont factor" ],
108
+ "rules": [
109
+ [ "high, decline", 0.6 ],
110
+ [ "medium", 0.7 ],
111
+ [ "low, veryLow", 0.8 ]
112
+ ],
113
+ "hitPolicy": "U"
114
+ }
115
+ },
116
+ "data": {
117
+ "comment": "Use this section to organize all constant data parameters in the RASON model.",
118
+ "scoreData": {
119
+ "comment": "Binds the score_src dataSource (importing the new data) to this data parameter.",
120
+ "binding": "score_src"
121
+ },
122
+ "pmodel": {
123
+ "binding": "pmml_src",
124
+ "comment": "Binds the pmml_src dataSource to pmodel data parameter."
125
+ },
126
+ "custAge": {
127
+ "value": 40,
128
+ "comment": "Applicant's age"
129
+ },
130
+ "maritalStatus": {
131
+ "value": "s",
132
+ "comment": "The marital statis of the applicant."
133
+ },
134
+ "employmentStatus": {
135
+ "value": "selfemployed",
136
+ "comment": "The employment status of the applicant."
137
+ },
138
+ "custExist": {
139
+ "value": false,
140
+ "comment": "true is the applicant is an existing customer, false otherwise."
141
+ },
142
+ "monthIncome": {
143
+ "value": 2500,
144
+ "comment": "applicant's monthly income"
145
+ },
146
+ "loanRate": {
147
+ "value": 5,
148
+ "comment": "loan's interest rate"
149
+ },
150
+ "loanTerm": {
151
+ "value": 30,
152
+ "comment": "term of the loan, in months"
153
+ },
154
+ "loanAmnt": {
155
+ "value": 100000,
156
+ "comment": "Amount of the loan, in US dollars"
157
+ },
158
+ "monthExpenses": {
159
+ "value": 1000,
160
+ "comment": "Applicant's monthly expenses"
161
+ },
162
+ "loanType": {
163
+ "value": "standard",
164
+ "comment": "The type of loan being applied for."
165
+ }
166
+ },
167
+ "formulas": {
168
+ "appRiskScore": {
169
+ "formula": "MIN(PsiPredict(pmodel, scoreData),tblAppRiskScore(, , custAge, maritalStatus, employmentStatus))",
170
+ "comment": "Calls the tblAppRiskScore decision table to compute the applicant's risk score.",
171
+ "finalValue": []
172
+ },
173
+ "bureauRiskCat": {
174
+ "formula": "tblBureauRiskCat(, , custExist, appRiskScore)",
175
+ "comment": "Calls the tblBureauRiskCat decision table. Note that output from the tblAppRiskScore decision table, appRiskScore, is an input to this decision table.",
176
+ "finalValue": []
177
+ },
178
+ "bureauCallType": {
179
+ "formula": "tblBureauCallType(, , bureauRiskCat)",
180
+ "comment": "Calls the tblBureauCallType decision table to compute the bureau's risk category.",
181
+ "finalValue": []
182
+ },
183
+ "monthRepay": {
184
+ "formula": "-PMT(loanRate%/12, loanTerm*12, loanAmnt)",
185
+ "comment": "computes the portion of the monthly installment attributable to the loan."
186
+ },
187
+ "disposIncome": {
188
+ "formula": "monthIncome - (monthRepay + monthExpenses)",
189
+ "comment": "Computes the applicant's disposable income."
190
+ },
191
+ "monthFee": {
192
+ "formula": "IF(loanType = 'standard', 20, IF(loanType = 'special', 25, 0))",
193
+ "comment": "Computes the fee assoicated with the loan."
194
+ },
195
+ "monthInstall": {
196
+ "formula": "monthRepay + monthFee",
197
+ "comment": "Computes the total installment payment including loan replayment and fee portions."
198
+ },
199
+ "bureauAfford": {
200
+ "formula": "IF(disposIncome * creditContFactor > monthInstall, TRUE, FALSE)",
201
+ "comment": "Determines if the applicant will be able to afford the monthly installment payment."
202
+ },
203
+ "eligibility": {
204
+ "formula": "tblEligibility(, , bureauRiskCat, bureauAfford, custAge)",
205
+ "comment": "Determines if the applicant is eligibile to receive a loan from the institution.",
206
+ "finalValue": []
207
+ },
208
+ "strategy": {
209
+ "formula": "tblStrategy(, , eligibility, bureauCallType)",
210
+ "comment": "Uses outputs from the tblEligibility and tblBureauCallType tables to determine the best strategy for the applicant.",
211
+ "finalValue": []
212
+ },
213
+ "creditContFactor": {
214
+ "formula": "tblCreditContFactor(, , bureauRiskCat)",
215
+ "comment": "Calls the tblCreditContFactor table using the output from the tblBureauRiskCat decision table. ",
216
+ "finalValue": []
217
+ }
218
+ }
219
+ }
@@ -0,0 +1,286 @@
1
+ {
2
+ "modelName": "DTLoanStrategyExamplewDatasource",
3
+ "modelDescription": "RASON Decision Table Example: Loan Strategy model with imported data sources: The difference between this example and the original DTLoanStrategyModel, is that this example imports the customer data and loan data from an outside data source, in this example two CVS files: customers.txt and loans.txt.",
4
+ "modelType": "calculation",
5
+ "datasources": {
6
+ "comment": "This section is used to import data from outside sources. To download these files, click Download RASON Example Data on the Editor tab ribbon. All data files related to all RASON examples will be downloaded. To solve this model, click Choose Files from the Properties pane on the right, browse to the location of the downloaded files and select customer.txt and loans.txt, then click Open. In the previous example, DTLoanStrategyModel, all data used in the model was simply passed as constants in the file. This example, however, demonstrates how to import this same data from an external data file using a parametric selection criteria. A Parametric Selection allows a single record to be selected from an external datasource file as an input. Parametric selection in data-sources is universal, it is critical to decision tables, which expect a single record for their inputs. All supported data types may be used with this feature.",
7
+ "cust_data": {
8
+ "comment": "The datasource, cust_data, binds to the customers.txt csv file. This file contains five input parameters, age, maritalStatus, employmentStatus, creditScore and bankrupt. Inside of the cust_data datasource, we see the connection argument passing the CSV file, 'connection': 'customers.txt' (screenshot above). The selection argument selects the 'CustID' column , from the customers.txt file, and replaces 'custID = ?' with 'custID = cuID'; the parameters argument binds 'cuID' to 'c1'. In addition, indexCols is set to 'cust ID' and valueCols are set to 'age', 'maritalStatus', 'employmentStatus', 'creditScore' and 'bankrupt'. This means that cust ID is the index column and 'age', 'maritalStatus', 'employmentStatus', 'creditScore' and 'bankrupt' are the value columns.",
9
+ "type": "csv",
10
+ "connection": "customers_dt.txt",
11
+ "selection": "custID = ?",
12
+ "parameters": {
13
+ "cuID": {
14
+ "binding": "get",
15
+ "value": "c1"
16
+ }
17
+ },
18
+ "indexCols": [ "custID" ],
19
+ "valueCols": [ "age", "maritalStatus", "employmentStatus", "creditScore", "bankrupt" ],
20
+ "direction": "import"
21
+ },
22
+ "loan_data": {
23
+ "comment": "Inside of the loan_data datasource, we see the connection argument passing the CSV file, connection: 'loans.txt' (screenshot above). The selection argument selects the 'loanID' column , from the loans.txt file, and replaces 'loanID = ?' with 'loanID = loID'; the parameters argument binds 'loID' to 'l1'. In addition, indexCols is set to 'loanID' and valueCols are set to 'type', 'rate' and 'term'. This means that loanID is the index column and 'type', 'rate' and 'term' are the value columns.",
24
+ "type": "csv",
25
+ "connection": "loans.txt",
26
+ "selection": "loanID = ?",
27
+ "parameters": {
28
+ "loID": {
29
+ "binding": "get",
30
+ "value": "l1"
31
+ }
32
+ },
33
+ "indexCols": [ "loanID" ],
34
+ "valueCols": [ "type", "rate", "term" ],
35
+ "direction": "import"
36
+ }
37
+ },
38
+ "data": {
39
+ "comment": "Use the data section to organize constant data parameters in the RASON model.",
40
+ "custExist": {
41
+ "comment": "True if the applicant is an existing customer; false if not.",
42
+ "value": false
43
+ },
44
+ "custAge": {
45
+ "comment": "Binds the age column from cust_data datasource to data parameter, custAge.",
46
+ "value": 40,
47
+ "binding": "cust_data",
48
+ "valueCol": "age"
49
+ },
50
+ "maritalStatus": {
51
+ "comment": "Binds the maritalStatus column from cust_data datasource to data parameter, maritalStatus.",
52
+ "value": "s",
53
+ "binding": "cust_data",
54
+ "valueCol": "maritalStatus"
55
+ },
56
+ "employmentStatus": {
57
+ "comment": "Binds the employmentStatus column from cust_data datasource to data parameter,employmentStatus ",
58
+ "value": "selfEmployed",
59
+ "binding": "cust_data",
60
+ "valueCol": "employmentStatus"
61
+ },
62
+ "creditScore": {
63
+ "comment": "Binds the creditScore column from cust_data datasource to data parameter, creditScore.",
64
+ "value": 610,
65
+ "binding": "cust_data",
66
+ "valueCol": "creditScore"
67
+ },
68
+ "bankrupt": {
69
+ "comment": "Binds the creditScore column from cust_data datasource to data parameter, creditScore.",
70
+ "value": false,
71
+ "binding": "cust_data",
72
+ "valueCol": "bankrupt"
73
+ },
74
+ "monthIncome": {
75
+ "comment": "Applicant's monthly income. Note the 'binding':'get' property. This property allows access to this parameter outside of the RASON model environment.",
76
+ "value": 2500,
77
+ "binding": "get"
78
+ },
79
+ "monthExpenses": {
80
+ "comment": "Applicant's monthly expenses. Note the 'binding':'get' property. This property allows access to this parameter outside of the RASON model environment.",
81
+ "value": 1000,
82
+ "binding": "get"
83
+ },
84
+ "loanType": {
85
+ "comment": "Binds the type column from loan_data datasource to data parameter, loanType.",
86
+ "value": "standard",
87
+ "binding": "loan_data",
88
+ "valueCol": "type"
89
+ },
90
+ "loanRate": {
91
+ "comment": "Binds the rate column from loan_data datasource to data parameter, loanRate.",
92
+ "value": 5.0,
93
+ "binding": "loan_data",
94
+ "valueCol": "rate"
95
+ },
96
+ "loanTerm": {
97
+ "comment": "Binds the term column from loan_data datasource to data parameter, loanTerm.",
98
+ "value": 30,
99
+ "binding": "loan_data",
100
+ "valueCol": "term"
101
+ },
102
+ "loanAmnt": {
103
+ "comment": "The prospective loan amount. Note the 'binding':'get' property. This property allows access to this parameter outside of the RASON model environment.",
104
+ "value": 100000.0,
105
+ "binding": "get"
106
+ }
107
+ },
108
+ "decisionTables": {
109
+ "comment": "There are 8 decision tables in the model.",
110
+ "tblAppRiskScore": {
111
+ "comment": "This decision table accepts 3 inputs, customer age, marital status and employment status, and returns a partial risk score. The collection of results will be added together to create the partial score. Note that the inputValues property limits the age to be 18 to 120, inclusive, the marital status to be s for single or m for married, the employment status as unemployed, employed, selfEmployed or student. A 40 yo single self employed person would be assigned a partialScore = 43 (rule 4) + 25 (rule 6) + 45 (rule 10) = 113.",
112
+ "inputs": [ "custAge", "maritalStatus", "employmentStatus" ],
113
+ "outputs": [ "partialScore" ],
114
+ "inputValues": [
115
+ [ "[18..120]", "s", "unemployed" ],
116
+ [ null, "m", "employed" ],
117
+ [ null, null, "selfEmployed" ],
118
+ [ null, null, "student" ]
119
+ ],
120
+ "rules": [
121
+ [ "[18..21]", "-", "-", 32 ],
122
+ [ "(21..25]", "-", "-", 35 ],
123
+ [ "(25..35]", "-", "-", 40 ],
124
+ [ "(35..49]", "-", "-", 43 ],
125
+ [ ">49", "-", "-", 48 ],
126
+ [ "-", "s", "-", 25 ],
127
+ [ "-", "m", "-", 45 ],
128
+ [ "-", "-", "unemployed", 15 ],
129
+ [ "-", "-", "student", 18 ],
130
+ [ "-", "-", "employed", 45 ],
131
+ [ "-", "-", "selfEmployed", 36 ]
132
+ ],
133
+ "hitPolicy": "collect+"
134
+ },
135
+ "tblBureauRiskCat": {
136
+ "comment": "This decision table accepts 2 inputs, custExist (true if customer already has at least 1 more loans) and appRiskScore (partial score from tblAppRiskScore). With a hit policy of 'unique', only 1 rule, with a unique result, may be returned. ",
137
+ "inputs": [ "custExist", "appRiskScore" ],
138
+ "outputs": [ "bureauRiskCat" ],
139
+ "rules": [
140
+ [ false, "<100", "high" ],
141
+ [ false, "[100..120)", "medium" ],
142
+ [ false, "[120..130]", "low" ],
143
+ [ false, ">130", "veryLow" ],
144
+ [ true, "<80", "decline" ],
145
+ [ true, "[80..90)", "high" ],
146
+ [ true, "[90..110]", "medium" ],
147
+ [ true, ">110", "low" ]
148
+ ],
149
+ "hitPolicy": "unique"
150
+ },
151
+ "tblBureauCallType": {
152
+ "comment": "This decision table accepts 1 input, bureauRiskCat, which is the output of the tblBureauRiskCat decision table.",
153
+ "inputs": [ "bureauRiskCat" ],
154
+ "outputs": [ "bureauCallType" ],
155
+ "rules": [
156
+ [ "high,medium", "full" ],
157
+ [ "low", "mini" ],
158
+ [ "veryLow,decline", "none" ]
159
+ ],
160
+ "hitPolicy": "unique"
161
+ },
162
+ "tblEligibility": {
163
+ "comment": "This decision table accepts 3 inputs, bureauRiskCat (which is the output of the tblAppriskScore decision table), bureauAfford (a statistic calculated in the formula's section) and the customer's age. The customer's eligibility will be returned in the result. Note that there are only two outputs: 'ineligible' or 'eligible' as given in the outputValues property.",
164
+ "inputs": [ "bureauRiskCat", "bureauAfford", "custAge" ],
165
+ "outputs": [ "eligibility" ],
166
+ "outputValues": [ "ineligible", "eligible" ],
167
+ "rules": [
168
+ [ "decline", "-", "-", "ineligible" ],
169
+ [ "-", false, "-", "ineligible" ],
170
+ [ "-", "-", "<18", "ineligible" ],
171
+ [ "-", "-", "-", "eligible" ]
172
+ ],
173
+ "hitPolicy": "priority"
174
+ },
175
+ "tblCreditContFactor": {
176
+ "comment": "This decision table accepts 1 input, bureauRiskCat, and returns the creditContFactor.",
177
+ "inputs": [ "bureauRiskCat" ],
178
+ "outputs": [ "creditContFactor" ],
179
+ "rules": [
180
+ [ "high,decline", 0.6 ],
181
+ [ "medium", 0.7 ],
182
+ [ "low,veryLow", 0.8 ]
183
+ ],
184
+ "hitPolicy": "unique"
185
+ },
186
+ "tblStrategy": {
187
+ "comment": "This decision table accepts 2 inputs, eligibility and bureauCallType. The strategy will be returned in the result.",
188
+ "inputs": [ "eligibility", "bureauCallType" ],
189
+ "outputs": [ "strategy" ],
190
+ "rules": [
191
+ [ "ineligible", "-", "decline" ],
192
+ [ "eligible", "full,mini", "bureau" ],
193
+ [ "eligible", "none", "through" ]
194
+ ],
195
+ "hitPolicy": "unique"
196
+ },
197
+ "tblPostBureauRiskCat": {
198
+ "comment": "This decision table accepts 3 inputs, custExist, appRiskScore (which is the output of the tblBureauRiskCat decision table) and creditScore. The customer's credit factor will be returned in the result.",
199
+ "inputs": [ "custExist", "appRiskScore", "creditScore" ],
200
+ "outputs": [ "postBureauRiskCat" ],
201
+ "rules": [
202
+ [ false, "<120", "<590", "high" ],
203
+ [ false, "<120", "[590..610]", "medium" ],
204
+ [ false, "<120", ">610", "low" ],
205
+ [ false, "[120..130]", "<600", "high" ],
206
+ [ false, "[120..130]", "[600..625]", "medium" ],
207
+ [ false, "[120..130]", ">625", "low" ],
208
+ [ false, ">130", "-", "veryLow" ],
209
+ [ true, "<=100", "<580", "high" ],
210
+ [ true, "<=100", "[580..600]", "medium" ],
211
+ [ true, "<=100", ">600", "low" ],
212
+ [ true, ">100", "<590", "high" ],
213
+ [ true, ">100", "[590..615]", "medium" ],
214
+ [ true, ">100", ">615", "low" ]
215
+ ],
216
+ "hitPolicy": "unique"
217
+ },
218
+ "tblRouting": {
219
+ "comment": "This decision table accepts 4 inputs: postBureauRiskCat, postBureauAfford, bankrupt and creditScore. The application routing number will be returned in the result.",
220
+ "inputs": [ "postBureauRiskCat", "postBureauAfford", "bankrupt", "creditScore" ],
221
+ "outputs": [ "routing" ],
222
+ "inputValues": [
223
+ [ null, null, true, "[0..999]" ],
224
+ [ null, null, false, null ]
225
+ ],
226
+ "outputValues": [ "decline", "refer", "accept" ],
227
+ "rules": [
228
+ [ "-", false, "-", "-", "decline" ],
229
+ [ "-", "-", true, "-", "decline" ],
230
+ [ "high", "-", "-", "-", "refer" ],
231
+ [ "-", "-", "-", "<580", "refer" ],
232
+ [ "-", "-", "-", "-", "accept" ]
233
+ ],
234
+ "hitPolicy": "priority"
235
+ }
236
+ },
237
+ "formulas": {
238
+ "comment": "Use the formulas section to calculate the decision tables.",
239
+ "monthFee": {
240
+ "comment": "Determines the monthly fees for each loanType, standard or special.",
241
+ "formula": "IF(loanType[1] = 'standard', 20, IF(loanType[1] = 'special', 25, 0))"
242
+ },
243
+ "monthRepay": {
244
+ "comment": "Determines the portion of the installment payment attributable to principal replayment.",
245
+ "formula": "-PMT(loanRate[1]%/12, loanTerm[1]*12, loanAmnt)"
246
+ },
247
+ "monthInstall": {
248
+ "comment": "Calculates the total installment payment.",
249
+ "formula": "monthRepay + monthFee"
250
+ },
251
+ "disposIncome": {
252
+ "comment": "Calculates the applicant's disposeable income.",
253
+ "formula": "monthIncome - (monthRepay + monthExpenses)"
254
+ },
255
+ "appRiskScore": {
256
+ "comment": "Calls the tblAppRiskScore decision table.",
257
+ "formula": "tblAppRiskScore(,, custAge[1], maritalStatus[1], employmentStatus[1])"
258
+ },
259
+ "bureauRiskCat": {
260
+ "comment": "Calls the tblBureauRiskCat decision table.",
261
+ "formula": "tblBureauRiskCat(,, custExist, appRiskScore)"
262
+ },
263
+ "bureauAfford": {
264
+ "comment": "Calculates if the applicant can afford the loan repayment by calling the tblCreditContFactor decision table.",
265
+ "formula": "IF(disposIncome * tblCreditContFactor(,, bureauRiskCat) > monthInstall, true, false)"
266
+ },
267
+ "strategy": {
268
+ "comment": "Calls the tblsStrategy decision table. Note that the final value for this formula will be included in the results due to the exitence of the finalValue property.",
269
+ "formula": "tblStrategy(,, tblEligibility(,, bureauRiskCat, bureauAfford, custAge[1]), tblBureauCallType(,, bureauRiskCat))",
270
+ "finalValue": []
271
+ },
272
+ "postBureauRiskCat": {
273
+ "comment": "Calls the tblPostBureauRiskCat decision table.",
274
+ "formula": "tblPostBureauRiskCat(,, custExist, appRiskScore, creditScore[1])"
275
+ },
276
+ "postBureauAfford": {
277
+ "comment": "Multiples disposable income by the outcome of a call to the tblCreditContFactor decision table.",
278
+ "formula": "IF(disposIncome * tblCreditContFactor(,, postBureauRiskCat) > monthInstall, true, false)"
279
+ },
280
+ "routing": {
281
+ "comment": "Calls the tblRouting decsion table to determine how the application should be accepted or not. Note that the final value for this formula will be included in the results due to the exitence of the finalValue property.",
282
+ "formula": "tblRouting(,, postBureauRiskCat, postBureauAfford, bankrupt[1], creditScore[1])",
283
+ "finalValue": []
284
+ }
285
+ }
286
+ }