Skip to content

Commit

Permalink
22224: Added boundary values to "details" docstrings, MINOR (#325)
Browse files Browse the repository at this point in the history
This should not go in until the howso-engine version with boundary
values added is released and the version.json is updated to use that new
version within this PR (or another).

---------

Co-authored-by: howso-automation <[email protected]>
Co-authored-by: Andrew Bassett <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent 9d8599a commit cd77b90
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 1 deletion.
26 changes: 26 additions & 0 deletions howso/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,32 @@ def react( # noqa: C901
- boundary_cases_familiarity_convictions : bool, optional
If True, outputs familiarity conviction of addition for each of
the boundary cases.
- boundary_value_context_features : list of str, optional
If specified, boundary values will be computed for each
specified feature and returned under "boundary_values".
These values indicate values nearest to the given contexts
that when used as contexts will alter the action values
significantly. If 'boundary_value_action_outcome' is also
specified, then the boundary values will indicate the values
nearest to the given contexts that alter the action values to
satisfy the conditions defined.
- boundary_value_action_outcome : dict, optional
A mapping of action feature names to conditions that will be
used to determine the boundary where boundary values will be
searched for. Only used when 'boundary_value_context_features'
is also used.
.. NOTE::
The dictionary keys are the feature name and values are one of:
- None
- A value, must match exactly.
- An array of two numeric values, specifying an inclusive
range. Only applicable to continuous and numeric ordinal
features.
- An array of string values, must match any of these values
exactly. Only applicable to nominal and string ordinal
features.
- case_contributions_full : bool, optional
If true outputs each influential case's differences between the
predicted action feature value and the predicted action feature
Expand Down
3 changes: 2 additions & 1 deletion howso/client/schemas/reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class Reaction(abc.MutableMapping):
"case_directional_feature_contributions_full", "case_directional_feature_contributions_robust",
"directional_feature_contributions_full", "directional_feature_contributions_robust",
"boundary_cases_familiarity_convictions", "boundary_cases",
"feature_case_contributions_full", "feature_case_contributions_robust", "case_feature_contributions_full",
"boundary_values", "feature_case_contributions_full",
"feature_case_contributions_robust", "case_feature_contributions_full",
"case_feature_contributions_robust", "case_feature_residuals_robust", "case_feature_residuals_full",
"case_mda_full", "case_mda_robust", "categorical_action_probabilities", "context_values",
"derivation_parameters", "distance_contribution", "distance_ratio_parts", "distance_ratio",
Expand Down
26 changes: 26 additions & 0 deletions howso/engine/trainee.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,32 @@ def react(
- boundary_cases_familiarity_convictions : bool, optional
If True, outputs familiarity conviction of addition for each of
the boundary cases.
- boundary_value_context_features : list of str, optional
If specified, boundary values will be computed for each
specified feature and returned under "boundary_values".
These values indicate values nearest to the given contexts
that when used as contexts will alter the action values
significantly. If 'boundary_value_action_outcome' is also
specified, then the boundary values will indicate the values
nearest to the given contexts that alter the action values to
satisfy the conditions defined.
- boundary_value_action_outcome : dict, optional
A mapping of action feature names to conditions that will be
used to determine the boundary where boundary values will be
searched for. Only used when 'boundary_value_context_features'
is also used.
.. NOTE::
The dictionary keys are the feature name and values are one of:
- None
- A value, must match exactly.
- An array of two numeric values, specifying an inclusive
range. Only applicable to continuous and numeric ordinal
features.
- An array of string values, must match any of these values
exactly. Only applicable to nominal and string ordinal
features.
- case_contributions_full : bool, optional
If true outputs each influential case's differences between the
predicted action feature value and the predicted action feature
Expand Down
26 changes: 26 additions & 0 deletions howso/scikit/scikit.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,32 @@ def describe_prediction(self, X: np.ndarray, details: t.Optional[Mapping] = None
- boundary_cases_familiarity_convictions : bool, optional
If True, outputs familiarity conviction of addition for each of
the boundary cases.
- boundary_value_context_features : list of str, optional
If specified, boundary values will be computed for each
specified feature and returned under "boundary_values".
These values indicate values nearest to the given contexts
that when used as contexts will alter the action values
significantly. If 'boundary_value_action_outcome' is also
specified, then the boundary values will indicate the values
nearest to the given contexts that alter the action values to
satisfy the conditions defined.
- boundary_value_action_outcome : dict, optional
A mapping of action feature names to conditions that will be
used to determine the boundary where boundary values will be
searched for. Only used when 'boundary_value_context_features'
is also used.
.. NOTE::
The dictionary keys are the feature name and values are one of:
- None
- A value, must match exactly.
- An array of two numeric values, specifying an inclusive
range. Only applicable to continuous and numeric ordinal
features.
- An array of string values, must match any of these values
exactly. Only applicable to nominal and string ordinal
features.
- case_contributions_full : bool, optional
If true outputs each influential case's differences between the
predicted action feature value and the predicted action feature
Expand Down

0 comments on commit cd77b90

Please sign in to comment.