/
You are viewing the documentation for metbit 6.6.2. Change release context

metbit.utility

Statistics and utilities module in metbit 6.6.2.

import metbit.utility

Classes

lazypair

Methods

__init__(self, dataset, column_name)
get_index(self)
get_name(self)
get_meta(self)
get_column_name(self)
get_dataset(self)

gen_page

Methods

__init__(self, data_path)

This function takes in the path to the data folder and returns the HTML files for the OPLS-DA plots.

Parameters

data_pathstr

The path to the data folder. gen_page(data_path).get_files()

get_files(self)

oplsda_path

Methods

__init__(self, data_path)
make_path(self)
get_path(self)

Normality_distribution

Methods

__init__(self, data: pd.DataFrame)
plot_distribution(self, feature)
pca_distributions(self)

Normalise

Methods

__init__(self, data: pd.DataFrame, compute_missing: bool=True)

This function takes in a dataframe and returns the normalised dataframe.

Parameters

datapandas dataframe

The dataframe to be used. Normalise(data).normalise()

pqn_normalise(self, plot: bool=True)
decimal_place_normalisation(self, decimals: int=2)

This function returns the dataframe with values rounded to a specified number of decimal places.

Parameters

decimalsint

The number of decimal places to round to.

z_score_normalisation(self)

This function returns the dataframe normalized using Z-Score.

linear_normalisation(self)

This function returns the dataframe normalized using Min-Max (linear normalization).

normalize_to_100(self)

This function returns the dataframe with values normalized to 100.

clipping_normalisation(self, lower: float, upper: float)

This function returns the dataframe with values clipped to the specified range.

Parameters

lowerfloat

The lower bound for clipping.

upperfloat

The upper bound for clipping.

standard_deviation_normalisation(self)

This function returns the dataframe normalized using Standard Deviation.

Functions

project_name_generator()
boxplot_stats(df, x_col, y_col, group_order=None, custom_colors=None, p_value_threshold=0.05, annotate_style='value', figure_size=(800, 600), y_offset=5, show_non_significant=True, title_=None, y_label=None, x_label=None, fig_height=800, fig_width=600)

Creates a box plot with tiered p-value annotations.

Parameters: - df (DataFrame): The input data. - x_col (str): Column name for categorical grouping. - y_col (str): Column name for numerical values. - group_order (list, optional): Order of groups for visualization. - custom_colors (dict, optional): Custom colors for each group. - p_value_threshold (float, optional): Threshold for significance annotations. - annotate_style (str, optional): 'value' for p-value text, 'symbol' for stars ('*'). - figure_size (tuple, optional): Width and height of the figure. - y_offset (int, optional): Vertical spacing for p-value annotations.

Returns: - fig (Figure): The Plotly figure object.

Source

metbit/utility.py at v6.6.2
Downloads for metbit 6.6.2PyPI and GitHub measure different distribution channels. Statistics refresh daily.

Counts are distribution activity, not unique users. GitHub source archives and Git clones are not included. Sources: PyPI Stats, Pepy, ClickPy, and GitHub Releases.

metbit 6.6.2 documentation