diff --git a/NEWS b/NEWS index d2a461ceca5..44a52dad5e4 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ * Features: - ID3 algorithm for decision tree learning [Parijat Mazumdar] - New modes for PCA matrix factorizations: SVD & EVD, in-place or reallocating [Parijat Mazumdar] + - Added kernel multiclass strategy examples in multiclass notebook [Saurabh Mahindre] * Bugfixes: - Fix memory problem in PCA::apply_to_feature_matrix [Parijat Mazumdar] - Fix crash in LeastAngleRegression for the case D greater than N [Parijat Mazumdar] diff --git a/doc/ipython-notebooks/multiclass/multiclass_reduction.ipynb b/doc/ipython-notebooks/multiclass/multiclass_reduction.ipynb index 753d6b61576..232a7ba4c61 100644 --- a/doc/ipython-notebooks/multiclass/multiclass_reduction.ipynb +++ b/doc/ipython-notebooks/multiclass/multiclass_reduction.ipynb @@ -214,7 +214,7 @@ "collapsed": false, "input": [ "def evaluate(strategy, C):\n", - " bin_machine = LibLinear()\n", + " bin_machine = LibLinear(L2R_L2LOSS_SVC)\n", " bin_machine.set_bias_enabled(True)\n", " bin_machine.set_C(C, C)\n", "\n", @@ -471,9 +471,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Expanding on the idea of creating a generic multiclass machine and then assigning a particular multiclass strategy and a base binary machine, one can also use the [KernelMulticlassMachine](http://www.shogun-toolbox.org/doc/en/current/classshogun_1_1CKernelMulticlassMachine.html) with a kernel of choice.\n", + "Expanding on the idea of creating a generic multiclass machine and then assigning a particular multiclass strategy and a base binary machine, one can also use the [KernelMulticlassMachine](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CKernelMulticlassMachine.html) with a kernel of choice.\n", "\n", - "Here we will use a [GaussianKernel](http://www.shogun-toolbox.org/doc/en/3.0.0/classshogun_1_1CGaussianKernel.html) with LibSVM as the classifer.\n", + "Here we will use a [GaussianKernel](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CGaussianKernel.html) with [LibSVM](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CLibSVM.html) as the classifer.\n", "All we have to do is define a new helper evaluate function with the features defined as in the above examples." ] }, @@ -523,9 +523,9 @@ "source": [ "So we have seen that we can classify multiclass samples using a base binary machine. If we dwell on this a bit more, we can easily spot the intuition behind this.\n", "\n", - "The `MulticlassOneVsRestStrategy` classifies one class against the rest of the classes. This is done for each and every class by training a separate classifier for it.So we will have total $k$ classifiers where $k$ is the number of classes.\n", + "The [MulticlassOneVsRestStrategy](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CMulticlassOneVsOneStrategy.html) classifies one class against the rest of the classes. This is done for each and every class by training a separate classifier for it.So we will have total $k$ classifiers where $k$ is the number of classes.\n", "\n", - "Just to see this in action lets create some data using the gaussian mixture model class ([GMM](http://www.shogun-toolbox.org/doc/en/3.0.0/classshogun_1_1CGMM.html)) from which we sample the data points.Four different classes are created and plotted." + "Just to see this in action lets create some data using the gaussian mixture model class ([GMM](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CGMM.html)) from which we sample the data points.Four different classes are created and plotted." ] }, { @@ -613,7 +613,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The [KernelMulticlassMachine](http://www.shogun-toolbox.org/doc/en/current/classshogun_1_1CKernelMulticlassMachine.html) is used with LibSVM as the classifer just as in the above example.\n", + "The [KernelMulticlassMachine](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CKernelMulticlassMachine.html) is used with [LibSVM](http://www.shogun-toolbox.org/doc/en/latest/classshogun_1_1CLibSVM.html) as the classifer just as in the above example.\n", "\n", "Now we have four different classes, so as explained above we will have four classifiers which in shogun terms are submachines.\n", "\n", @@ -678,7 +678,7 @@ "metadata": {}, "source": [ "The `MulticlassOneVsOneStrategy` is a bit different with more number of machines.\n", - "Since it trains a classifer for each pair of classes, we will have a total of $\\frac{k*(k-1)}{2}$ submachines for $k$ classes.Binary classification then takes place on each pair.\n", + "Since it trains a classifer for each pair of classes, we will have a total of $\\frac{k(k-1)}{2}$ submachines for $k$ classes. Binary classification then takes place on each pair.\n", "Let's visualize this in a plot." ] }, @@ -688,7 +688,7 @@ "input": [ "C=2.0\n", " \n", - "bin_machine = LibLinear()\n", + "bin_machine = LibLinear(L2R_L2LOSS_SVC)\n", "bin_machine.set_bias_enabled(True)\n", "bin_machine.set_C(C, C)\n", "\n",