Skip to content

Commit

Permalink
default method for plotnet, all other methods are now shortened to on…
Browse files Browse the repository at this point in the history
…ly relevant differences
  • Loading branch information
fawda123 committed Aug 26, 2015
1 parent 679bdbd commit 758dd02
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 501 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: NeuralNetTools
Type: Package
Title: Visualization and Analysis Tools for Neural Networks
Version: 1.3.9.9000
Date: 2015-08-01
Version: 1.3.10.9000
Date: 2015-08-26
Author: Marcus W. Beck [aut, cre]
Maintainer: Marcus W. Beck <[email protected]>
Description: Visualization and analysis tools to aid in the interpretation of
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ S3method(olden,nn)
S3method(olden,nnet)
S3method(olden,numeric)
S3method(olden,train)
S3method(plotnet,default)
S3method(plotnet,mlp)
S3method(plotnet,nn)
S3method(plotnet,nnet)
Expand Down
531 changes: 77 additions & 454 deletions R/NeuralNetTools_plot.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion R/NeuralNetTools_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ layer_lines <- function(mod_in, h_layer, layer1 = 1, layer2 = 2, out_layer = FAL
#' @param mod_in neural network model object
#' @param nid logical value indicating if neural interpretation diagram is plotted, default \code{TRUE}
#' @param rel_rsc numeric value indicating maximum to rescale weights for plotting in a neural interpretation diagram. Default is \code{NULL} for no rescaling.
#' @param all_out chr string indicating names of input variables for which connections are plotted, default all
#' @param all_out chr string indicating names of response variables for which connections are plotted, default all
#' @param pos_col chr string indicating color of positive connection weights, default \code{'black'}
#' @param neg_col chr string indicating color of negative connection weights, default \code{'grey'}
#' @param struct numeric vector for network structure
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ install.packages('NeuralNetTools')

Please cite this package as follows:

*Beck MW. 2015. NeuralNetTools: Visualization and Analysis Tools for Neural Networks. Version 1.3.9. http://cran.r-project.org/web/packages/NeuralNetTools/*
*Beck MW. 2015. NeuralNetTools: Visualization and Analysis Tools for Neural Networks. Version 1.3.10. http://cran.r-project.org/web/packages/NeuralNetTools/*

### Bug reports

Expand Down
2 changes: 1 addition & 1 deletion README.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h4><em>Marcus W. Beck, <a href="mailto:[email protected]">[email protected]
<div id="citation" class="section level3">
<h3>Citation</h3>
<p>Please cite this package as follows:</p>
<p><em>Beck MW. 2015. NeuralNetTools: Visualization and Analysis Tools for Neural Networks. Version 1.3.9. <a href="http://cran.r-project.org/web/packages/NeuralNetTools/" class="uri">http://cran.r-project.org/web/packages/NeuralNetTools/</a></em></p>
<p><em>Beck MW. 2015. NeuralNetTools: Visualization and Analysis Tools for Neural Networks. Version 1.3.10. <a href="http://cran.r-project.org/web/packages/NeuralNetTools/" class="uri">http://cran.r-project.org/web/packages/NeuralNetTools/</a></em></p>
</div>
<div id="bug-reports" class="section level3">
<h3>Bug reports</h3>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ install.packages('NeuralNetTools')

Please cite this package as follows:

*Beck MW. 2015. NeuralNetTools: Visualization and Analysis Tools for Neural Networks. Version 1.3.9. http://cran.r-project.org/web/packages/NeuralNetTools/*
*Beck MW. 2015. NeuralNetTools: Visualization and Analysis Tools for Neural Networks. Version 1.3.10. http://cran.r-project.org/web/packages/NeuralNetTools/*

### Bug reports

Expand Down
Binary file modified README_files/figure-html/unnamed-chunk-6-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/bias_lines.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bias_lines(bias_x, bias_y, mod_in, nid, rel_rsc, all_out, pos_col, neg_col,

\item{rel_rsc}{numeric value indicating maximum to rescale weights for plotting in a neural interpretation diagram. Default is \code{NULL} for no rescaling.}

\item{all_out}{chr string indicating names of input variables for which connections are plotted, default all}
\item{all_out}{chr string indicating names of response variables for which connections are plotted, default all}

\item{pos_col}{chr string indicating color of positive connection weights, default \code{'black'}}

Expand Down
63 changes: 23 additions & 40 deletions man/plotnet.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
% Please edit documentation in R/NeuralNetTools_plot.R
\name{plotnet}
\alias{plotnet}
\alias{plotnet.default}
\alias{plotnet.mlp}
\alias{plotnet.nn}
\alias{plotnet.nnet}
Expand All @@ -11,46 +12,36 @@
\usage{
plotnet(mod_in, ...)

\method{plotnet}{nnet}(mod_in, nid = TRUE, all_out = TRUE, all_in = TRUE,
bias = TRUE, wts_only = FALSE, rel_rsc = 5, circle_cex = 5,
node_labs = TRUE, var_labs = TRUE, x_lab = NULL, y_lab = NULL,
line_stag = NULL, cex_val = 1, alpha_val = 1,
circle_col = "lightblue", pos_col = "black", neg_col = "grey",
bord_col = "lightblue", max_sp = FALSE, ...)

\method{plotnet}{numeric}(mod_in, struct, nid = TRUE, all_out = TRUE,
all_in = TRUE, bias = TRUE, wts_only = FALSE, rel_rsc = 5,
circle_cex = 5, node_labs = TRUE, var_labs = TRUE, x_lab = NULL,
y_lab = NULL, line_stag = NULL, cex_val = 1, alpha_val = 1,
circle_col = "lightblue", pos_col = "black", neg_col = "grey",
bord_col = "lightblue", max_sp = FALSE, ...)

\method{plotnet}{mlp}(mod_in, nid = TRUE, all_out = TRUE, all_in = TRUE,
wts_only = FALSE, rel_rsc = 5, circle_cex = 5, node_labs = TRUE,
var_labs = TRUE, x_lab = NULL, y_lab = NULL, line_stag = NULL,
\method{plotnet}{default}(mod_in, x_names, y_names, struct = NULL,
nid = TRUE, all_out = TRUE, all_in = TRUE, bias = TRUE, rel_rsc = 5,
circle_cex = 5, node_labs = TRUE, var_labs = TRUE, line_stag = NULL,
cex_val = 1, alpha_val = 1, circle_col = "lightblue",
pos_col = "black", neg_col = "grey", bord_col = "lightblue",
prune_col = NULL, prune_lty = "dashed", max_sp = FALSE, ...)

\method{plotnet}{nn}(mod_in, nid = TRUE, all_out = TRUE, all_in = TRUE,
bias = TRUE, wts_only = FALSE, rel_rsc = 5, circle_cex = 5,
node_labs = TRUE, var_labs = TRUE, x_lab = NULL, y_lab = NULL,
line_stag = NULL, cex_val = 1, alpha_val = 1,
circle_col = "lightblue", pos_col = "black", neg_col = "grey",
bord_col = "lightblue", max_sp = FALSE, ...)

\method{plotnet}{train}(mod_in, nid = TRUE, all_out = TRUE, all_in = TRUE,
bias = TRUE, wts_only = FALSE, rel_rsc = 5, circle_cex = 5,
node_labs = TRUE, var_labs = TRUE, x_lab = NULL, y_lab = NULL,
line_stag = NULL, cex_val = 1, alpha_val = 1,
circle_col = "lightblue", pos_col = "black", neg_col = "grey",
bord_col = "lightblue", max_sp = FALSE, ...)
max_sp = FALSE, prune_col = NULL, prune_lty = "dashed", ...)

\method{plotnet}{nnet}(mod_in, x_names = NULL, y_names = NULL, ...)

\method{plotnet}{numeric}(mod_in, struct, x_names = NULL, y_names = NULL,
...)

\method{plotnet}{mlp}(mod_in, x_names = NULL, y_names = NULL,
prune_col = NULL, prune_lty = "dashed", ...)

\method{plotnet}{nn}(mod_in, x_names = NULL, y_names = NULL, ...)

\method{plotnet}{train}(mod_in, x_names = NULL, y_names = NULL, ...)
}
\arguments{
\item{mod_in}{neural network object or numeric vector of weights}

\item{...}{additional arguments passed to plot}

\item{x_names}{chr string indicating names for input variables, default from model object}

\item{y_names}{chr string indicating names for output variables, default from model object}

\item{struct}{numeric vector equal in length to the number of layers in the network. Each number indicates the number of nodes in each layer starting with the input and ending with the output. An arbitrary number of hidden layers can be included.}

\item{nid}{logical value indicating if neural interpretation diagram is plotted, default \code{TRUE}}

\item{all_out}{chr string indicating names of response variables for which connections are plotted, default all}
Expand All @@ -59,8 +50,6 @@ plotnet(mod_in, ...)

\item{bias}{logical value indicating if bias nodes and connections are plotted, default \code{TRUE}}

\item{wts_only}{logical value indicating if connections weights are returned rather than a plot, default \code{FALSE}}

\item{rel_rsc}{numeric value indicating maximum width of connection lines, default 5}

\item{circle_cex}{numeric value indicating size of nodes, default 5}
Expand All @@ -69,10 +58,6 @@ plotnet(mod_in, ...)

\item{var_labs}{logical value indicating if variable names are plotted next to nodes, default \code{TRUE}}

\item{x_lab}{chr string indicating names for input variables, default from model object}

\item{y_lab}{chr string indicating names for output variables, default from model object}

\item{line_stag}{numeric value that specifies distance of connection weights from nodes}

\item{cex_val}{numeric value indicating size of text labels, default 1}
Expand All @@ -89,8 +74,6 @@ plotnet(mod_in, ...)

\item{max_sp}{logical value indicating if space between nodes in each layer is maximized, default \code{FALSE}}

\item{struct}{numeric vector equal in length to the number of layers in the network. Each number indicates the number of nodes in each layer starting with the input and ending with the output. An arbitrary number of hidden layers can be included.}

\item{prune_col}{chr string indicating color of pruned connections, otherwise not shown}

\item{prune_lty}{line type for pruned connections, passed to \code{\link[graphics]{segments}}}
Expand Down

0 comments on commit 758dd02

Please sign in to comment.