analyses/analyse_text_info_converge.py
def batch_computation(df_results: DataFrame, key: str, d: str) -> float:
    """
    This function is used to compute the ratio between the min and the max for a given dynamics d and a given key.

    Parameters
    ----------
    df_results : DataFrame
        The dataframe containing the results.
    key : str
        The key suc as "computation_time" or "cost".
    d : str
        The dynamics type such as the one contained in dynamics_type_label.

    Returns
    -------
    ratio : float
        The ratio between the max and the min.
    """
    df = df_results[key]
    n_shoot_max = df_results["n_shooting_tot"][df_results["dynamics_type_label"] == d].max()
    df = df[df_results["dynamics_type_label"] == d]
    df_max = df[df_results["n_shooting_tot"] == n_shoot_max]
    df_min = df[df_results["n_shooting_tot"] == 150]

    t_mean_min = df_min.mean()
    t_mean_max = df_max.mean()

    return t_mean_max / t_mean_min

    This function is used to compute the ratio between the min and the max for a given dynamics d and a given key.

    Parameters
    ----------
    df_results : DataFrame
        The dataframe containing the results.
    key : str
        The key suc as "computation_time" or "cost".
    d : str
        The dynamics type such as the one contained in dynamics_type_label.

    Returns
    -------
    ratio : float
        The ratio between the max and the min.
    
This function is used to compute the ratio between the min and the max for a given dynamics d and a given key.
Parameters

df_results : DataFrame
The dataframe containing the results.
key : str
The key suc as "computation_time" or "cost".
d : str
The dynamics type such as the one contained in dynamics_type_label.

Returns

ratio : float
The ratio between the max and the min.
This function is used to compute the ratio between the min and the max for a given dynamics d and a given key . Parameters df_results : DataFrame The dataframe containing the results . key : str The key suc as " computation_time " or " cost " . d : str The dynamics type such as the one contained in dynamics_type_label . Returns ratio : float The ratio between the max and the min .
def batch_computation(df_results: DataFrame, key: str, d: str) -> float:
    df = df_results[key]
    n_shoot_max = df_results["n_shooting_tot"][df_results["dynamics_type_label"] == d].max()
    df = df[df_results["dynamics_type_label"] == d]
    df_max = df[df_results["n_shooting_tot"] == n_shoot_max]
    df_min = df[df_results["n_shooting_tot"] == 150]
    t_mean_min = df_min.mean()
    t_mean_max = df_max.mean()
    return t_mean_max / t_mean_min
def batch_computation ( df_results : DataFrame , key : str , d : str ) -> float : df = df_results [ key ] n_shoot_max = df_results [ "n_shooting_tot" ] [ df_results [ "dynamics_type_label" ] == d ] . max ( ) df = df [ df_results [ "dynamics_type_label" ] == d ] df_max = df [ df_results [ "n_shooting_tot" ] == n_shoot_max ] df_min = df [ df_results [ "n_shooting_tot" ] == 150 ] t_mean_min = df_min . mean ( ) t_mean_max = df_max . mean ( ) return t_mean_max / t_mean_min
This function is used to compute the ratio between the min and the max for a given dynamics d and a given key.
This function is used to compute the ratio between the min and the max for a given dynamics d and a given key .
"""
    This function is used to compute the ratio between the min and the max for a given dynamics d and a given key.

    Parameters
    ----------
    df_results : DataFrame
        The dataframe containing the results.
    key : str
        The key suc as "computation_time" or "cost".
    d : str
        The dynamics type such as the one contained in dynamics_type_label.

    Returns
    -------
    ratio : float
        The ratio between the max and the min.
    """
df_results
DataFrame
key
str
d
str