Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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: 204
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 204
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