API#
- found.find.HiDDEN(x, /, cond_col, control_val, algo=Pipeline(dimr_fn=<function run_pca>, regr_fn=<function reg_logit>, binr_fn=<function bin_kmeans>, cachable_dimr=True, strict=True), **kwargs)[source]#
runs HiDDEN on a given
AnnDataobject.- Parameters:
cond_col (
str) – string indicating obs column in adata representing condition valuecontrol_val (
object) – value representing the control condition in the provided condition columnalgo (
Pipeline) – algorithm pipeline (expected to use parameterVas original condition annotation)kwargs – additional variables to pass into pipeline
- Returns:
tuple[Series,Series] – 2-tuple consisting of:1-d series of prediction outputs by model
binarized labels from prediction values
- found.find.HiDDENg(x, /, cond_col, control_val, group_by, algo=Pipeline(dimr_fn=<function run_pca>, regr_fn=<function reg_logit>, binr_fn=<function bin_kmeans>, cachable_dimr=True, strict=True), which_grouped=None, grp_specific_args=None, **kwargs)[source]#
runs HiDDEN on a given
AnnDataobject, given some set of grouping factors.- Parameters:
cond_col (
str) – string indicating obs column in adata representing condition valuecontrol_val (
object) – value representing the control condition in the provided condition columngroup_by (
str|tuple[str]) – set of column names inx.obsspecifying groupingalgo (
Pipeline) – algorithm pipeline (expected to use parameterVas original condition annotation)which_grouped (
str|tuple[str] |list[str] |dict[str,Callable[[object,ndarray[tuple[int],dtype[integer]]],object]] |None) – set of pipeline arguments which should be indexed by grouping (set to None to group all pipeline arguments which support indexing)grp_specific_args (
Mapping[object,dict[str,object]] |None) – any additional arguments that are to be provided on a group-specific basiskwargs – additional variables to pass into pipeline across every group
- Returns:
tuple[Series,Series] – 2-tuple consisting of:1-d series of prediction outputs by model
binarized labels from prediction values
- found.find.HiDDENt(x, /, cond_col, control_val, tuner, algo=Pipeline(dimr_fn=<function run_pca>, regr_fn=<function reg_logit>, binr_fn=<function bin_kmeans>, cachable_dimr=True, strict=True), **kwargs)[source]#
runs HiDDEN on a given
AnnDataobject, trying to optimize for a specific set of dimensions using providedTuner.- Parameters:
cond_col (
str) – string indicating obs column in adata representing condition valuecontrol_val (
object) – value representing the control condition in the provided condition columntuner (
Tuner[TypeVar(P),TypeVar(S)]) – provided tuner which attempts to optimize pipeline for a specific hyperparameteralgo (
Pipeline) – algorithm pipeline (expected to use parameterVas original condition annotation)kwargs – additional variables to pass into pipeline
- Returns:
tuple[TypeVar(P),Mapping[TypeVar(P),tuple[Series,Series,TypeVar(S)]]] – 2-tuple consisting of:selected optimal pipeline hyperparameters
dictionary with keys being pipeline hyperparameters and values being a 3-tuple of:
1-d series of prediction outputs by model
model adjusted labels
optional scoring value generated by tuner for specific hyperparameter configuration
- found.find.HiDDENgt(x, /, cond_col, control_val, group_by, tuner, algo=Pipeline(dimr_fn=<function run_pca>, regr_fn=<function reg_logit>, binr_fn=<function bin_kmeans>, cachable_dimr=True, strict=True), which_grouped=None, grp_specific_args=None, **kwargs)[source]#
runs HiDDEN on a given
AnnDataobject, given some set of grouping factors, trying to optimize for a specific set of dimensions using providedTuner.- Parameters:
cond_col (
str) – string indicating obs column in adata representing condition valuecontrol_val (
object) – value representing the control condition in the provided condition columngroup_by (
str|tuple[str]) – set of column names inx.obsspecifying groupingtuner (
Tuner[TypeVar(P),TypeVar(S)]) – provided tuner which attempts to optimize pipeline for a specific hyperparameteralgo (
Pipeline) – algorithm pipeline (expected to use parameterVas original condition annotation)which_grouped (
str|tuple[str] |list[str] |dict[str,Callable[[object,ndarray[tuple[int],dtype[integer]]],object]] |None) – set of pipeline arguments which should be indexed by grouping (set to None to group all pipeline arguments which support indexing)grp_specific_args (
Mapping[TypeVar(G),dict[str,object]] |None) – any additional arguments that are to be provided on a group-specific basiskwargs – additional variables to pass into pipeline across every group
- Returns:
tuple[Mapping[TypeVar(G),TypeVar(P)],ByParamAccessor[TypeVar(G),TypeVar(P),TypeVar(S)],Callable[[TypeVar(G)],Mapping[TypeVar(P),tuple[Series,Series,TypeVar(S)]]]] – 3-tuple consisting of:mapping from each group to selected hyper-parameter for that group
accessor function which given a mapping of groups to hyper-parameters (and an optional default hyper-parameter for unspecified groups), returns a 3-tuple of:
1-d series of prediction outputs by model, ordered by their original order within the provided
model adjusted labels
mapping of group to score value given provided configuration
accessor function which given a specific group, returns a HiDDENt-style output dictionary for just that group