using TyMachineLearning
using CSV
using DataFrames
using QuantEcon
using TyPlot
file = joinpath(pkgdir(TyMachineLearning), "data/Classification/iris.csv")
iris = CSV.read(file, DataFrame; header=false)
#划分数据集
X = iris[:, 1:4]
rename!(iris, [:Column5 => :SH])
X1, y1, convs = convent_columns(iris, "SH")
fgdata_x1 = Matrix(X1.values)
fgdata_y1 = Array(y1.values)
scatter(X[:, 3], X[:, 4]; c=fgdata_y1, filled="true")
xlabel("PL")
ylabel("PW")
title("Iris Data")
08-13
719
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)