Closed galenseilis closed 10 months ago
Looks like a typo in your step names: inpute
vs impute
.
The output from your dag will be the output of the final step, or if there are multiple endpoints then it will be a dict of step names to step outputs.
Will this give you what you need? I'm not sure I fully understand what you're trying to achieve.
Ah, thank you for spotting the typo.
Running with the typo corrected I get the traceback,
Traceback (most recent call last):
File "/usr/lib/python3.10/idlelib/run.py", line 578, in runcode
exec(code, self.locals)
File "/home/galen/skdag_test.py", line 41, in <module>
dag.fit_predict(X, y)
File "/home/galen/.local/lib/python3.10/site-packages/sklearn/utils/_available_if.py", line 31, in __get__
if not self.check(obj):
File "/home/galen/.local/lib/python3.10/site-packages/skdag/dag/_dag.py", line 103, in check_leaves
raise AttributeError(
AttributeError: <class 'sklearn.preprocessing._function_transformer.FunctionTransformer'> object(s) has no attribute 'predict'
I guess I could subclass FunctionTransformer
to have a predict method.
At this early stage I am just trying to figure more about how the package works.
I am trying to understand how to get skdag to return all the computed columns when the predict method is called.
Here is an example from the documentation:
I tried just sticking an identity function on the end to collect the results, but it didn't work. I do not understand how things get passed along internally.
Here the traceback I got. It suggested some kind of "inconsistency" in what I have coded.