@@ -198,6 +198,7 @@ def import_model(
198
198
predict_threshold : Optional [float ] = None ,
199
199
target_values : Optional [List [str ]] = None ,
200
200
overwrite_project_properties : Optional [bool ] = False ,
201
+ target_index : Optional [int ] = None ,
201
202
** kwargs ,
202
203
) -> Tuple [RestObj , Union [dict , str , Path ]]:
203
204
"""
@@ -275,10 +276,16 @@ def import_model(
275
276
target_values : list of strings, optional
276
277
A list of target values for the target variable. This argument and the
277
278
score_metrics argument dictate the handling of the predicted values from
278
- the prediction method. The default value is None.
279
+ the prediction method. The order of the target values should reflect the
280
+ order of the related probabilities in the model. The default value is None.
279
281
overwrite_project_properties : bool, optional
280
282
Set whether the project properties should be overwritten when attempting to
281
283
import the model. The default value is False.
284
+ target_index : int, optional
285
+ Sets the index of success for a binary model. If target_values are given, this
286
+ index should match the index of the target outcome in target_values. If target_values
287
+ are not given, this index should indicate whether the the target probability variable
288
+ is the first or second variable returned by the model. The default value is 1.
282
289
kwargs : dict, optional
283
290
Other keyword arguments are passed to the following function:
284
291
* sasctl.pzmm.ScoreCode.write_score_code(...,
@@ -352,6 +359,7 @@ def import_model(
352
359
target_values = target_values ,
353
360
missing_values = missing_values ,
354
361
score_cas = score_cas ,
362
+ target_index = target_index ,
355
363
** kwargs ,
356
364
)
357
365
if score_code_dict :
@@ -451,6 +459,7 @@ def import_model(
451
459
target_values = target_values ,
452
460
missing_values = missing_values ,
453
461
score_cas = score_cas ,
462
+ target_index = target_index ,
454
463
** kwargs ,
455
464
)
456
465
if score_code_dict :
0 commit comments