gunshotmatch_pipeline.results

Results presented in different formats.

Classes:

Matches

Return type from matches().

MatchesCompounds

Type hint for the compounds key in Matches.

MatchesMetadata

Type hint for the metadata key in Matches.

Functions:

compounds(*project[, normalize])

Returns data on the compounds in each repeat in the project(s).

compounds_from_matches(*matches_data[, …])

Prepares data on the compounds in each repeat from the output of matches() for each project.

machine_learning_data(*project[, normalize])

Returns data formatted for training a decision tree or other machine learning model.

matches(project)

Returns data on the “best match” for each peak.

unknown(unknown_project[, normalize])

Returns results for an unknown sample.

unknown_machine_learning_data(unknown_project)

Returns data formatted for training a decision tree or other machine learning model.

typeddict Matches[source]

Bases: TypedDict

Return type from matches().

Required Keys
typeddict MatchesCompounds

Bases: TypedDict

Type hint for the compounds key in Matches.

Required Keys
typeddict MatchesMetadata[source]

Bases: TypedDict

Type hint for the metadata key in Matches.

Required Keys
compounds(*project, normalize=False)[source]

Returns data on the compounds in each repeat in the project(s).

The output mapping gives the peak areas for each compound in the different projects, grouped by compound.

Parameters
Return type

Dict[str, Dict[str, List[float]]]

compounds_from_matches(*matches_data, normalize=False)[source]

Prepares data on the compounds in each repeat from the output of matches() for each project.

The output mapping gives the peak areas for each compound in the different projects, grouped by compound.

Parameters
Return type

Dict[str, Dict[str, List[float]]]

machine_learning_data(*project, normalize=False)[source]

Returns data formatted for training a decision tree or other machine learning model.

Parameters
Return type

Dict[str, Dict[str, float]]

matches(project)[source]

Returns data on the “best match” for each peak.

Parameters

project (Project)

Return type

Matches

unknown(unknown_project, normalize=False)[source]

Returns results for an unknown sample.

The output mapping is formatted the same as that from compounds(), but with only one “project”.

Parameters
Return type

Dict[str, Dict[str, List[float]]]

unknown_machine_learning_data(unknown_project, normalize=False)[source]

Returns data formatted for training a decision tree or other machine learning model.

Parameters
Return type

Dict[str, Dict[str, float]]