Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 485 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
deepsignal r run time error #479356
03/22/20 21:49
03/22/20 21:49
Joined: Mar 2020
Posts: 19
London
H
hola123 Offline OP
Newbie
hola123  Offline OP
Newbie
H

Joined: Mar 2020
Posts: 19
London
Hi,

I am trying to follow one of the machine learning lessons. I have copied the code and downloaded R.

When I run the TestOOS function I get the error message below. The code runs and says deep nn has been trained. Then it bugs out with the error message shown below. Has anyone else come across this problem? The data I'm using was created by zorro.


Error: `data` and `reference` should be factors with the same levels.
4.
stop("`data` and `reference` should be factors with the same levels.",
call. = FALSE)
3.
confusionMatrix.default(Y.pr, Y.ob)
2.
confusionMatrix(Y.pr, Y.ob) at DeepSignal.r#49
1.
TestOOS()

Thanks for any help

Re: deepsignal r run time error [Re: hola123] #479509
04/03/20 10:23
04/03/20 10:23
Joined: Dec 2014
Posts: 206
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 206
Germany
I don't know, but here is a trick I often use when I'm debugging something in R:

put this line on top of the R script:

Code
debugpath <- paste0("D:/Zorro/Strategy/RWDLexample.rda")
//the *.rda file is a complete memory snapshot. Put it anywhere you like.

Code
neural.train <- function(model, XY) {
  save.image(debugpath)
  #load(debugpath)
  ....


(just add these two lines)
Beware: every neural.train function call will save a complete memory snapshot

Now when I'm debugging, I first clear the R session in RStudio, then source the R file and then execute

load(debugpath)

Then I can check line by line what's happening.

Re: deepsignal r run time error [Re: hola123] #479533
04/04/20 18:17
04/04/20 18:17
Joined: Mar 2020
Posts: 19
London
H
hola123 Offline OP
Newbie
hola123  Offline OP
Newbie
H

Joined: Mar 2020
Posts: 19
London
Thanks for the tip, will give this ago and see what happens


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1