KNIME equivalent of fit and transform

Hi All, 

I am new to KNIME. Sklearn has a nice fit and transform API : http://scikit-learn.org/stable/data_transforms.html , you learn parameters and apply the learned parameters during transform to your test dataset .

How do we achieve the same functionality in KNIME ? Say you perform bag of words to get vectors for rows. Now while testing, I get my test data from a different CSVReader node, how do I apply the same transformation to this? If I just create a new node again , it will again learn the vocabulary from scratch which is not desired, it should use the vocabulary learned in training.

Also if I am using a python script node, is there a way to use an object created in one node in some other node?

 

Hi Bharat,

You can use a Document Vector node in combination with a Document Vector Adapter, see here for an example: https://www.knime.com/nodeguide/other-analytics-types/text-processing/documentvector-featurespaceadaption

Is this what you are looking for?

Cheers,

Roland