autoXAS.autoXAS module¶
- class autoXAS.autoXAS.autoXAS[source]¶
Bases:
object- save_config(config_name: str, save_directory: str = './', standards: bool = False) None[source]¶
Save configuration file.
- Parameters:
config_name (str) – Name of the configuration file.
save_directory (str, optional) – Directory where the configuration file will be saved. Defaults to “./”.
- Returns:
Function does not return anything.
- Return type:
None
- load_config(configuration_file: str, standards: bool = False) None[source]¶
Load configuration file.
- Parameters:
configuration_file (str) – Path to the configuration file.
- Returns:
Function does not return anything.
- Return type:
None
- load_data(average: bool | str = False, measurements_to_average: str | list[int] | ndarray | range = 'all', n_periods: None | int = None, period: None | int = None) None[source]¶
Load data, apply corrections, and normalize data.
- Parameters:
average (Union[bool, str], optional) – Whether to average data in a standard or periodic manner. Defaults to False.
measurements_to_average (Union[str, list[int], np.ndarray, range], optional) – Measurements to average. Defaults to “all”.
n_periods (Union[None, int], optional) – Number of periods to group measurements in for averaging. Will determine the number of measurements per period automatically. Defaults to None.
period (Union[None, int], optional) – Number of measurements to group for averaging. Will determine the number of periods automatically. Defaults to None.
- Raises:
ValueError – Invalid average. Must be “standard” or “periodic”.
- Returns:
Function does not return anything.
- Return type:
None
- load_standards(average: bool | str = False, measurements_to_average: str | list[int] | ndarray | range = 'all', n_periods: None | int = None, period: None | int = None) None[source]¶
Load standards, apply corrections, and normalize data.
- Parameters:
average (Union[bool, str], optional) – Whether to average data in a standard or periodic manner. Defaults to False.
measurements_to_average (Union[str, list[int], np.ndarray, range], optional) – Measurements to average. Defaults to “all”.
n_periods (Union[None, int], optional) – Number of periods to group measurements in for averaging. Will determine the number of measurements per period automatically. Defaults to None.
period (Union[None, int], optional) – Number of measurements to group for averaging. Will determine the number of periods automatically. Defaults to None.
- Raises:
ValueError – Invalid average. Must be “standard” or “periodic”.
- Returns:
Function does not return anything.
- Return type:
None
- exclude_data(measurements: list[int] | ndarray, experiment: str | int = 'all') None[source]¶
Exclude data points from the DataFrame.
- Parameters:
measurements (Union[list[int], np.ndarray]) – Measurements to exclude.
experiment (Union[str, int], optional) – Experiment to exclude data from. Defaults to “all”.
- Returns:
Function does not return anything.
- Return type:
None
- convert_energy_units(energy_unit: str = 'eV', unit_conversion_factor: float = 1.0, data_to_convert: str = 'all') None[source]¶
Convert energy units in the data.
- Parameters:
energy_unit (str, optional) – Desired energy unit. Defaults to “eV”.
unit_conversion_factor (float, optional) – Factor to convert energy units. Defaults to 1.0.
data_to_convert (str, optional) – Specify which data to convert. Options are ‘all’, ‘data’, or ‘standards’. Defaults to ‘all’.
- Returns:
Function does not return anything.
- Return type:
None
- homogenize_standards(renormalize: bool = True) None[source]¶
Homogenize standards data to the data energy range.
- Parameters:
renormalize (bool, optional) – Whether to renormalize the standards data after homogenization. Defaults to True.
- Returns:
Function does not return anything.
- Return type:
None
- LCA(use_standards: bool = False, components: list[int] | list[list[int]] | None = [0, -1], fit_range: None | tuple[float, float] | list[tuple[float, float]] = None, standards_to_use: str | list[int] | list[list[int]] | list[list[str]] = 'all') None[source]¶
Perform Linear Combination Analysis (LCA) on the data.
- Parameters:
use_standards (bool, optional) – Whether to use standards for LCA. Defaults to False.
components (Union[list[int], list[str], None], optional) – Components to use for LCA. Defaults to [0, -1].
fit_range (Union[None, tuple[float, float], list[tuple[float, float]]], optional) – Energy range to use for fitting. Defaults to None.
standards_to_use (Union[str, list[int]], optional) – Standards to use for LCA. Defaults to “all”.
- Raises:
ValueError – No standards loaded.
ValueError – Number of fit ranges must match number of metals.
ValueError – At least 2 components are required to perform LCA.
- Returns:
Function does not return anything.
- Return type:
None
- PCA(n_components: None | str | float | int | list = None, fit_range: None | tuple[float, float] | list[tuple[float, float]] = None, max_components: int = 10, seed: None | int = None) None[source]¶
Perform Principal Component Analysis (PCA) on the data.
- Parameters:
n_components (Union[None, str, float, int, list], optional) – Number of components to keep or fraction of variance to be explained by components. Defaults to None.
fit_range (Union[None, tuple[float, float], list[tuple[float, float]]], optional) – Energy range to use for fitting. Defaults to None.
max_components (int, optional) – Maximum number of components to use for automatic PCA component determination. Defaults to 10.
seed (Union[None, int], optional) – Random seed for reproducibility. Defaults to None.
- Raises:
ValueError – Length of list must match number of experiments.
- Returns:
Function does not return anything.
- Return type:
None
- NMF(n_components: None | str | float | int | list = None, change_cutoff: float = 0.25, fit_range: None | tuple[float, float] | list[tuple[float, float]] = None, max_components: int = 10, seed: None | int = None) None[source]¶
Perform Non-negative Matrix Factorization (NMF) on the data.
- Parameters:
n_components (Union[None, str, float, int, list], optional) – Number of components to use. Defaults to None.
change_cutoff (float, optional) – Minimum change in reconstruction error to determine number of components. Defaults to 0.25.
fit_range (Union[None, tuple[float, float], list[tuple[float, float]]], optional) – Energy range to use for fitting. Defaults to None.
max_components (int, optional) – Maximum number of components to use for automatic NMF component determination. Defaults to 10.
seed (Union[None, int], optional) – Random seed for reproducibility. Defaults to None.
- Raises:
ValueError – Length of list must match number of experiments.
- Returns:
Function does not return anything.
- Return type:
None
- MCR_ALS()[source]¶
Perform Multivariate Curve Resolution - Alternating Least Squares (MCR-ALS) on the data.
This function is a placeholder and does not implement MCR-ALS yet.
- Returns:
Function does not return anything.
- Return type:
None
- to_csv(data: str = 'data', filename: None | str = None, directory: None | str = None, columns: str | list[str] | None = None, explode_columns: bool = True)[source]¶
Export data to a CSV file.
- Parameters:
filename (str) – Name of the file to save.
directory (Union[None, str], optional) – Directory to save the file. Defaults to None.
columns (Union[None, list[str]], optional) – Columns to export. Defaults to None.
- Returns:
Function does not return anything.
- Return type:
None
- plot_data(experiment: str | int = 0, standards: None | str | int = None, save: bool = False, filename: str = 'data', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the normalized data for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
standards (Union[None, str, int], optional) – Standards to plot. Defaults to None.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “data”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Standards not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_temperature_curves(save: bool = False, filename: str = 'temperature_curve', format: str = '.png', show: bool = True, show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the temperature curves for all experiments.
- Parameters:
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “temperature_curve”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_waterfall(experiment: str | int = 0, y_axis: str = 'Measurement', vmin: None | float = None, vmax: None | float = None, save: bool = False, filename: str = 'waterfall', format: str = '.png', show: bool = True, show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot a waterfall plot for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
y_axis (str, optional) – Column to use as Y-axis in the plot. Defaults to “Measurement”.
vmin (Union[None, float], optional) – Minimum value for the color scale. Defaults to None.
vmax (Union[None, float], optional) – Maximum value for the color scale. Defaults to None.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “waterfall”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_change(experiment: str | int = 0, reference_measurement: int = 1, y_axis: str = 'Measurement', vmin: None | float = None, vmax: None | float = None, save: bool = False, filename: str = 'change', format: str = '.png', show: bool = True, show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the change in normalized data for a given experiment
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
reference_measurement (int, optional) – Measurement to use as reference. Defaults to 1.
y_axis (str, optional) – Column to use as Y-axis in the plot. Defaults to “Measurement”.
vmin (Union[None, float], optional) – Minimum value for the color scale. Defaults to None.
vmax (Union[None, float], optional) – Maximum value for the color scale. Defaults to None.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “change”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_LCA(experiment: str | int = 0, x_axis: str = 'Measurement', save: bool = False, filename: str = 'LCA', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the results of Linear Combination Analysis (LCA) for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
x_axis (str, optional) – Column to use as X-axis in the plot. Defaults to “Measurement”.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “LCA”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_LCA_frame(experiment: str | int = 0, measurement: int = 1, save: bool = False, filename: str = 'LCA_frame', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot a single frame of the Linear Combination Analysis (LCA) for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
measurement (int) – Measurement to plot. Defaults to 1.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “LCA_frame”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_LCA_comparison(component: int = 1, x_axis: str = 'Measurement', save: bool = False, filename: str = 'LCA_comparison', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot comparison of Linear Combination Analysis (LCA) components across experiments.
- Parameters:
component (int) – Components to compare. Defaults to 1.
x_axis (str, optional) – Column to use as X-axis in the plot. Defaults to “Measurement”.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “LCA_comparison”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_PCA(experiment: str | int = 0, x_axis: str = 'Measurement', save: bool = False, filename: str = 'PCA', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the results of Principal Component Analysis (PCA) for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
x_axis (str, optional) – Column to use as X-axis in the plot. Defaults to “Measurement”.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “PCA”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_PCA_frame(experiment: str | int = 0, measurement: int = 1, save: bool = False, filename: str = 'PCA_frame', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot a single frame of the Principal Component Analysis (PCA) for a given experiment
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
measurement (int) – Measurement to plot. Defaults to 1.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “PCA_frame”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- plot_PCA_comparison(component: int | list[int] = 1, x_axis: str = 'Measurement', save: bool = False, filename: str = 'PCA_comparison', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot comparison of Principal Component Analysis (PCA) components across experiments.
- Parameters:
component (Union[int, list[int]]) – Components to compare. Defaults to 1.
x_axis (str, optional) – Column to use as X-axis in the plot. Defaults to “Measurement”.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “PCA_comparison”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Length of list must match number of experiments.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_PCA_explained_variance(plot_type: str = 'cumulative', variance_threshold: None | float = None, fit_range: None | tuple[float, float] | list[tuple[float, float]] = None, seed: None | int = None, save: bool = False, filename: str = 'PCA_explained_variance', format: str = '.png', show: bool = True, hover_format: str = '.2%', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14, return_df: bool = False)[source]¶
Plot the explained variance of Principal Component Analysis (PCA) for all experiments.
- Parameters:
plot_type (str, optional) – Type of plot to generate. Defaults to “cumulative”.
variance_threshold (Union[None, float], optional) – Threshold for the explained variance to plot. Defaults to None.
fit_range (Union[None, tuple[float, float], list[tuple[float, float]]], optional) – Range of energies to fit the PCA. Defaults to None.
seed (Union[None, int], optional) – Random seed for PCA. Defaults to None.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “PCA_explained_variance”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2%”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
return_df (bool, optional) – Whether to return the DataFrame with PCA results. Defaults to False.
- Raises:
ValueError – Invalid plot type.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_NMF(experiment: str | int = 0, x_axis: str = 'Measurement', save: bool = False, filename: str = 'NMF', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the results of Non-negative Matrix Factorization (NMF) for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
x_axis (str, optional) – Column to use as X-axis in the plot. Defaults to “Measurement”.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “NMF”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_NMF_frame(experiment: str | int = 0, measurement: int = 1, save: bool = False, filename: str = 'NMF_frame', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot a single frame of the Non-negative Matrix Factorization (NMF) for a given experiment.
- Parameters:
experiment (Union[str, int]) – Experiment to plot. Defaults to 0.
measurement (int) – Measurement to plot. Defaults to 1.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “NMF_frame”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Invalid experiment name.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_NMF_comparison(component: int | list[int] = 1, x_axis: str = 'Measurement', save: bool = False, filename: str = 'NMF_comparison', format: str = '.png', show: bool = True, hover_format: str = '.2f', show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot comparison of Non-negative Matrix Factorization (NMF) components across experiments.
- Parameters:
component (Union[int, list[int]]) – Components to compare. Defaults to 1.
x_axis (str, optional) – Column to use as X-axis in the plot. Defaults to “Measurement”.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “NMF_comparison”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
hover_format (str, optional) – Format of numbers in the hover text. Defaults to “.2f”.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
ValueError – Length of list must match number of experiments.
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None
- plot_NMF_error_gradient(change_cutoff: float = 0.25, save: bool = False, filename: str = 'NMF_error_change', format: str = '.png', show: bool = True, show_title: bool = True, figure_size: tuple[int, int] | str = 'auto', font_size: int = 14)[source]¶
Plot the gradient of reconstruction error of Non-negative Matrix Factorization (NMF) as a function of number of components.
- Parameters:
change_cutoff (float, optional) – Error change cutoff to plot. Defaults to 0.25.
save (bool, optional) – Whether to save the plot. Defaults to False.
filename (str, optional) – Name of the file to save. Defaults to “NMF_error_change”.
format (str, optional) – Format of the file to save. Defaults to “.png”.
show (bool, optional) – Whether to show the plot. Defaults to True.
show_title (bool, optional) – Whether to show the title. Defaults to True.
figure_size (Union[tuple[int, int], str], optional) – Size of the figure. Defaults to “auto”.
font_size (int, optional) – Size of the font. Defaults to 14.
- Raises:
NotImplementedError – Matplotlib plot not implemented yet.
- Returns:
Function does not return anything.
- Return type:
None