Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (sleakz, AndrewAMD), 684 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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