Changeset 14107 for trunk/sources/HeuristicLab.ExtLibs
- Timestamp:
- 07/18/16 17:45:45 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/ALGLIB-3.7.0/dataanalysis.cs
r9268 r14107 10046 10046 10047 10047 10048 // HEAL pfleck 10049 /************************************************************************* 10050 Procesing 10051 10052 INPUT PARAMETERS: 10053 DF - decision forest model 10054 X - input vector, array[0..NVars-1]. 10055 10056 OUTPUT PARAMETERS: 10057 ys - result. Regression estimates for each tree when solving regression task. 10058 10059 -- HeuristicLab -- 10060 Copyright 18.07.2016 by HEAL, based on implementation of dfprocess by Bochkanov Sergey 10061 *************************************************************************/ 10062 public static void dfprocessraw(decisionforest df, 10063 double[] x, 10064 ref double[] ys) 10065 { 10066 int offs = 0; 10067 int i = 0; 10068 var y = new double[1]; 10069 10070 if (df.nclasses != 1) 10071 return; 10072 10073 // 10074 // Proceed 10075 // 10076 if (alglib.ap.len(ys)<df.ntrees) 10077 { 10078 ys = new double[df.ntrees]; 10079 } 10080 offs = 0; 10081 for (i=0; i<=df.ntrees-1; i++) { 10082 10083 // 10084 // Process basic tree 10085 // 10086 y[0] = 0; 10087 dfprocessinternal(df, offs, x, ref y); 10088 ys[i] = y[0]; 10089 10090 10091 // 10092 // Next tree 10093 // 10094 offs = offs+(int)Math.Round(df.trees[offs]); 10095 } 10096 } 10097 10098 10099 10048 10100 /************************************************************************* 10049 10101 Relative classification error on the test set 10050 10102 10051 10103 INPUT PARAMETERS: 10052 10104 DF - decision forest model 10053 10105 XY - test set 10054 10106 NPoints - test set size 10055 10107 10056 10108 RESULT: 10057 10109 percent of incorrectly classified cases. 10058 10110 Zero if model solves regression task. 10059 10111 10060 10112 -- ALGLIB -- 10061 10113 Copyright 16.02.2009 by Bochkanov Sergey
Note: See TracChangeset
for help on using the changeset viewer.