-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When loading a PMML model with the following structure:
Regression > RegressionTable > NumericPredictor
I get the following error, when trying to import the model with:
clf = PMMLLinearRegression(pmml="filename.pmml")
Traceback (most recent call last):
File "test.py", line 23, in <module>
clf = PMMLLinearRegression(pmml="filename.pmml")
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\sklearn_pmml_model\linear_model\implementations.py", line 27, in __init__
super().__init__(pmml)
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\sklearn_pmml_model\linear_model\base.py", line 32, in __init__
for field in fields
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\sklearn_pmml_model\linear_model\base.py", line 33, in <listcomp>
if field.tag == 'DataField'
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\sklearn_pmml_model\linear_model\base.py", line 25, in encoder_for
encoder.categories_ = np.array([self.field_mapping[field.get('name')][1].categories])
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\lib\site-packages\cached_property.py", line 35, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\sklearn_pmml_model\base.py", line 61, in field_mapping
for name, e in fields.items()
File "C:\Users\<user>\AppData\Local\Programs\Python\Python36\sklearn_pmml_model\base.py", line 62, in <dictcomp>
if e.tag == 'DerivedField'
AttributeError: 'NoneType' object has no attribute 'get'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request