Skip to content

Commit 274fd35

Browse files
committed
Include option for missing value imputation in import call
1 parent ec42ba9 commit 274fd35

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/sasctl/pzmm/importModel.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def pzmmImportModel(
113113
isH2OModel=False,
114114
force=False,
115115
binaryString=None,
116+
missingValues=False
116117
):
117118
"""Import model to SAS Model Manager using pzmm submodule.
118119
@@ -172,6 +173,9 @@ def pzmmImportModel(
172173
Sets whether to overwrite models with the same name upon upload. By default False.
173174
binaryString : string, optional
174175
Binary string representation of the model object. By default None.
176+
missingValues : boolean, optional
177+
Sets whether data used for scoring needs to go through imputation for
178+
missing values before passed to the model. By default False.
175179
"""
176180
# Initialize no score code or binary H2O model flags
177181
noScoreCode = False
@@ -236,6 +240,7 @@ def getFiles(extensions):
236240
isH2OModel=isH2OModel,
237241
isBinaryModel=binaryModel,
238242
binaryString=binaryString,
243+
missingValues=missingValues
239244
)
240245
print(
241246
"Model score code was written successfully to {}.".format(

src/sasctl/pzmm/writeScoreCode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def score{modelPrefix}({inputVarList}):
275275
)
276276
)
277277
# As a check for missing model variables, run a try/except block that reattempts to load the model in as a variable
278-
if binaryString is None:
278+
if not isBinaryString:
279279
cls.pyFile.write(
280280
"""\n
281281
try:

0 commit comments

Comments
 (0)