[問題] 關於類神經網絡模型選擇
[問題類型]:
程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
[軟體熟悉度]:
新手(沒寫過程式,R 是我的第一次)
[問題敘述]:
我想用train這個指令進行模型選擇 可是跑出一大堆警告
並且所有出來的結果都是遺失值
[程式範例]:
library(neuralnet)
library(nnet)
library(lattice)
library(ggplot2)
library(caret)
setwd("D:\\")
Stock<-read.csv("real.csv",header=T)
N<-nrow(Stock)
set.seed(123)
ind1<-sample(N,round(N*0.7))
Train<-Stock[ind1,-1]
Test<-Stock[-ind1,-1]
st.net<-stock~usd.z+coffee.z+rice.z+oil.z+wheat.z+djopen.z+cu.z+corn.z
model <- train(formula =st.net,data = Train,method="neuralnet", tuneGrid
=data.frame(layer1=2:4,layer2=0, layer3=0),learningrate = 0.1, threshold =
0.1,stepmax =10000)
https://imgur.com/rm3gifL

[關鍵字]:
選擇性,也許未來有用
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.217.180.37
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1506673183.A.BC4.html
→
09/29 16:25,
8年前
, 1F
09/29 16:25, 1F
推
09/29 16:27,
8年前
, 2F
09/29 16:27, 2F
而後出現以下警告標語 所有組合都是@@ 不大清楚要怎修改
model fit failed for Resample01: layer1=4, layer2=4, layer3=3 Error in
varify.variables(data, formula, startweights, learningrate.limit, :
'pairlist' object cannot be coerced to type 'integer'
※ 編輯: asdfrtg (49.217.180.37), 09/29/2017 17:28:51
→
09/29 19:09,
8年前
, 3F
09/29 19:09, 3F
→
09/29 19:10,
8年前
, 4F
09/29 19:10, 4F
推 andrew43: 一次neuralnet()。
09/29 19:10
我試過用neuralent()是可以跑
stock是數值型資料
andew43大大 想請問是在哪裡出了問題
→
09/29 22:01,
8年前
, 5F
09/29 22:01, 5F
→
09/29 22:02,
8年前
, 6F
09/29 22:02, 6F
那跟neuralnet哪一種方法較好@@
※ 編輯: asdfrtg (49.217.180.37), 09/29/2017 23:44:05
→
09/30 00:21,
8年前
, 7F
09/30 00:21, 7F
→
09/30 00:36,
8年前
, 8F
09/30 00:36, 8F
※ 編輯: asdfrtg (101.8.247.163), 09/30/2017 21:56:31
試過用把st.net的內容打在formula後面結果仍出現一樣的警告訊息 請問是資料型態錯了嗎@@?
※ 編輯: asdfrtg (101.8.247.163), 09/30/2017 22:06:17
推
09/30 23:56,
8年前
, 9F
09/30 23:56, 9F
→
09/30 23:56,
8年前
, 10F
09/30 23:56, 10F
→
10/01 01:04,
8年前
, 11F
10/01 01:04, 11F
→
10/01 01:05,
8年前
, 12F
10/01 01:05, 12F
※ 編輯: asdfrtg (101.8.247.163), 10/01/2017 12:25:39
https://drive.google.com/open?id=0B8WYq5Sw-r-XNHNub3FyeUJWYWc
變數後面.z是標準化之後 我用標準化之後的資料下去跑仍會顯示警告
※ 編輯: asdfrtg (101.8.247.163), 10/01/2017 13:50:27
推
10/01 22:46,
8年前
, 13F
10/01 22:46, 13F
→
10/01 22:46,
8年前
, 14F
10/01 22:46, 14F
討論串 (同標題文章)
R_Language 近期熱門文章
PTT數位生活區 即時熱門文章
-7
9