IoTDevIDv2 icon indicating copy to clipboard operation
IoTDevIDv2 copied to clipboard

02.3: Issue with variable value and creation of ./100 folder

Open kmsazidhasan opened this issue 1 year ago • 6 comments

Hi!

I ran across an error in 02.3, where I can't find the value of dataset, step and mixed variable. seems like the value is not predefined in this notebook. however, I noticed those values were given at the later portion of that notebook. but using those information, I can't generate the ./100 folder.

Capture

Your help in this regard will be highly appreciated!

kmsazidhasan avatar May 01 '24 12:05 kmsazidhasan

I am very sorry about this, the line with the error is redundant. please comment it out and run it again. i fixed this bug on github. thanks for the warning.

#dataset="./Aalto/False/"#dataset[2:-1]+"_"+str(step)

kahramankostas avatar May 01 '24 14:05 kahramankostas

Thanks for your prompt response! I did that already. However I wasn't sure about the creation of './100' folder and its content. When I try running this, it throughs me an error saying, "No such directory". Can you please mention from where that segment is generated? image

It seems like, the value of dataset, step and mixed is not predefined here.

kmsazidhasan avatar May 01 '24 14:05 kmsazidhasan

in the new version I added a function that creates this folder. you can add this:

def folder(f_name): #this function creates a folder.
    try:
        if not os.path.exists(f_name):
            os.makedirs(f_name)
    except OSError:
        print ("The folder could not be created!")
folder("./100/")

kahramankostas avatar May 01 '24 14:05 kahramankostas

Just to mention, you need to comment out that output_csv line, otherwise, it will throw an error everytime

image

kmsazidhasan avatar May 01 '24 14:05 kmsazidhasan

I would like to point out another issue that I am facing, running this very code should create 100 csv files in "./100" folder, however, in my case, I'm getting 50 instead. image Can you please suggest what could be the issue here?

kmsazidhasan avatar May 01 '24 14:05 kmsazidhasan

This number is related to the size of the “features” (number of generations). If your generation number is 50, it will work up to 50.

kahramankostas avatar May 01 '24 15:05 kahramankostas