mirror of
https://gitlab.com/orbital-debris-research/directed-study/report-1.git
synced 2025-08-02 11:31:24 +00:00
rough draft complete
This commit is contained in:
25
prep/prep.jl
25
prep/prep.jl
@@ -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)
|
||||
|
Reference in New Issue
Block a user