from sklearn linear_model import logisticregression from sklearn svm import linearsvc xy mglearn datasets make_forge(figaxes plt subplots( figsize=( )for modelax in zip([linearsvc()logisticregression()]axes)clf model fit(xymglearn plots plot_ d_separator(clfxfill=falseeps= ax=axalpha mglearn discrete_scatter( [: ] [: ]yax=axax set_title("{}format(clf __class__ __name__)ax set_xlabel("feature "ax set_ylabel("feature "axes[ legend(figure - decision boundaries of linear svm and logistic regression on the forge dataset with the default parameters in this figurewe have the first feature of the forge dataset on the -axis and the second feature on the -axisas before we display the decision boundaries found by linearsvc and logisticregression respectively as straight linesseparating the area classified as class on the top from the area classified as class on the bottom in other wordsany new data point that lies above the black line will be classified as class by the respective classifierwhile any point that lies below the black line will be classified as class the two models come up with similar decision boundaries note that both misclassify two of the points by defaultboth models apply an regularizationin the same way that ridge does for regression for logisticregression and linearsvc the trade-off parameter that determines the strength of the regularization is called cand higher values of correspond to less supervised machine learning algorithms