LECA.analyze.visualize_arrhenius_fit

LECA.analyze.visualize_arrhenius_fit(features: List[str], beta_0: float, x_arrhenius: DataFrame, indices: List[int] = [], labels: List[str] | None = None, true_x_dfs: DataFrame | None = None, plot_std: bool = True, true_objective: str = 'log(conductivity/x_LiSalt)', colors: List[str] | None = None, y_label: str | None = None, individual_data_df: DataFrame | None = None, confidence: float = 1.0, save_loc: str | bool = False, save_idx: int | float | str = 0, title: str | None = None) None

Can be used to visualize arrhenius fit or predicted arrhenius fits.

Parameters:
  • features (List[str]) – List with all relevant (arrhenius) features

  • beta_0 (float) – beta_0 value of Arrhenius fit

  • x_arrhenius (pd.DataFrame) – DataFrame containing the results of the Arrhenius fit.

  • indices (List[int]) –

    List containing the indices of each Arrhenius fit in the x_arrhenius DataFrame that should be plotted.

    Default value [].

  • labels (Optional[List[str]]) –

    Additional labels to assign to each Arrhenius fit. If None is provided no labels are used.

    Default value None

  • true_x_dfs (Optional[pd.DataFrame]) –

    DataFrame containing the true mean measured values for the ionic conductivity. If None is provided no experimental data is plotted.

    Default value None

  • plot_std (Optional[bool]) –

    Whether to plot the standard deviations of Arrhenius fits.

    Default value True

  • true_objective (str) –

    Name of the column in the true_x DataFrame that contains the measured (and transformed) ionic conductivity.

    Default value log(conductivity/x_LiSalt)

  • colors (Optional[List[str]]) –

    List of colors for plotting data from different true_x_dfs. If None is provided, black is used as a default color for all data.

    Default value None

  • y_label (Optional[str]) –

    Custom label for y axis. If None is given, true_objective will be used.

    Default value None

  • individual_data (Optional[pd.DataFrame]) –

    DataFrame containing the true individual measured values for the ionic conductivity. If None is provided no individual experimental data is plotted.

    Default value None

  • confidence (float) –

    Scalar value to multiply the estimated uncertainty. By default this value is 1.0 which results in the plotted errorbars showing one standard-deviation. E.g. confidence=1.96 would then reflect an approximate 95% confidence interval.

    Default value 1.0

  • save_loc (Union[str, bool]) –

    Destination to save result plot (if provided as a string argument). Figure is saved to: save_loc+’arrhenius_fit_{}.pdf’.format(save_idx)` Where obj is the objective function of the model prediction.

    Default value False

  • save_idx (Union[int, float, str]) –

    Additional index to save the plot.

    Default value 0

  • title (Optional[str] = None) –

    Optionally set a title for the plot. If None, exclude title.

    Default value None

Return type:

None