コード例 #1
0
    def run(self, data, upc_sequence, resources):
        """
        'data' is a 4D array (nobservations, nchoices, nvariables, number of nests).
 
        'resources' can contain an entry 'starting_values' which is a dictionary where keys are 
        coefficient names and values are either starting values, or tuples with first element being
        the starting value and second element being boolean determining if the coefficient 
        should be estimated (True) or not (False). Scaling parameters in the 'starting_values'
        dictionary should start with '__logsum_' followed by the nest number.
        
        'resources' can contain an entry 'bfgs_approximate_second_derivative' (logical) which determines if
        the inverse Hessian is computed by a numerical approximation of the second derivative 
        (using finite difference method), instead of taking it out of the scipy BFGS function.
        
        'resources' can contain an entry 'bfgs_epsilon' which is the step size for approximation 
        of the first derivative.
        """
        return EstimationProcedure.run_dcm(self, data, upc_sequence, resources)
コード例 #2
0
    def run(self, data, upc_sequence, resources):
        """
        'data' is a 4D array (nobservations, nchoices, nvariables, number of nests).
 
        'resources' can contain an entry 'starting_values' which is a dictionary where keys are 
        coefficient names and values are either starting values, or tuples with first element being
        the starting value and second element being boolean determining if the coefficient 
        should be estimated (True) or not (False). Scaling parameters in the 'starting_values'
        dictionary should start with '__logsum_' followed by the nest number.
        
        'resources' can contain an entry 'bfgs_approximate_second_derivative' (logical) which determines if
        the inverse Hessian is computed by a numerical approximation of the second derivative 
        (using finite difference method), instead of taking it out of the scipy BFGS function.
        
        'resources' can contain an entry 'bfgs_epsilon' which is the step size for approximation 
        of the first derivative.
        """
        return EstimationProcedure.run_dcm(self, data, upc_sequence, resources)
コード例 #3
0
 def run(self, data, upc_sequence, resources):
     """
     'data' is of shape (nobservations, nchoices, nvariables).
     """
     return EstimationProcedure.run_dcm(self, data, upc_sequence, resources)
コード例 #4
0
 def mnl_loglikelihood(self, data, b, depm):
     return EstimationProcedure.dcm_loglikelihood(self, data, b, depm)
コード例 #5
0
 def loglikelihood(self, beta, data, depm):
     return EstimationProcedure.dcm_loglikelihood(self, data, beta, depm)
コード例 #6
0
 def run(self, data, upc_sequence, resources):
     """
     'data' is of shape (nobservations, nchoices, nvariables).
     """
     return EstimationProcedure.run_dcm(self, data, upc_sequence, resources)