Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 hot vector with dataset #17

Open
CraftMiner1 opened this issue Apr 16, 2021 · 1 comment
Open

4 hot vector with dataset #17

CraftMiner1 opened this issue Apr 16, 2021 · 1 comment

Comments

@CraftMiner1
Copy link

Dear @dnguyengithub,

Could you please clarify as to how to change the 4 hot vectors so that the pre-processing works for another dataset?
For example if I were to use a dataset with:
LAT_MIN = 25.00, LAT_MAX = 30.00 ,LON_MIN = -89.00, LON_MAX = -84.00

From what I understood the values for the LAT_BINS and LON_BINS would be as follows:
LAT_BINS = 500; LON_BINS = 500;

What about the SOG_BINS and the COG_BINS? Do they stay 30 and 72?
SOG_BINS = 30; COG_BINS = 72

I ran the codes in that order:
csv2pkl.py -> dataset_preprocessing.py ->calculate_AIS_mean.py

calculate_AIS_mean is yeilding the following error:
Traceback (most recent call last):
File "c:/Users/User/Desktop/geotracknet/data/calculate_AIS_mean.py", line 102, in
current_sparse_matrix,, = sparse_AIS_to_dense(tmp,0,0)
File "c:/Users/User/Desktop/geotracknet/data/calculate_AIS_mean.py", line 68, in sparse_AIS_to_dense
dense_msgs.append(create_dense_vect(msg,
File "c:/Users/User/Desktop/geotracknet/data/calculate_AIS_mean.py", line 58, in create_dense_vect
dense_vect[int(lat*lat_bins)] = 1.0
IndexError: index 14709 is out of bounds for axis 0 with size 1102

Looking forward to hearing from you
Thank you.

@yche-sflscientific
Copy link

Probably too late, but I ran into the same issue. I figure it's because the LAT/LON are not properly normalized in this case. So current code in dataset_preprocessing.py the normalizing part is not doing much as it did not modify what's inside the Data dictionary, and lat*lat_bins assume a lat normalized lat value. I made the change and got passed the calculate_AIS_mean.py, but still struggling with the mismatched 4-hot dimensions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants