コード例 #1
0
    def ttest(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the PHREG procedure
        For more information on the statements see the Documentation link.

        ``required_set = {}``

        ``legal_set = {'by', 'cls', 'freq', 'paired', 'var', 'weight', 'procopts'}``

        cls is an alias for the class statement

        Documentation link:
        http://go.documentation.sas.com/?docsetId=statug&docsetVersion=14.2&docsetTarget=statug_ttest_overview.htm&locale=en

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {}
        legal_set = {
            'by', 'cls', 'freq', 'paired', 'var', 'weight', 'procopts'
        }

        logging.debug("kwargs type: " + str(type(kwargs)))
        kwargs['ODSGraphics'] = True
        return SASProcCommons._run_proc(self, "TTEST", required_set, legal_set,
                                        **kwargs)
コード例 #2
0
    def reg(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the REG procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model',
        'random', 'repeated', 'slice', 'test', 'weight', 'out'}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_reg_syntax.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {
            'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model', 'random',
            'repeated', 'slice', 'test', 'weight', 'out', 'procopts'
        }

        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "REG", required_set, legal_set,
                                        **kwargs)
コード例 #3
0
    def factor(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the PHREG procedure
        For more information on the statements see the Documentation link.

        ``required_set = {}``

        ``legal_set = {'by', 'cls', 'freq', 'paired', 'var', 'weight', 'procopts'}``

        Documentation link:
        http://go.documentation.sas.com/?docsetId=statug&docsetVersion=14.2&docsetTarget=statug_factor_overview.htm&locale=en

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = set()
        legal_set = {
            'by', 'freq', 'priors', 'pathdiagram', 'partial', 'var', 'weight',
            'procopts'
        }

        self.logger.debug("kwargs type: " + str(type(kwargs)))
        kwargs['ODSGraphics'] = True
        return SASProcCommons._run_proc(self, "FACTOR", required_set,
                                        legal_set, **kwargs)
コード例 #4
0
ファイル: sasstat.py プロジェクト: FriedEgg/saspy
    def glm(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the GLM procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id', 'lsmeans', 'manova',
        'means', 'model', 'out', 'random', 'repeated', 'test', 'weight'}``

        cls is an alias for the class statement

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_toc.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id',
                     'lsmeans', 'manova', 'means', 'model', 'out', 'random', 'repeated',
                     'test', 'weight', 'procopts'}

        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "GLM", required_set, legal_set, **kwargs)
コード例 #5
0
ファイル: sasstat.py プロジェクト: FriedEgg/saspy
    def hpreg(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPREG procedure
        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out',
        'partition', 'performance', 'score', 'selection', 'weight'}``

        cls is an alias for the class statement

        Documentation link:
        https://support.sas.com/documentation/onlinedoc/stat/141/hpreg.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out',
                     'partition', 'performance', 'score', 'selection', 'weight'}

        logging.debug("kwargs type: " + str(type(kwargs)))
        kwargs['ODSGraphics']=False
        return SASProcCommons._run_proc(self, "HPREG", required_set, legal_set, **kwargs)
コード例 #6
0
    def tpspline(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TPSPLINE procedure

        For more information on the statements see the Documentation link.

        ``required_set = {'model'}``

        ``legal_set = {'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'}``

        cls is an alias for the class statement

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_tpspline_toc.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {
            'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'
        }

        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "TPSPLINE", required_set,
                                        legal_set, **kwargs)
コード例 #7
0
ファイル: sasstat.py プロジェクト: MYan01/saspy
    def logistic(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the LOGISTIC procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate', 'exact', 'freq',
        'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice', 'store', 'strata', 'units', 'weight'}``

        cls is an alias for the class statement

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_logistic_toc.htm

        The PROC LOGISTIC and MODEL statements are required.
        The CLASS and EFFECT statements (if specified) must
        precede the MODEL statement, and the CONTRAST, EXACT,
        and ROC statements (if specified) must follow the MODEL
        statement.

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate',
                     'exact', 'freq', 'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice',
                     'store', 'strata', 'units', 'weight', 'procopts'}

        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "LOGISTIC", required_set, legal_set, **kwargs)
コード例 #8
0
ファイル: sasstat.py プロジェクト: MYan01/saspy
    def glm(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the GLM procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id', 'lsmeans', 'manova',
        'means', 'model', 'out', 'random', 'repeated', 'test', 'weight'}``

        cls is an alias for the class statement

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_toc.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id',
                     'lsmeans', 'manova', 'means', 'model', 'out', 'random', 'repeated',
                     'test', 'weight', 'procopts'}

        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "GLM", required_set, legal_set, **kwargs)
コード例 #9
0
ファイル: sasstat.py プロジェクト: MYan01/saspy
    def hpreg(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPREG procedure
        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out',
        'partition', 'performance', 'score', 'selection', 'weight'}``

        cls is an alias for the class statement

        Documentation link:
        https://support.sas.com/documentation/onlinedoc/stat/141/hpreg.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out',
                     'partition', 'performance', 'score', 'selection', 'weight'}

        self.logger.debug("kwargs type: " + str(type(kwargs)))
        kwargs['ODSGraphics']=False
        return SASProcCommons._run_proc(self, "HPREG", required_set, legal_set, **kwargs)
コード例 #10
0
ファイル: sasstat.py プロジェクト: MYan01/saspy
    def phreg(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the PHREG procedure
        For more information on the statements see the Documentation link.

        ``required_set = {'model'}``

        ``legal_set = {'assess', 'bayes', 'by', 'cls', 'contrast', 'freq', 'effect', 'estimate', 
                     'hazardratio', 'id', 'lsmeans', 'lsmestimate', 'model', 'out', 'roc', 
                     'random', 'slice', 'store', 'strata', 'test', 'weight', 'procopts'}``

        cls is an alias for the class statement

        Documentation link:
        http://go.documentation.sas.com/?docsetId=statug&docsetTarget=statug_phreg_toc.htm&docsetVersion=14.2&locale=en

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'assess', 'bayes', 'by', 'cls', 'contrast', 'freq', 'effect', 'estimate',
                     'hazardratio', 'id', 'lsmeans', 'lsmestimate', 'model', 'out', 'roc',
                     'random', 'slice', 'store', 'strata', 'test', 'weight', 'procopts'}

        self.logger.debug("kwargs type: " + str(type(kwargs)))
        kwargs['ODSGraphics']=True
        return SASProcCommons._run_proc(self, "PHREG", required_set, legal_set, **kwargs)
コード例 #11
0
    def hplogistic(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPLOGISTIC procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'by', 'cls', 'code', 'freq', 'id', 'model',
        'out', 'partition', 'score', 'selection', 'weight'}``

        cls is an alias for the class statement
        Documentation link:
        https://support.sas.com/documentation/onlinedoc/stat/141/hplogistic.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {
            'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition',
            'score', 'selection', 'weight'
        }

        logging.debug("kwargs type: " + str(type(kwargs)))

        # ODS graphics are created by default for STAT this stops them form generation
        kwargs['ODSGraphics'] = False
        return SASProcCommons._run_proc(self, "HPLOGISTIC", required_set,
                                        legal_set, **kwargs)
コード例 #12
0
ファイル: sasstat.py プロジェクト: FriedEgg/saspy
    def logistic(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the LOGISTIC procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate', 'exact', 'freq',
        'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice', 'store', 'strata', 'units', 'weight'}``

        cls is an alias for the class statement

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_logistic_toc.htm

        The PROC LOGISTIC and MODEL statements are required.
        The CLASS and EFFECT statements (if specified) must
        precede the MODEL statement, and the CONTRAST, EXACT,
        and ROC statements (if specified) must follow the MODEL
        statement.

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate',
                     'exact', 'freq', 'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice',
                     'store', 'strata', 'units', 'weight', 'procopts'}

        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "LOGISTIC", required_set, legal_set, **kwargs)
コード例 #13
0
    def shewhart(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the SHEWHART procedure

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_toc.htm
        """
        required_set = {}
        legal_set = {'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "SHEWHART", required_set, legal_set, **kwargs)
コード例 #14
0
ファイル: sasqc.py プロジェクト: FriedEgg/saspy
    def shewhart(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the SHEWHART procedure

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_toc.htm
        """
        required_set = {}
        legal_set = {'procopts'}
        logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "SHEWHART", required_set, legal_set, **kwargs)
コード例 #15
0
ファイル: sasqc.py プロジェクト: FriedEgg/saspy
    def macontrol(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the MACONTROL procedure

        ``required_set = {}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_macontrol_toc.htm
        """
        required_set = {}
        legal_set = {'procopts'}
        logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "MACONTROL", required_set, legal_set, **kwargs)
コード例 #16
0
    def macontrol(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the MACONTROL procedure

        ``required_set = {}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_macontrol_toc.htm
        """
        required_set = {}
        legal_set = {'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "MACONTROL", required_set, legal_set, **kwargs)
コード例 #17
0
ファイル: sasets.py プロジェクト: FriedEgg/saspy
    def timeid(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TIMEID procedure

        ``required_set = {}``

        ``legal_set = { 'by', 'id', 'out'}``

        Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeid_syntax.htm
        """
        required_set = {}
        legal_set = {'by', 'id', 'out', 'procopts'}
        return SASProcCommons._run_proc(self, "TIMEID", required_set, legal_set, **kwargs)
コード例 #18
0
ファイル: sasdecorator.py プロジェクト: sassoftware/saspy
 def inner(self, *args, **kwargs):
     proc = func.__name__.lower()
     inner.proc_decorator = kwargs
     self.logger.debug("processing proc:{}".format(func.__name__))
     self.logger.debug(req_set)
     self.logger.debug("kwargs type: " + str(type(kwargs)))
     if proc in ['hplogistic', 'hpreg']:
         kwargs['ODSGraphics'] = kwargs.get('ODSGraphics', False)
     if proc == 'hpcluster':
         proc = 'hpclus'
     legal_set = set(kwargs.keys())
     self.logger.debug(legal_set)
     return SASProcCommons._run_proc(self, proc, req_set, legal_set, **kwargs)
コード例 #19
0
 def inner(self, *args, **kwargs):
     proc = func.__name__.lower()
     inner.proc_decorator = kwargs
     self.logger.debug("processing proc:{}".format(func.__name__))
     self.logger.debug(req_set)
     self.logger.debug("kwargs type: " + str(type(kwargs)))
     if proc in ['hplogistic', 'hpreg']:
         kwargs['ODSGraphics'] = kwargs.get('ODSGraphics', False)
     if proc == 'hpcluster':
         proc = 'hpclus'
     legal_set = set(kwargs.keys())
     self.logger.debug(legal_set)
     return SASProcCommons._run_proc(self, proc, req_set, legal_set,
                                     **kwargs)
コード例 #20
0
    def timeid(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TIMEID procedure

        ``required_set = {}``

        ``legal_set = { 'by', 'id', 'out'}``

        Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeid_syntax.htm
        """
        required_set = {}
        legal_set = {'by', 'id', 'out', 'procopts'}
        return SASProcCommons._run_proc(self, "TIMEID", required_set,
                                        legal_set, **kwargs)
コード例 #21
0
ファイル: sasets.py プロジェクト: FriedEgg/saspy
    def arima(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the ARIMA procedure

        ``required_set={'identify'}``

        ``legal_set={ 'by', 'identify', 'estimate', 'outlier', 'forecast', 'out'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_arima_syntax.htm
        """
        required_set = {'identify'}
        legal_set = {'by', 'identify', 'estimate', 'outlier', 'forecast', 'out', 'procopts'}
        return SASProcCommons._run_proc(self, "ARIMA", required_set, legal_set, **kwargs)
コード例 #22
0
ファイル: sasqc.py プロジェクト: FriedEgg/saspy
    def cusum(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the CUSUM procedure

        ``required_set = {}``

        ``legal_set = {'by','xchart'}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_cusum_sect001.htm
        """
        required_set = {}
        legal_set = {'by', 'xchart', 'procopts'}
        logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "CUSUM", required_set, legal_set, **kwargs)
コード例 #23
0
ファイル: sasets.py プロジェクト: FriedEgg/saspy
    def timeseries(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TIMESERIES procedure

        ``required_set={'id'}``

        ``legal_set={ 'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeseries_syntax.htm
        """
        required_set = {'id'}
        legal_set = {'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "TIMESERIES", required_set, legal_set, **kwargs)
コード例 #24
0
    def cusum(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the CUSUM procedure

        ``required_set = {}``

        ``legal_set = {'by','xchart'}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_cusum_sect001.htm
        """
        required_set = {}
        legal_set = {'by', 'xchart', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "CUSUM", required_set, legal_set, **kwargs)
コード例 #25
0
ファイル: sasqc.py プロジェクト: FriedEgg/saspy
    def capability(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the CUSUM procedure
        ``required_set = {}``

        ``legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot',
        'qqplot', 'freq', 'weight', 'id', 'by', 'spec'}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_capability_sect001.htm
        """
        required_set = {}
        legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot',
                     'qqplot', 'freq', 'weight', 'id', 'by', 'spec', 'out', 'procopts'}
        logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "CAPABILITY", required_set, legal_set, **kwargs)
コード例 #26
0
ファイル: sasViyaML.py プロジェクト: edbrasil/saspy
    def gradboost(self, **kwargs: dict) -> object:
        """
        Python method to call the HPCLUS procedure

        required_set = {'input'}
        legal_set= {'freq', 'input', 'id', 'score'}

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf
        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input'}
        legal_set = {'freq', 'input', 'id', 'score', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPCLUS", required_set, legal_set, **kwargs)
コード例 #27
0
ファイル: sasViyaML.py プロジェクト: FriedEgg/saspy
    def gradboost(self, **kwargs: dict) -> object:
        """
        Python method to call the HPCLUS procedure

        required_set = {'input'}
        legal_set= {'freq', 'input', 'id', 'score'}

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf
        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input'}
        legal_set = {'freq', 'input', 'id', 'score', 'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc("HPCLUS", required_set, legal_set, **kwargs)
コード例 #28
0
    def capability(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the CUSUM procedure
        ``required_set = {}``

        ``legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot',
        'qqplot', 'freq', 'weight', 'id', 'by', 'spec'}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_capability_sect001.htm
        """
        required_set = {}
        legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot',
                     'qqplot', 'freq', 'weight', 'id', 'by', 'spec', 'out', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "CAPABILITY", required_set, legal_set, **kwargs)
コード例 #29
0
ファイル: sasViyaML.py プロジェクト: edbrasil/saspy
    def nnet(self, **kwargs: dict) -> object:
        """
        Python method to call the HPNEURAL procedure

        required_set = {'input', 'target', 'train'}
        legal_set= {'freq', 'input', 'id', 'target', 'save', 'score',
                    'architecture', 'weight', 'hidden', 'partition', 'train'}
        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf
        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target', 'train'}
        legal_set = {'freq', 'input', 'id', 'target', 'save', 'score',
                     'architecture', 'weight', 'hidden', 'partition', 'train', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPNEURAL", required_set, legal_set, **kwargs)
コード例 #30
0
ファイル: sasViyaML.py プロジェクト: FriedEgg/saspy
    def nnet(self, **kwargs: dict) -> object:
        """
        Python method to call the HPNEURAL procedure

        required_set = {'input', 'target', 'train'}
        legal_set= {'freq', 'input', 'id', 'target', 'save', 'score',
                    'architecture', 'weight', 'hidden', 'partition', 'train'}
        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf
        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target', 'train'}
        legal_set = {'freq', 'input', 'id', 'target', 'save', 'score',
                     'architecture', 'weight', 'hidden', 'partition', 'train', 'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc("HPNEURAL", required_set, legal_set, **kwargs)
コード例 #31
0
ファイル: sasml.py プロジェクト: FriedEgg/saspy
    def hp4score(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HP4SCORE procedure

        ``required_set = {}``

        ``legal_set = {'id', 'importance', 'performance', 'score', 'procopts'}``

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {}
        legal_set = {'id', 'importance', 'performance', 'score', 'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HP4SCORE", required_set, legal_set, **kwargs)
コード例 #32
0
    def hp4score(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HP4SCORE procedure

        ``required_set = {}``

        ``legal_set = {'id', 'importance', 'performance', 'score', 'procopts'}``

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {}
        legal_set = {'id', 'importance', 'performance', 'score', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HP4SCORE", required_set, legal_set, **kwargs)
コード例 #33
0
    def arima(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the ARIMA procedure

        ``required_set={'identify'}``

        ``legal_set={ 'by', 'identify', 'estimate', 'outlier', 'forecast', 'out'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_arima_syntax.htm
        """
        required_set = {'identify'}
        legal_set = {
            'by', 'identify', 'estimate', 'outlier', 'forecast', 'out',
            'procopts'
        }
        return SASProcCommons._run_proc(self, "ARIMA", required_set, legal_set,
                                        **kwargs)
コード例 #34
0
    def timedata(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TIMEDATA procedure

        ``required_set = {}``

        ``legal_set = {'by', 'id', 'fcmport', 'out', 'outarrays', 'outscalars', 'var', 'prog_stmts'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timedata_syntax.htm
        """
        required_set = set()
        legal_set = {
            'by', 'id', 'fcmport', 'out', 'outarrays', 'outscalars', 'var',
            'prog_stmts', 'procopts'
        }
        return SASProcCommons._run_proc(self, "TIMEDATA", required_set,
                                        legal_set, **kwargs)
コード例 #35
0
    def hpbnet(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPBNET procedure

        ``required_set = {'input', 'target'}``

        ``legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'}``

        Documentation link:
        http://go.documentation.sas.com/?docsetId=emhpprcref&docsetVersion=14.2&docsetTarget=emhpprcref_hpbnet_toc.htm&locale=en

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target'}
        legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPBNET", required_set, legal_set, **kwargs)
コード例 #36
0
ファイル: sasml.py プロジェクト: FriedEgg/saspy
    def hpbnet(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPBNET procedure

        ``required_set = {'input', 'target'}``

        ``legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'}``

        Documentation link:
        http://go.documentation.sas.com/?docsetId=emhpprcref&docsetVersion=14.2&docsetTarget=emhpprcref_hpbnet_toc.htm&locale=en

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target'}
        legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPBNET", required_set, legal_set, **kwargs)
コード例 #37
0
    def timeseries(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TIMESERIES procedure

        ``required_set={'id'}``

        ``legal_set={ 'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeseries_syntax.htm
        """
        required_set = {'id'}
        legal_set = {
            'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend',
            'var', 'crossvar', 'out', 'procopts'
        }
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "TIMESERIES", required_set,
                                        legal_set, **kwargs)
コード例 #38
0
ファイル: sasets.py プロジェクト: FriedEgg/saspy
    def ucm(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the UCM procedure

        ``required_set={'model'}``

        ``legal_set= {'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular',
        'level', 'model', 'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope',
        'splinereg', 'splineseason'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_syntax.htm
        """
        required_set = {'model'}
        legal_set = {'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular'
                                                                                                      'level', 'model',
                     'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope'
                                                                                          'splinereg', 'splineseason',
                     'procopts'}
        return SASProcCommons._run_proc(self, "UCM", required_set, legal_set, **kwargs)
コード例 #39
0
ファイル: sasutil.py プロジェクト: MagicalAsh/saspy
    def hpbin(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPBIN procedure

        ``required_set = {}``

        ``legal_set= {'cls', 'code', 'grow', 'id', 'model', 'out', 'partition', 'performance', 'prune', 'rules'}``

        cls is an alias for the class statement
        For more information on the statements see the Documentation link.
        Documentation link:
        http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = set()
        legal_set = {'code', 'id', 'performance', 'target', 'input', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPBIN", required_set, legal_set, **kwargs)
コード例 #40
0
ファイル: sasutil.py プロジェクト: MagicalAsh/saspy
    def hpimpute(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPIMPUTE procedure

        ``required_set = {'impute'}``

        ``legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code', 'procopts'}``

        For more information on the statements see the Documentation link.
        Documentation link:
        http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'impute'}
        legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code',
                     'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPIMPUTE", required_set, legal_set, **kwargs)
コード例 #41
0
ファイル: sasutil.py プロジェクト: metllord/saspy
    def hpbin(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPBIN procedure

        ``required_set = {}``

        ``legal_set= {'cls', 'code', 'grow', 'id', 'model', 'out', 'partition', 'performance', 'prune', 'rules'}``

        cls is an alias for the class statement
        For more information on the statements see the Documentation link.
        Documentation link:
        http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {}
        legal_set = {'code', 'id', 'performance', 'target', 'input', 'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPBIN", required_set, legal_set, **kwargs)
コード例 #42
0
    def factmac(self, **kwargs: dict) -> object:
        """
        Python method to call the HPFOREST procedure

        required_set = {'input', 'target'}
        legal_set= {'freq', 'input', 'id', 'target', 'save', 'score'}

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf
        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target'}
        legal_set = {
            'freq', 'input', 'id', 'target', 'save', 'score', 'procopts'
        }
        # print ("I am HERE")
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc("HPFOREST", required_set, legal_set,
                                        **kwargs)
コード例 #43
0
    def treeboost(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TREEBOOST procedure

        ``required_set = {'input', 'target'}``

        ``legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance',
        'target', 'save', 'score', 'subseries', 'procopts'}``

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target'}
        legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance', 'target', 'save', 'score',
                     'subseries', 'procopts'}
        self.logger.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "TREEBOOST", required_set, legal_set, **kwargs)
コード例 #44
0
ファイル: sasutil.py プロジェクト: FriedEgg/saspy
    def hpimpute(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the HPIMPUTE procedure

        ``required_set = {'impute'}``

        ``legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code', 'procopts'}``

        For more information on the statements see the Documentation link.
        Documentation link:
        http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'impute'}
        legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code',
                     'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "HPIMPUTE", required_set, legal_set, **kwargs)
コード例 #45
0
ファイル: sasml.py プロジェクト: FriedEgg/saspy
    def treeboost(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TREEBOOST procedure

        ``required_set = {'input', 'target'}``

        ``legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance',
        'target', 'save', 'score', 'subseries', 'procopts'}``

        Documentation link:
        https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'input', 'target'}
        legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance', 'target', 'save', 'score',
                     'subseries', 'procopts'}
        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "TREEBOOST", required_set, legal_set, **kwargs)
コード例 #46
0
ファイル: sasstat.py プロジェクト: FriedEgg/saspy
    def tpspline(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the TPSPLINE procedure

        For more information on the statements see the Documentation link.

        ``required_set = {'model'}``

        ``legal_set = {'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'}``

        cls is an alias for the class statement

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_tpspline_toc.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'}

        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "TPSPLINE", required_set, legal_set, **kwargs)
コード例 #47
0
    def ucm(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the UCM procedure

        ``required_set={'model'}``

        ``legal_set= {'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular',
        'level', 'model', 'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope',
        'splinereg', 'splineseason'}``

        Documentation link:
        http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_syntax.htm
        """
        required_set = {'model'}
        legal_set = {
            'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate',
            'forecast', 'id', 'irregular'
            'level', 'model', 'nloptions', 'performance', 'out', 'outlier',
            'randomreg', 'season', 'slope'
            'splinereg', 'splineseason', 'procopts'
        }
        return SASProcCommons._run_proc(self, "UCM", required_set, legal_set,
                                        **kwargs)
コード例 #48
0
ファイル: sasstat.py プロジェクト: FriedEgg/saspy
    def reg(self, **kwargs: dict) -> 'SASresults':
        """
        Python method to call the REG procedure

        For more information on the statements see the Documentation link.

        ``required_set={'model'}``

        ``legal_set= {'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model',
        'random', 'repeated', 'slice', 'test', 'weight', 'out'}``

        Documentation link:
        http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_reg_syntax.htm

        :param kwargs: dict
        :return: SAS result object
        """
        required_set = {'model'}
        legal_set = {'add', 'by', 'code', 'id', 'var',
                     'lsmeans', 'model', 'random', 'repeated',
                     'slice', 'test', 'weight', 'out', 'procopts'}

        logging.debug("kwargs type: " + str(type(kwargs)))
        return SASProcCommons._run_proc(self, "REG", required_set, legal_set, **kwargs)
コード例 #49
0
ファイル: sastabulate.py プロジェクト: thakurgurjot/saspy
    def execute_table(self, _output_type, **kwargs: dict) -> 'SASresults':
        """
        executes a PROC TABULATE statement 

        You must specify an output type to use this method, of 'HTML', 'text', or 'Pandas'.
        There are three convenience functions for generating specific output; see:
            .text_table()
            .table()
            .to_dataframe()

        :param _output_type: style of output to use
        :param left: the query for the left side of the table
        :param top: the query for the top of the table
        :return:
        """

        left = kwargs.pop('left', None)
        top = kwargs.pop('top', None)
        sets = dict(classes=set(), vars=set())
        left._gather(sets)
        if top: top._gather(sets)

        table = top \
            and '%s, %s' % (str(left), str(top)) \
            or str(left)

        proc_kwargs = dict(cls=' '.join(sets['classes']),
                           var=' '.join(sets['vars']),
                           table=table)

        # permit additional valid options if passed; for now, just 'where'
        proc_kwargs.update(kwargs)

        # we can't easily use the SASProcCommons approach for submiting,
        # since this is merely an output / display proc for us;
        # but we can at least use it to check valid options in the canonical saspy way
        required_options = {'cls', 'var', 'table'}
        allowed_options = {'cls', 'var', 'table', 'where'}
        verifiedKwargs = SASProcCommons._stmt_check(self, required_options,
                                                    allowed_options,
                                                    proc_kwargs)

        if (_output_type == 'Pandas'):
            # for pandas, use the out= directive
            code = "proc tabulate data=%s.%s %s out=temptab;\n" % (
                self.data.libref, self.data.table, self.data._dsopts())
        else:
            code = "proc tabulate data=%s.%s %s;\n" % (
                self.data.libref, self.data.table, self.data._dsopts())

        # build the code
        for arg, value in verifiedKwargs.items():
            code += "  %s %s;\n" % (arg == 'cls' and 'class' or arg, value)
        code += "run;"

        # teach_me_SAS
        if self.sas.nosub:
            print(code)
            return

        # submit the code
        ll = self.data._is_valid()

        if _output_type == 'HTML':
            if not ll:
                html = self.data.HTML
                self.data.HTML = 1
                ll = self.sas._io.submit(code)
                self.data.HTML = html
            if not self.sas.batch:
                DISPLAY(HTML(ll['LST']))
                check, errorMsg = self.data._checkLogForError(ll['LOG'])
                if not check:
                    raise ValueError("Internal code execution failed: " +
                                     errorMsg)
            else:
                return ll

        elif _output_type == 'text':
            if not ll:
                html = self.data.HTML
                self.data.HTML = 1
                ll = self.sas._io.submit(code, 'text')
                self.data.HTML = html
            print(ll['LST'])
            return

        elif _output_type == 'Pandas':
            return self.to_nested_dataframe(code)