Skip to content

Commit 10564bc

Browse files
authored
23059: Adds support for new analyze param - MINOR (#373)
- Adds docstrings and signature support for `use_sdm`
1 parent 4f5fe7c commit 10564bc

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

howso/client/base.py

+20
Original file line numberDiff line numberDiff line change
@@ -4039,6 +4039,7 @@ def analyze(
40394039
targeted_model: t.Optional[TargetedModel] = None,
40404040
use_case_weights: t.Optional[bool] = None,
40414041
use_deviations: t.Optional[bool] = None,
4042+
use_sdm: t.Optional[bool] = None,
40424043
weight_feature: t.Optional[str] = None,
40434044
**kwargs
40444045
):
@@ -4101,6 +4102,14 @@ def analyze(
41014102
will be used if the Trainee has them.
41024103
use_deviations : bool, optional
41034104
When True, uses deviations for LK metric in queries.
4105+
use_sdm : bool, default None,
4106+
When True, Howso Engine will compute and use a sparse deviation
4107+
matrix (SDM) for each nominal feature in all similarity queries.
4108+
Enabling SDM will typically incur a small to moderate penalty on
4109+
speed when using nominal features in inference in exchange for
4110+
yielding higher quality inference. The magnitude of the changes are
4111+
dependent on relationships among the data and the task at hand.
4112+
Howso Engine will default to True, if left unset.
41044113
weight_feature : str, optional
41054114
Name of feature whose values to use as case weights.
41064115
When left unspecified uses the internally managed case weight.
@@ -4165,6 +4174,7 @@ def analyze(
41654174
rebalance_features=rebalance_features,
41664175
targeted_model=targeted_model,
41674176
use_deviations=use_deviations,
4177+
use_sdm=use_sdm,
41684178
weight_feature=weight_feature,
41694179
)
41704180

@@ -4235,6 +4245,7 @@ def set_auto_analyze_params(
42354245
targeted_model: t.Optional[TargetedModel] = None,
42364246
use_deviations: t.Optional[bool] = None,
42374247
use_case_weights: t.Optional[bool] = None,
4248+
use_sdm: t.Optional[bool] = None,
42384249
weight_feature: t.Optional[str] = None,
42394250
**kwargs
42404251
):
@@ -4307,6 +4318,14 @@ def set_auto_analyze_params(
43074318
If set to True, will scale influence weights by each case's
43084319
`weight_feature` weight. If unspecified, case weights
43094320
will be used if the Trainee has them.
4321+
use_sdm : bool, default None,
4322+
When True, Howso Engine will compute and use a sparse deviation
4323+
matrix (SDM) for each nominal feature in all similarity queries.
4324+
Enabling SDM will typically incur a small to moderate penalty on
4325+
speed when using nominal features in inference in exchange for
4326+
yielding higher quality inference. The magnitude of the changes are
4327+
dependent on relationships among the data and the task at hand.
4328+
Howso Engine will default to True, if left unset.
43104329
weight_feature : str
43114330
Name of feature whose values to use as case weights.
43124331
When left unspecified uses the internally managed case weight.
@@ -4395,6 +4414,7 @@ def set_auto_analyze_params(
43954414
"use_deviations": use_deviations,
43964415
"inverse_residuals_as_weights": inverse_residuals_as_weights,
43974416
"use_case_weights": use_case_weights,
4417+
"use_sdm": use_sdm,
43984418
"weight_feature": weight_feature,
43994419
**kwargs,
44004420
})

howso/engine/trainee.py

+10
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ def analyze(
989989
targeted_model: t.Optional[TargetedModel] = None,
990990
use_case_weights: t.Optional[bool] = None,
991991
use_deviations: t.Optional[bool] = None,
992+
use_sdm: t.Optional[bool] = True,
992993
weight_feature: t.Optional[str] = None,
993994
**kwargs
994995
):
@@ -1049,6 +1050,14 @@ def analyze(
10491050
be used if the Trainee has them.
10501051
use_deviations : bool, default False
10511052
When True, uses deviations for LK metric in queries.
1053+
use_sdm : bool, default None,
1054+
When True, Howso Engine will compute and use a sparse deviation
1055+
matrix (SDM) for each nominal feature in all similarity queries.
1056+
Enabling SDM will typically incur a small to moderate penalty on
1057+
speed when using nominal features in inference in exchange for
1058+
yielding higher quality inference. The magnitude of the changes are
1059+
dependent on relationships among the data and the task at hand.
1060+
Howso Engine will default to True, if left unset.
10521061
weight_feature : str, optional
10531062
Name of feature whose values to use as case weights.
10541063
When left unspecified uses the internally managed case weight.
@@ -1075,6 +1084,7 @@ def analyze(
10751084
rebalance_features=rebalance_features,
10761085
targeted_model=targeted_model,
10771086
use_deviations=use_deviations,
1087+
use_sdm=use_sdm,
10781088
weight_feature=weight_feature,
10791089
**kwargs
10801090
)

version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dependencies": {
3-
"howso-engine": "97.1.1"
3+
"howso-engine": "97.2.0"
44
}
55
}

0 commit comments

Comments
 (0)