Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot of model get clipped #31

Open
HaoLi111 opened this issue Jun 9, 2019 · 1 comment
Open

plot of model get clipped #31

HaoLi111 opened this issue Jun 9, 2019 · 1 comment

Comments

@HaoLi111
Copy link

HaoLi111 commented Jun 9, 2019

image

I tried to adjust the boundary, (including letting the plot size to be 'fixed'), but some words are still clipped. Could anyone adjust the plotting function to make the ** default ** boundary larger?

@mnwright
Copy link
Member

I haven't looked into the plot function yet since I'm maintainer of the package. It's not easy to customize and definitely needs some refactoring.

Some fine tuning is possible with the arrow.length argument:

library(neuralnet)
nn <- neuralnet(Species ~ ., hidden = c(4, 4, 3), data = iris)

plot(nn, rep = 1) # Clipped
plot(nn, rep = 1, arrow.length = 0.15) # Better

You could also use x.entry and x.out to adjust the positions of the input and output layers. The defaults are:

x.entry <- 0.5 - (arrow.length/2) * length(weights)
x.out <- 0.5 + (arrow.length/2) * length(weights)

where length(weights) is the number of hidden layers plus one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants