graintrace.rare_criteria_selection_library#

Selector functions that pick rare cluster labels from per-cluster statistics.

graintrace.rare_criteria_selection_library.select_smallest_cluster(df, nsmallest=10, min_size=1)[source]#

Return labels of the smallest clusters (by count n) above min_size.

Parameters:
Return type:

ndarray

graintrace.rare_criteria_selection_library.select_highest_von_mises_from_components(df, k=1, required_cols=None, min_size=1)[source]#

Return labels of the k clusters with the highest von Mises stress from mean components.

Parameters:
Return type:

ndarray

graintrace.rare_criteria_selection_library.select_highest_scalar(df, required_cols, k=1, min_size=1)[source]#

Return labels of the k clusters with the highest value in the given scalar column.

Parameters:
Return type:

ndarray

graintrace.rare_criteria_selection_library.select_highest_norm_3x3_tensor(df, k=1, required_cols=None, min_size=1)[source]#

Return labels of the k clusters with the highest Frobenius norm of a 3x3 tensor.

Parameters:
Return type:

ndarray