Closed PARODBE closed 2 years ago
I am not sure I completely understand the question. A couple of possibly related remarks:
skompile(m.predict).to('python/code')
) can perhaps be a useful teaching aid for small forests of not-too-deep trees. Here is how this is used for decision trees, for example.Thanks for so rapid answer!. When I do this:
Being my dataset, the iris_dataset. I obtain the next error:
However the shape of my inputs is:
Could you help me please?
Thanks!
SKompiler expects the inputs
argument to provide a list of symbolic arguments that will be referred to in the expression being generated. E.g.
from skompiler.dsl import ident
inputs = [ident('a'), ident('b'), ident('c'), ident('d')]
could probably work out in your case.
I don't see however how your current actions will help you in your quest. I suggested you to look at SKompiler code in the sense that it might help you better understand the internal data structures of SKLearn (e.g. you can see that the loop in the function goes over model.estimators_
which can be a useful hint here). Just running it is probably not going to help.
With this library, would be possible extract the weights of a Random Fores as for example in suppor vector machine or PLS or Neural Network? In this case, could you provide me some code, for after load the weights and training your model.
Thanks! Pablo