@@ -48,6 +48,8 @@ def writeVarJSON(cls, inputData, isInput=True, jPath=Path.cwd()):
48
48
Writes a variable descriptor JSON file for input or output variables, based on input data containing predictor
49
49
and prediction columns.
50
50
51
+ This function creates a JSON file named either InputVar.json or OutputVar.json based on argument inputs.
52
+
51
53
Parameters
52
54
----------
53
55
inputData : dataframe or list of dicts
@@ -58,11 +60,6 @@ def writeVarJSON(cls, inputData, isInput=True, jPath=Path.cwd()):
58
60
Boolean flag to check if generating the input or output variable JSON.
59
61
jPath : string, optional
60
62
File location for the output JSON file. Default is the current working directory.
61
-
62
- Yields
63
- ------
64
- JSON file
65
- A JSON file named either InputVar.json or OutputVar.json based on argument inputs.
66
63
"""
67
64
outputJSON = pd .DataFrame ()
68
65
if isinstance (inputData , list ):
@@ -163,6 +160,7 @@ def writeModelPropertiesJSON(
163
160
Writes a JSON file containing SAS Model Manager model properties.
164
161
165
162
The JSON file format is required by the SAS Model Repository API service and only eventProbVar can be 'None'.
163
+ This function outputs a JSON file located named "ModelProperties.json".
166
164
167
165
Parameters
168
166
----------
@@ -186,11 +184,6 @@ def writeModelPropertiesJSON(
186
184
Location for the output JSON file. The default is the current working directory.
187
185
modeler : string, optional
188
186
The modeler name to be displayed in the model properties. The default value is None.
189
-
190
- Yields
191
- ------
192
- 'ModelProperties.json'
193
- Output JSON file located at jPath.
194
187
"""
195
188
196
189
# Check if model description provided is smaller than then 1024 character limit
@@ -272,6 +265,8 @@ def writeFileMetadataJSON(cls, modelPrefix, jPath=Path.cwd(), isH2OModel=False):
272
265
"""
273
266
Writes a file metadata JSON file pointing to all relevant files.
274
267
268
+ This function outputs a JSON file named "fileMetadata.json".
269
+
275
270
Parameters
276
271
----------
277
272
modelPrefix : string
@@ -282,11 +277,6 @@ def writeFileMetadataJSON(cls, modelPrefix, jPath=Path.cwd(), isH2OModel=False):
282
277
isH2OModel : boolean, optional
283
278
Sets whether the model metadata is associated with an H2O.ai model. If set as True, the MOJO model file
284
279
will be set as a score resource. The default value is False.
285
-
286
- Yields
287
- ------
288
- 'fileMetadata.json'
289
- Output JSON file located at jPath.
290
280
"""
291
281
292
282
if not isH2OModel :
@@ -353,6 +343,8 @@ def writeBaseFitStat(
353
343
* KSCut = KS Cutoff
354
344
* C = Area Under ROC
355
345
346
+ This function outputs a JSON file named "dmcas_fitstat.json".
347
+
356
348
Parameters
357
349
----------
358
350
csvPath : string, optional
@@ -365,11 +357,6 @@ def writeBaseFitStat(
365
357
Input parameter tuples in the form of (parameterName, parameterLabel, parameterValue, dataRole). For
366
358
example, a sample parameter call would be ('NObs', 'Sum of Frequencies', 3488, 'TRAIN'). Variable dataRole
367
359
is typically either TRAIN, TEST, or VALIDATE or 1, 2, 3 respectively. The default value is None.
368
-
369
- Yields
370
- ------
371
- 'dmcas_fitstat.json'
372
- Output JSON file located at jPath.
373
360
"""
374
361
375
362
validParams = [
@@ -467,6 +454,8 @@ def calculateFitStat(
467
454
values come first and the predicted second
468
455
* list; the actual and predicted values are their own indexed entry
469
456
457
+ This function outputs a JSON file named "dmcas_fitstat.json".
458
+
470
459
Parameters
471
460
----------
472
461
validateData : pandas dataframe, numpy array, or list, optional
@@ -481,11 +470,6 @@ def calculateFitStat(
481
470
jPath : string, optional
482
471
Location for the output JSON file. The default value is the current
483
472
working directory.
484
-
485
- Yields
486
- ------
487
- 'dmcas_fitstat.json'
488
- Output JSON file located at jPath.
489
473
"""
490
474
# If numpy inputs are supplied, then it is assumed that numpy is installed in the environment
491
475
try :
@@ -611,6 +595,8 @@ def generateROCLiftStat(
611
595
ROC and Lift calculations are completed by CAS through a SWAT call. Note that if no data set is provided
612
596
(validate, train, or test), this function raises an error and does not create any JSON files.
613
597
598
+ This function outputs a pair of JSON files named "dmcas_lift.json" and "dmcas_roc.json".
599
+
614
600
Parameters
615
601
---------------
616
602
targetName: str
@@ -631,13 +617,6 @@ def generateROCLiftStat(
631
617
probabilities. The default value is None.
632
618
jPath : string, optional
633
619
Location for the output JSON file. The default value is the current working directory.
634
-
635
- Yields
636
- ---------------
637
- 'dmcas_roc.json'
638
- Output JSON file located at jPath.
639
- 'dmcas_lift.json'
640
- Output JSON file located at jPath.
641
620
"""
642
621
# If numpy inputs are supplied, then it is assumed that numpy is installed in the environment
643
622
try :
@@ -980,6 +959,8 @@ def create_requirements_json(cls, model_path=Path.cwd()):
980
959
model development environment, it is recommended to the user that they adjust the requirements.json file's
981
960
package versions to match the model development environment.
982
961
962
+ This function outputs a JSON file named "requirements.json".
963
+
983
964
Parameters
984
965
----------
985
966
model_path : str, optional
@@ -989,11 +970,6 @@ def create_requirements_json(cls, model_path=Path.cwd()):
989
970
-------
990
971
list of dicts
991
972
List of dictionary representations of the json file contents, split into each package and/or warning.
992
-
993
- Yields
994
- ------
995
- requirements.json : file
996
- JSON file used to create a specific Python environment in a SAS Model Manager published container.
997
973
"""
998
974
999
975
pickle_packages = []
0 commit comments