1实验报告支持向量机实验原理:支持向量机的原理和实现技术。。实验题目:对鸢尾花数据利用 SVM 技术进行分类预测。实验要求:把鸢尾花数据分成训练集和测试集,然后针对样本 SVM 预测分类。实验题目--分析报告:data(iris)>rm(list=ls())>gc()used(Mb)gctrigger (Mb)maxused (Mb)Ncells25214313.560839432.5410515 22.0Vcells5284864.1838860864.01606736 12.3> library(MASS)> data(iris)>library(e1071)>summary(iris)Sepal.LengthSepal.WidthPetal.LengthPetal.WidthMin.:4.300Min.:2.000Min.:1.000Min.:0.1001stQu. :5.1001stQu.:2.8001stQu.:1.6001stQu.:0.300Median:5.800Median:3.000Median:4.350Median:1.300Mean:5.843Mean:3.057Mean:3.758Mean:1.1993rdQu.:6.4003rdQu.:3.3003rdQu.:5.1003rdQu.:1.800Max.:7.900Max.:4.400Max.:6.900Max.:2.500Speciessetosa:50versicolor:50virginica:50仅选择 Petal.Length 和 Petal.Width 这两个特征时>model<-svm(Petal.Length~Petal.Width,data=iris)>print(model)2Call:svm(formula=Petal.Length~Petal.Width,data=iris)Parameters:SVM-Type:eps-regressionSVM-Kernel:radialcost:1gamma:1epsilon:0.1NumberofSupportVectors:80>summary(model)Call:svm(formula=Petal.Length~Petal.Width,data=iris)Parameters:SVM-Type:eps-regressionSVM-Kernel:radialcost:1gamma:1epsilon:0.1NumberofSupportVectors:80312341.4238371.4238371.4238371.42383791011121.4238371.4569131.4238371.423837171819201.6164691.4770961.4770961.477096252627281.4238371.4238371.6164691.423837333435361.4569131.4238371.4238371.423837414243441.4770961.4770961.4238372.115572495051521.4238371.4238374.4971394.675747575859604.8369863.4771784.2931204.497139656667684.2931204.4971394.6757473.47717856781.4238371.6164691.4770961.423837131415161.4569131.4569131.4238371.616469212223241.4238371.6164691.4238371.834129293031321.4238371.4238371.4238371.616469373839401.4238371.4569131.4238371.423837454647481.6164691.4770961.4238371.423837535455564.6757474.2931204.6757474.293120616263643.4771784.6757473.4771784.497139697071724.6757473.7845145.1343674.293120>svm(formula=Petal.Length~Petal.Width,data=iris)Call:svm(formula=Petal.Length~Petal.Width,data=iris)...