Skip to content

Commit

Permalink
fixed background image issues
Browse files Browse the repository at this point in the history
  • Loading branch information
benhamner committed Jan 25, 2015
1 parent 6806bf3 commit 701b5b0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Compose
DataFrames
Devectorize
Distributions
Expand Down
1 change: 1 addition & 0 deletions src/MachineLearning.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module MachineLearning
using
Compose,
DataFrames,
Devectorize,
Distributions,
Expand Down
16 changes: 8 additions & 8 deletions src/importance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ function Gadfly.plot(results::ImportanceResults)
importance = DataFrame(Feature=results.names, Importance=results.importances, Useful=[imp>0.0 ? "Yes":"No" for imp=results.importances])
importance = sort(importance, cols=[:Feature])
order = sortperm(importance[:Importance], rev=false)
plot(importance,
x="Importance",
y="Feature",
color="Useful",
Geom.bar(orientation=:horizontal),
Scale.y_discrete(order=order),
Guide.title(@sprintf("Best Score: %0.4f", results.best_score)),
Theme(panel_fill=color("white")))
p = plot(importance,
x="Importance",
y="Feature",
color="Useful",
Geom.bar(orientation=:horizontal),
Scale.y_discrete(order=order),
Guide.title(@sprintf("Best Score: %0.4f", results.best_score)))
compose(render(p), compose(context(), rectangle(), fill("white")))
end
11 changes: 6 additions & 5 deletions src/partial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ end
function Gadfly.plot(results::PartialFeatureResults)
df = DataFrame(Feature=results.values, Probability=results.responses)

plot(df,
x="Feature",
y="Probability",
Geom.line,
Guide.title(results.name))
p = plot(df,
x="Feature",
y="Value",
Geom.line,
Guide.title(results.name))
compose(render(p), compose(context(), rectangle(), fill("white")))
end
12 changes: 6 additions & 6 deletions src/sensitivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ function Gadfly.plot(results::SensitivityResults)
rename!(data, :value, :Sensitivity)
sort!(data, cols=:Feature)
order = sortperm(aggregate(data, :Feature, median)[:Sensitivity_median], rev=true)
plot(data,
x="Feature",
y="Sensitivity",
Geom.boxplot(),
Scale.x_discrete(order=order),
Theme(panel_fill=color("white")))
p = plot(data,
x="Feature",
y="Sensitivity",
Geom.boxplot(),
Scale.x_discrete(order=order))
compose(render(p), compose(context(), rectangle(), fill("white")))
end

0 comments on commit 701b5b0

Please sign in to comment.