Skip to content

Commit

Permalink
default method for olden, y-axis labels for garson and olden now iden…
Browse files Browse the repository at this point in the history
…tical
  • Loading branch information
fawda123 committed Sep 29, 2015
1 parent b973136 commit e84218d
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 354 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NeuralNetTools
Type: Package
Title: Visualization and Analysis Tools for Neural Networks
Version: 1.3.15.9000
Version: 1.3.16.9000
Date: 2015-09-29
Author: Marcus W. Beck [aut, cre]
Maintainer: Marcus W. Beck <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ S3method(neuralweights,mlp)
S3method(neuralweights,nn)
S3method(neuralweights,nnet)
S3method(neuralweights,numeric)
S3method(olden,default)
S3method(olden,mlp)
S3method(olden,nn)
S3method(olden,nnet)
Expand Down
8 changes: 4 additions & 4 deletions R/NeuralNetTools_gar.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ garson.default <- function(mod_in, x_names, y_names, bar_plot = TRUE, x_lab = NU
if(!is.null(y_lab)){
y_names <- y_lab
} else {
y_names <- 'Relative importance'
y_names <- 'Importance'
}

# the default method works with weight list
Expand Down Expand Up @@ -160,11 +160,11 @@ garson.default <- function(mod_in, x_names, y_names, bar_plot = TRUE, x_lab = NU
to_plo$x_names <- factor(x_names[order(rel_imp)], levels = x_names[order(rel_imp)])
out_plo <- ggplot2::ggplot(to_plo, aes(x = x_names, y = rel_imp, fill = rel_imp,
colour = rel_imp)) +
geom_bar(stat = 'identity') +
geom_bar(stat = 'identity', position = 'identity') +
scale_x_discrete(element_blank()) +
scale_y_continuous(y_names) +
theme(legend.title = element_blank()) +
theme_bw()
theme_bw() +
theme(legend.position = 'none')

return(out_plo)

Expand Down
Loading

0 comments on commit e84218d

Please sign in to comment.