Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/04/17 13:59:42 (7 years ago)
Author:
gkronber
Message:

#2631: merged r14107 and r14230 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.ExtLibs

  • stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/ALGLIB-3.7.0/dataanalysis.cs

    r9268 r14822  
    1004610046
    1004710047
     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
    1004810100        /*************************************************************************
    1004910101        Relative classification error on the test set
    10050 
     10102       
    1005110103        INPUT PARAMETERS:
    1005210104            DF      -   decision forest model
    1005310105            XY      -   test set
    1005410106            NPoints -   test set size
    10055 
     10107       
    1005610108        RESULT:
    1005710109            percent of incorrectly classified cases.
    1005810110            Zero if model solves regression task.
    10059 
     10111       
    1006010112          -- ALGLIB --
    1006110113             Copyright 16.02.2009 by Bochkanov Sergey
Note: See TracChangeset for help on using the changeset viewer.