skferm.datasets package#

Submodules#

skferm.datasets.mtp_ph module#

files(anchor: ModuleType | str | None = None) Traversable[source]#

Get a Traversable resource for an anchor.

load_mtp_ph_data() DataFrame[source]#

Load the MTP pH dataset from the package resources. This data represents acidification curves coming from a micro titer plate.

Returns:

DataFrame containing the MTP pH dataset.

Return type:

pd.DataFrame

skferm.datasets.rheolaser module#

files(anchor: ModuleType | str | None = None) Traversable[source]#

Get a Traversable resource for an anchor.

clean_rheolaser(df: DataFrame, cutoff: int | None = None) DataFrame[source]#

Function which transforms the raw rheolaser format to a nice long format.

load_rheolaser_data(clean: bool = True, cutoff: int | None = None) DataFrame[source]#

Load the Rheolaser dataset from the package resources. This is the exact format you get from a Rheolaser machine. Use clean_rheolaser to transform it into a long format DataFrame.

Returns:

DataFrame containing the Rheolaser dataset.

Return type:

pd.DataFrame

skferm.datasets.synthetic module#

gompertz(t: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], a: float, b: float, c: float)[source]#

Predict the value at time t using the modified Gompertz function.

Parameters: t (float or array-like): The time at which to predict the value. a (float): The upper asymptote. b (float): The displacement along the time axis. c (float): The growth rate.

Returns: float or array-like: The function value at time t.

modified_gompertz(t: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], A: float, L: float, mu: float)[source]#

modified gompertz as proposed by Zwietering et al. 1990

This gompertz has more interpretable parameters than the original gompertz.

Parameters:
  • t (float or array-like) – The time at which to predict the value.

  • A (float) – The upper asymptote.

  • L (float) – The lag phase

  • mu (float) – The maximum specific growth rate

Returns: float or array-like: The function value at time t.

logistic_growth(t: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], N0: float, Nmax: float, r: float) ndarray[source]#

Simulate microbial growth using the logistic growth model.

Parameters: - t (array-like): Time points. - N0 (float): Initial population size. - Nmax (float): Maximum population size (carrying capacity). - r (float): Growth rate.

Returns: - array-like: Population at each time point.

generate_synthetic_growth(time: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], model: str = 'logistic', noise_std: float = 0.0, **kwargs) DataFrame[source]#

Generate synthetic growth data using specified growth model.

Parameters:
  • (array-like) (- time)

  • (str) (- model)

  • (float) (- noise_std)

  • **kwargs (Parameters for the growth model.)

Returns:

- dict

Return type:

A dictionary with time and population arrays.

Module contents#

Dataset utilities for scikit-ferm.

generate_synthetic_growth(time: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], model: str = 'logistic', noise_std: float = 0.0, **kwargs) DataFrame[source]#

Generate synthetic growth data using specified growth model.

Parameters:
  • (array-like) (- time)

  • (str) (- model)

  • (float) (- noise_std)

  • **kwargs (Parameters for the growth model.)

Returns:

- dict

Return type:

A dictionary with time and population arrays.

load_rheolaser_data(clean: bool = True, cutoff: int | None = None) DataFrame[source]#

Load the Rheolaser dataset from the package resources. This is the exact format you get from a Rheolaser machine. Use clean_rheolaser to transform it into a long format DataFrame.

Returns:

DataFrame containing the Rheolaser dataset.

Return type:

pd.DataFrame

load_mtp_ph_data() DataFrame[source]#

Load the MTP pH dataset from the package resources. This data represents acidification curves coming from a micro titer plate.

Returns:

DataFrame containing the MTP pH dataset.

Return type:

pd.DataFrame