コード例 #1
0
        /// <summary>
        /// Runs the SAS Regression procedure must have a SampleLocations, OutWorkspace, DependentField, IndependentFields, and optinally Validate and Weight must be specified to run
        /// Running the procedure will create a series of files within the SAS output directory (Workspace path \\SASOUTPUT\Regression) These files include; prc.log, prc.sas, prc.lst, outest.csv, and another csv
        /// file of the sample data named after the sample location feature class. Prc.log is the SAS log file. Prc.lst is the output from the SAS procedure. Prc.sas is the SAS code used to run the regression
        /// procedure. Outest.csv is the parameter output file, and [SampleLocationName].csv is the input data used by the sas procedure.
        /// </summary>
        public void runSasProcedure()
        {
            sasIntegration sInt = new sasIntegration(SampleLocations, SasProcedure.REGRESSION);

            sInt.DependentField    = Dependentfield;
            sInt.IndependentFields = IndependentFields;
            sInt.Validation        = Validate;
            sInt.Weightfield       = WeightField;
            sInt.StepWiseSelection = StepWiseSelection;
            sInt.SLE      = (System.Convert.ToDouble(SlEnter) / 100).ToString();
            sInt.SLS      = (System.Convert.ToDouble(SlStay) / 100).ToString();
            SasOutputFile = sInt.RunProcedure();
            outRest       = sInt.OutResultsPath;
            outLog        = sInt.OutLogPath;
            outSas        = sInt.OutSasPath;
            sasoutdir     = sInt.OutDirectory;
        }
コード例 #2
0
        /// <summary>
        /// Runs the SAS logistic procedure must have a SampleLocations, OutWorkspace, DependentField, IndependentFields, ClassFields, and optionally Validate and Weight must be specified to run
        /// Running the procedure will create a series of files within the SAS output directory (Workspace path \\SASOUTPUT) These files include; prc.log, prc.sas, prc.lst, outest.csv, and another csv
        /// file of the sample data named after the sample location feature class. Prc.log is the SAS log file. Prc.lst is the output from the SAS procedure. Prc.sas is the SAS code to run the logistic
        /// procedure. Outest.csv is the parameter output file, and [SampleLocationName].csv is the input data used by the sas procedure.
        /// </summary>
        public void runSasProcedure()
        {
            IQueryFilter qry = new QueryFilterClass();

            qry.SubFields = dependentfield;
            IFeatureCursor fCur   = samplelocations.Search(qry, false);
            int            dIndex = fCur.FindField(dependentfield);
            IFeature       fRow   = fCur.NextFeature();
            List <string>  sLst   = new List <string>();

            while (fRow != null)
            {
                string vl = fRow.get_Value(dIndex).ToString();
                if (!sLst.Contains(vl))
                {
                    sLst.Add(vl);
                }
                fRow = fCur.NextFeature();
            }
            sasIntegration sInt = null;

            if (sLst.Count > 2)
            {
                sInt = new sasIntegration(SampleLocations, SasProcedure.GENERLIZED_LOGISTIC);
            }
            else
            {
                sInt = new sasIntegration(SampleLocations, SasProcedure.LOGISTIC);
            }
            sInt.SLS = (System.Convert.ToDouble(SlStay) / 100).ToString();
            sInt.SLE = (System.Convert.ToDouble(SlEnter) / 100).ToString();
            sInt.StepWiseSelection = StepWiseSelection;
            sInt.DependentField    = Dependentfield;
            sInt.DescretFields     = ClassFields;
            sInt.IndependentFields = IndependentFields;
            sInt.Validation        = Validate;
            sInt.Weightfield       = WeightField;
            SasOutputFile          = sInt.RunProcedure();
            outRest = sInt.OutResultsPath;
            outLog  = sInt.OutLogPath;
            outSas  = sInt.OutSasPath;
        }
コード例 #3
0
        /// <summary>
        /// Runs the SAS logistic procedure must have a SampleLocations, OutWorkspace, DependentField, IndependentFields, ClassFields, and optionally Validate and Weight must be specified to run
        /// Running the procedure will create a series of files within the SAS output directory (Workspace path \\SASOUTPUT) These files include; prc.log, prc.sas, prc.lst, outest.csv, and another csv
        /// file of the sample data named after the sample location feature class. Prc.log is the SAS log file. Prc.lst is the output from the SAS procedure. Prc.sas is the SAS code to run the logistic
        /// procedure. Outest.csv is the parameter output file, and [SampleLocationName].csv is the input data used by the sas procedure.
        /// </summary>
        public void runSasProcedure()
        {
            IQueryFilter qry = new QueryFilterClass();

            qry.SubFields = MapField;
            IFeatureCursor fCur   = samplelocations.Search(qry, false);
            int            dIndex = fCur.FindField(MapField);
            IFeature       fRow   = fCur.NextFeature();
            List <string>  sLst   = new List <string>();

            while (fRow != null)
            {
                string vl = fRow.get_Value(dIndex).ToString();
                if (!sLst.Contains(vl))
                {
                    sLst.Add(vl);
                }
                fRow = fCur.NextFeature();
            }
            sasIntegration sInt = new sasIntegration(SampleLocations, SasProcedure.ACCURACYASSESSMENT);

            sInt.Alpha             = Alpha;
            sInt.DependentField    = MapField;
            sInt.DescretFields     = ClassFields;
            sInt.IndependentFields = new string[] { ReferenceField };
            sInt.Weightfield       = WeightField;
            sInt.Validation        = false;
            sInt.StepWiseSelection = Exact;
            SasOutputFile          = sInt.RunProcedure();
            outRest = sInt.OutResultsPath;
            outLog  = sInt.OutLogPath;
            outSas  = sInt.OutSasPath;
            if (InTable != null)
            {
                addConfidenceIntervals();
            }
        }
 /// <summary>
 /// Runs the SAS logistic procedure must have a SampleLocations, OutWorkspace, DependentField, IndependentFields, ClassFields, and optionally Validate and Weight must be specified to run
 /// Running the procedure will create a series of files within the SAS output directory (Workspace path \\SASOUTPUT) These files include; prc.log, prc.sas, prc.lst, outest.csv, and another csv
 /// file of the sample data named after the sample location feature class. Prc.log is the SAS log file. Prc.lst is the output from the SAS procedure. Prc.sas is the SAS code to run the logistic
 /// procedure. Outest.csv is the parameter output file, and [SampleLocationName].csv is the input data used by the sas procedure. 
 /// </summary>
 public void runSasProcedure()
 {
     IQueryFilter qry = new QueryFilterClass();
     qry.SubFields = dependentfield;
     IFeatureCursor fCur = samplelocations.Search(qry, false);
     int dIndex = fCur.FindField(dependentfield);
     IFeature fRow = fCur.NextFeature();
     List<string> sLst = new List<string>();
     while (fRow != null)
     {
         string vl = fRow.get_Value(dIndex).ToString();
         if (!sLst.Contains(vl)) sLst.Add(vl);
         fRow = fCur.NextFeature();
     }
     sasIntegration sInt = null;
     if (sLst.Count > 2)
     {
         sInt = new sasIntegration(SampleLocations, SasProcedure.GENERLIZED_LOGISTIC);
     }
     else
     {
         sInt = new sasIntegration(SampleLocations, SasProcedure.LOGISTIC);
     }
     sInt.SLS = (System.Convert.ToDouble(SlStay) / 100).ToString();
     sInt.SLE = (System.Convert.ToDouble(SlEnter) / 100).ToString();
     sInt.StepWiseSelection = StepWiseSelection;
     sInt.DependentField = Dependentfield;
     sInt.DescretFields = ClassFields;
     sInt.IndependentFields = IndependentFields;
     sInt.Validation = Validate;
     sInt.Weightfield = WeightField;
     SasOutputFile = sInt.RunProcedure();
     outRest = sInt.OutResultsPath;
     outLog = sInt.OutLogPath;
     outSas = sInt.OutSasPath;
 }