Skip to content
Snippets Groups Projects
Commit eb22ab7b authored by Mehmet Celik Yildirim's avatar Mehmet Celik Yildirim
Browse files

lab3 done

parent 3e67bb68
No related branches found
No related tags found
No related merge requests found
......@@ -80,4 +80,25 @@ points(mydata1[,1],prediciton, col="red", cex = 1)
# Part 4
nn$weights
# Part 5
Var2 <- runif(500, 0, 10)
mydata2 <- data.frame(Sin2=sin(Var2), Var2)
formula1 <- Sin2 ~ Var2
nn2 <- neuralnet( formula1 , data = mydata2, hidden = c(10), startweights = winit)
plot(mydata2, cex=2, main = "500 random points reverse", ylim = c(-2,10))
points(mydata2, col = "blue", cex=1)
points(mydata2[,1],predict(nn2,mydata2), col="red", cex = 1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment