Summary about final Weights

Hey guys,

iam quite new to the whole topic of machine learning and the various tools like KNIME and co. I am looking for an option to get a summary about the final weights after the model is trained and the validation set was used in order to evaluate which feature has a strong influence and which doesnt with regards to the final outcome. is this even a typical approach or are the better ways?

best regards,

alex

Hi,

If you have a trained model, it can be saved as PMML file (“PMML Writer” node) and then read/parsed like any XML based file, which however requires som skills on XPath query language.

To make it easier, just try to do the following steps:

  1. Save your finished predictive model as PMML file (“PMML Writer” node)
  2. Open the PMML file in Excel, confirm prompt “As XML table”, allow create XML scheme, save as XLSX file
  3. Read the XLSX file in KNIME (“Excel Reader” node) and look for “weight” column.
    You also find there other columns related with network architecture.

Screenshot below comes from an example of a MLP with input layer (0), 2 hidden layers (1,2) and output layer. Both “id7” and “from” columns identify connection between specific neurons like in the first row:
1,0 : hidden layer(1), neuron (0)
0,0 : input layer (0), neuron (0)

Weight on that connection equals to 0.152
From this point you should be able to get all characterictics which are interesting for you.

Martin K.

image

1 Like

Hi Martin,

thanks for your answer. I built my network by using the DL4J nodes so i am not able to save it as a pmml model, or is there another option?

Hi Alex,

what type of model are we talking about, since KNIME offers quite a few options in terms of machine learning models.
For now I will just assume that you mean a linear model like linear regression or logistic regression.
In this case you can also use KNIME’s build in variants of the algorithms which allow you to inspect the weights after training (either in the view or in the corresponding output table).
DL4J is actually a deep learning framework where the models are treated more or less as a black-box.
However, since deep learning captures very complex non-linear patterns in the data, it is unlikely that you will be able to tell anything by just looking at the weights (except maybe that something is seriously wrong e.g. if the weights are extremely large or all zero).
There are approaches that try to identify what kind of features individual neurons in the network react to (e.g. Google’s deep dream) but this functionality is not yet integrated in KNIME (and only works for CNNs anyway).

Cheers,

nemad

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.