biogeme.results_processing.pandas_output module¶
Generates the estimation results in Pandas
Michel Bierlaire Wed Oct 2 06:43:33 2024
- biogeme.results_processing.pandas_output.get_pandas_correlation_results(estimation_results, variance_covariance_type=None, involved_parameters=None)[source]¶
Get the correlation results in a Pandas data frame
- Parameters:
estimation_results (
EstimationResults) – estimation results.variance_covariance_type (
EstimateVarianceCovariance|None) – type of variance-covariance estimate to be used.involved_parameters (
dict[str,str] |None) – a dict that identifies the parameters to involve, as assign them with a name for the reporting.
- Return type:
DataFrame- Returns:
a Pandas data frame
- biogeme.results_processing.pandas_output.get_pandas_estimated_parameters(estimation_results, group_of_parameters=None, variance_covariance_type=None, renumbering_parameters=None, renaming_parameters=None)[source]¶
Get the estimated parameters as pandas data frames.
The function returns one data frame for each group of parameters. If no group is provided, a single data frame containing all estimated parameters is returned. If groups are provided, one data frame is generated for each group, and an additional data frame is generated for the parameters that do not belong to any group. A parameter may appear in several groups.
- Parameters:
estimation_results (
EstimationResults) – estimation results.group_of_parameters (
dict[str,list[str]]) – dictionary mapping the name of each group to the corresponding list of parameters. If None, all parameters are reported in a single data frame.variance_covariance_type (
EstimateVarianceCovariance|None) – type of variance-covariance estimate used to compute standard errors, t-statistics, and p-values. If None, the default variance-covariance matrix ofestimation_resultsis used.renumbering_parameters (
dict[int,int] |None) – dictionary mapping original parameter numbers to the numbers to be reported in the data frames.renaming_parameters (
dict[str,str] |None) – dictionary mapping original parameter names to the names to be reported in the data frames. Parameters not appearing in the dictionary keep their original names.
- Return type:
dict[str,DataFrame]- Returns:
dictionary mapping each table title to the corresponding pandas data frame.
- biogeme.results_processing.pandas_output.get_pandas_one_pair_of_parameters(estimation_results, first_parameter_index, second_parameter_index, variance_covariance_type, first_parameter_name=None, second_parameter_name=None)[source]¶
Generate one row of the Pandas table of the correlation data for estimated parameters.
- Parameters:
estimation_results (
EstimationResults) – estimation results.first_parameter_index (
int) – index of the first parametersecond_parameter_index (
int) – index of the second parametervariance_covariance_type (
EstimateVarianceCovariance) – type of variance-covariance estimate to be used.first_parameter_name – name of the parameter to report. If None, taken from estimation results.
second_parameter_name – name of the parameter to report. If None, taken from estimation results.
- Return type:
dict[str,float|int|str]- Returns:
one row of the table
- biogeme.results_processing.pandas_output.get_pandas_one_parameter(estimation_results, parameter_index, variance_covariance_type, parameter_number=None, parameter_name=None)[source]¶
Generate one row of the Pandas table of the estimated parameters.
- Parameters:
estimation_results (
EstimationResults) – estimation results.parameter_index (
int) – index of the parametervariance_covariance_type (
EstimateVarianceCovariance) – type of variance-covariance estimate to be used.parameter_number – number of the parameter to report. If None, it is the index.
parameter_name – name of the parameter to report. If None, taken from estimation results.
- Return type:
dict[str,float|int|str]- Returns:
one row of the table