I have 40 different images (1, ..40),( each one has 10 repetition " 40x10"),i should use one hot encoding for each image (the 40),
for example image (1) the one hote encoding will be encoding will be:
[ 1 0 0 0 0 0 0.....40(0)],
for images 2 the one hot encoding will be :
[ 0 1 0 0 0 0 0 ...40(0)],
since each image has 10 repetition, for example;
for the 10 images of 1 ( they are for same object but with slight difference among them), should I use same code vector for the 10 repetition!!
Asked
Active
Viewed 96 times
0
navin
- 1
1 Answers
0
You will have to encode both the image and the replication.
For the images you will use
- 1.0.0.0 (39 0s) for image 1
- 0.1.0.0 (38 0s) for image 2 and so on.
You will also need to deal with the replications, probably by one-hot encoding them as well. So, the first image in each set would be 1-0-0-0-0-0-0-0-0-0.
Note that any decent software should be able to do all the encoding for you. I know that SAS and R (the two packages I use) can do this and am pretty positive that SPSS, Stata and so on can as well.
Also note that you haven't said what you are doing with all these images. If you are doing some kind of regression, you will have to deal with the replication issue.
Peter Flom
- 119,535
- 36
- 175
- 383
-
How can i do the one hot encoding for the replications ? I have 10 images (1) and i encode image 1 as : [ 1 0 0 0 0 ....39], then what will be the encode for the second image (1) !!! – navin Dec 30 '19 at 17:12
-
You need two encodings. – Peter Flom Dec 31 '19 at 12:25