Question: Hello! Could someone help me out with this 'Julia' coding question? https://julialang.org/ Support Vector Machine. You are working on building a low-cost embedded device for
Hello! Could someone help me out with this 'Julia' coding question? https://julialang.org/


Support Vector Machine. You are working on building a low-cost embedded device for the retail stores that can automatically identify a fruit category. It has two simple sensors -- one to estimate the height and another to estimate the width of the fruit. You are working with a machine learning colleague to build a classification model that can learn to discriminat between apples and pears based on thes two features. Your machin learning colleague is working with the training data below and has plotted them as below with green points representing apples and blue representing pears. Since the embedded device has very limited computation power, you want to learn a simple linear function such that all the apples are above it and all the pears are below it. A quick visual inspection has convinced you that you can't separate the two sets of points based on a horizontal or vertical lin . Your machine learning colleague insists that you should find a line with the maximum margin (corresponding to her intuition of an SVM classifier). In other words, you nd to find a lin that maximis s th margin such that all points corresponding to apples ar at least above the lin and all points corresponding to pears are below the line (se the figure below). Formulate this problem as a linear programme and solve it using Julia/JuMP for the dataset in the table below. Carefully explain all the decision variables, objective function and the constraints involved. Now let's say that you want to learn a quadratic function ax2+bx+c that is a maximum margin separator for the two sets of points. In other words, you want to find a parabola that maximises such that for all apples, yax2+bx+c+ and for all pears, yax2+bx+c. Can you still formulate this as a linear programme? If so, how? \begin{tabular}{|c|c|c|c|} \hline Example & Height & Width & Class \\ \hline 1 & 60 & 62 & Apple \\ \hline 2 & 70 & 53 & Pear \\ \hline 3 & 55 & 50 & Apple \\ \hline 4 & 76 & 40 & Pear \\ \hline 5 & 68 & 45 & Pear \\ \hline 6 & 65 & 68 & Apple \\ \hline 7 & 63 & 45 & Pear \\ \hline 8 & 55 & 56 & Apple \\ \hline 9 & 68 & 65 & Apple \\ \hline 10 & 60 & 58 & Apple \\ \hline \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
