I am currently looking into developing a new Predictor node for the “Random Forest Learner”. Since this is my first node, I simply copied the code of the “Random Forest Predictor” into my custom files generated by the “New Node Wizard” just see if it would work, but when I want to use the created node, I receive the error “inporttype must not be null!”. Somehow I can’t connect my node to the existing TreeEnsembleModelPortObject, eventhough they use the same class and also share the same extension point. Since I can’t find any documentation on this topic, can some of the more experienced developers help me?
could you share the code?
the code is exactly the same as in the KNIME Implementation (here), just copied to the different class files generated by the New Node Wizard (with renamed package and class declaration of course). For the factory class, I used the second factory (here). My plugin.xml: <?xml version="1.0" encoding="UTF-8"?>
If you need the code, I can also upload it, but since it is just copied from KNIME I didn’t include it in this post. Thanks for the help!
Morrisplugin.xml (975 Bytes)
plugin.xml you are also defining the same port object spec as in the tree ensembles plugin which will not be compatible with the existing one, as it is in a different plugin. Instead you want to add a dependency on the
org.knime.base.treeensembles plug-in and then use the port object defined there.
it worked like a charm, I added the dependency in eclipse under the “Dependency” category in the plugin.xml file. Thanks for the quick help!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.