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

ValueError: frame_size, frame_overlap not correctly configured #4

Closed
apiszcz opened this issue Dec 8, 2020 · 6 comments
Closed

ValueError: frame_size, frame_overlap not correctly configured #4

apiszcz opened this issue Dec 8, 2020 · 6 comments

Comments

@apiszcz
Copy link

apiszcz commented Dec 8, 2020

I tested 10000 records of random data with frame_size = 50

    138         if not frame_size > 0.0 or not frame_overlap > 0.0 or frame_size < frame_overlap:
    139             raise ValueError(
--> 140                 'frame_size, frame_overlap not correctly configured.')
    141 
    142         # unique time points

ValueError: frame_size, frame_overlap not correctly configured.
@eren-ck
Copy link
Owner

eren-ck commented Dec 8, 2020

Could you please tell me what parameters you used to call the method?

@apiszcz
Copy link
Author

apiszcz commented Dec 8, 2020

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from st_dbscan import ST_DBSCAN
# create a 3d data set, e,x,y
df=pd.DataFrame(np.random.random((100000,3)),columns=['e','x','y'])
df=df.sort_values('e')
df.e = (df.e * 86400)+86400
# normalize the data 
df['x'] = (df['x'] - df['x'].min()) / (df['x'].max() - df['x'].min())
df['y'] = (df['y'] - df['y'].min()) / (df['y'].max() - df['y'].min())
# transform to numpy array
data = df.loc[:, ['e','x','y']].values
%%time
st_dbscan.fit_frame_split(data, frame_size = 50)
---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

<timed eval> in <module>


C:\p\via37\lib\lib\site-packages\st_dbscan\st_dbscan.py in fit_frame_split(self, X, frame_size, frame_overlap)
    138         if not frame_size > 0.0 or not frame_overlap > 0.0 or frame_size < frame_overlap:
    139             raise ValueError(
--> 140                 'frame_size, frame_overlap not correctly configured.')
    141 
    142         # unique time points


ValueError: frame_size, frame_overlap not correctly configured.

@eren-ck
Copy link
Owner

eren-ck commented Dec 9, 2020

Can you tell me which version of st_dbscan you are using? I cannot replicate the error. See the screenshot below.

Screen Shot 2020-12-09 at 09 01 24

@apiszcz
Copy link
Author

apiszcz commented Dec 9, 2020

0.1.5
Can you place %%time on the first line in cell 4, i'm interested to learn how long this takes. Thank you.

@eren-ck
Copy link
Owner

eren-ck commented Dec 10, 2020

See below - hope this helps you.

CPU times: user 8.61 s, sys: 118 ms, total: 8.72 s
Wall time: 8.83 s
<st_dbscan.st_dbscan.ST_DBSCAN at 0x7fdd5944a310>

@eren-ck
Copy link
Owner

eren-ck commented Dec 16, 2020

Does this resolve the issue for you?

@eren-ck eren-ck closed this as completed Dec 21, 2020
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