Hi,<div><br></div><div>I have been doing some work with 0.4.7 lately and am wondering what the exact strategy/formula behind the .getSensitivityAnalyzer() is for dealing with SVM weights. My original intuition was that this function was a shortcut to grab the hyperplane weights and that calling it with a dataset again after it had already been trained was a formality (a silly assumption, but based on the ValueError I was getting when not providing a dataset). My code looks similar to this (I know there are more convenient ways to do sample partitioning, this was set up for easy access to training and testing predictions):</div>
<div><br></div><div>dset=normalFeatureDataset()</div><div>clf = SVM(C=1)</div><div>training_set = dset.selectSamples(dset.chunks != 0)</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>clf.train(training_set)<br clear="all">
sens = clf.getSensitivityAnalyzer()</div><div>predictions = clf.predict(dset.samples) # see how it does on training and testing</div><div><br></div><div>weights = sens(dset) # turns out that this actually retrains clf </div>
<div><br></div><div>I was confused to see that the weights were identical no matter which fold was left out. Should I actually be using weights = sens(training_set) or is there some way to get the weights without calling with a dataset?</div>
<div>lots of related questions:</div><div>What would I need to pull out of a linearSVM to reproduce its predictions? Is there an analog of getSensitivityAnalyzer() that would give me the w and b from the SVM's wx+b? What is the difference between w and what is returned by getSensitivityAnalyzer()?</div>
<div><br></div><div>Thanks as always,</div><div>Matt<br>
</div>