rough draft complete

This commit is contained in:
2022-02-14 21:49:15 -07:00
parent 31725d6b49
commit 7fe5680a67
8 changed files with 357 additions and 28 deletions

View File

@@ -41,29 +41,24 @@ begin
df.material_index = mats
end
# Remove columns not needed for analysis
# df = df[!, [:mass, :volume, :density, :area, :bb_volume, :Ibar, :material_index]]
# Remove outliers
df = df[df.box.<1e6, :]
df = df[df.mass.<1000, :]
end
# @df df cornerplot(cols(1:7), compact = true)
features = [:mass, :volume, :density, :area, :box, :Ibar, :material_index]
# plot(df.mass)
# histogram(df.mass)
# scatter(df.mass, df.Ibar)
features = [:mass, :volume, :density, :area, :box, :Ibar]
plot(df, dimensions = features, kind = "splom", Layout(title = "Raw Data"))
corner(df)
p1 = plot(df, dimensions = features, kind = "splom", Layout(title = "Raw Data"))
CSV.write("prepped.csv", df)
df.cluster = [1, 3, 2, 1, 2, 1, 1, 3, 1, 3, 2, 3, 1, 1, 2, 2, 1, 3, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 1,] # From matlab kmeans idx
df = dataset(DataFrame, "iris")
features = [:sepal_width, :sepal_length, :petal_width, :petal_length]
plot(df, dimensions = features, color = :species, kind = "splom")
p2 = plot(df, dimensions = features, color = :cluster, kind = "splom", Layout(title = "Clustered Data"))
savefig(p1, "prepped.svg", width = 1000, height = 1000)
savefig(p2, "prepped_clustered.svg", width = 1000, height = 1000)