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

Bouncing point #29

Open
5urabhi opened this issue Apr 10, 2023 · 2 comments
Open

Bouncing point #29

5urabhi opened this issue Apr 10, 2023 · 2 comments
Labels
question Further information is requested

Comments

@5urabhi
Copy link

5urabhi commented Apr 10, 2023

Hey i wanted to know how does you predict the bouncing point of the ball so correctly. I was trying to understand your code to implement something similar to your bounce detection. I understand the part where you are saving x, y and v data in csv format and you are using pretrained model to detect the bounce but i am unable to understand how does this part of the code works:
Xs = test_df[['lagX_20', 'lagX_19', 'lagX_18', 'lagX_17', 'lagX_16',
'lagX_15', 'lagX_14', 'lagX_13', 'lagX_12', 'lagX_11', 'lagX_10',
'lagX_9', 'lagX_8', 'lagX_7', 'lagX_6', 'lagX_5', 'lagX_4', 'lagX_3',
'lagX_2', 'lagX_1']]
Xs = from_2d_array_to_nested(Xs.to_numpy())
can you please explain in detail.

@shukkkur
Copy link
Member

shukkkur commented Apr 12, 2023

@shukkkur shukkkur self-assigned this Apr 12, 2023
@shukkkur shukkkur added the question Further information is requested label Apr 12, 2023
@5urabhi
Copy link
Author

5urabhi commented Apr 21, 2023

Hey I tried to run your code with bounce=1 and minimap =1
getting error:
File "/content/drive/MyDrive/Tennis-T-D/predict_video.py", line 342, in
predcted = clf.predict(X)
File "/usr/local/lib/python3.9/dist-packages/sklearn/pipeline.py", line 480, in predict
Xt = transform.transform(Xt)
File "/usr/local/lib/python3.9/dist-packages/sktime/transformations/base.py", line 533, in transform
X_inner, y_inner, metadata = self._check_X_y(X=X, y=y, return_metadata=True)
File "/usr/local/lib/python3.9/dist-packages/sktime/transformations/base.py", line 943, in _check_X_y
raise TypeError("X " + msg_invalid_input)
TypeError: X must be in an sktime compatible format, of scitype Series, Panel or Hierarchical, for instance a pandas.DataFrame with sktime compatible time indices, or with MultiIndex and last(-1) level an sktime compatible time index. Allowed compatible mtype format specifications are: ['pd.Series', 'pd.DataFrame', 'np.ndarray', 'nested_univ', 'numpy3D', 'pd-multiindex', 'df-list', 'pd_multiindex_hier'] . See the data format tutorial examples/AA_datatypes_and_datasets.ipynb. If you think the data is already in an sktime supported input format, run sktime.datatypes.check_raise(data, mtype) to diagnose the error, where mtype is the string of the type specification you want. Error message for checked mtypes, in format [mtype: message], as follows: [pd.DataFrame: X must have unique column indices, but found Int64Index([0, 0, 0], dtype='int64')] [pd.Series: X must be a pandas.Series, found <class 'pandas.core.frame.DataFrame'>] [np.ndarray: X must be a numpy.ndarray, found <class 'pandas.core.frame.DataFrame'>] [xr.DataArray: X must be a xarray.DataArray, found <class 'pandas.core.frame.DataFrame'>] [dask_series: X must be a dask DataFrame, found <class 'pandas.core.frame.DataFrame'>] [df-list: X must be list of pd.DataFrame, found <class 'pandas.core.frame.DataFrame'>] [numpy3D: X must be a numpy.ndarray, found <class 'pandas.core.frame.DataFrame'>] [pd-multiindex: X must have a MultiIndex, found <class 'pandas.core.indexes.range.RangeIndex'>] [nested_univ: X must have unique column indices, but found Int64Index([0, 0, 0], dtype='int64')] [dask_panel: X must be a dask DataFrame, found <class 'pandas.core.frame.DataFrame'>] [pd_multiindex_hier: X must have a MultiIndex, found <class 'pandas.core.indexes.range.RangeIndex'>] [dask_hierarchical: X must be a dask DataFrame, found <class 'pandas.core.frame.DataFrame'>]
[ ]
can you help me in this.

@shukkkur shukkkur reopened this Apr 21, 2023
@shukkkur shukkkur removed their assignment May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants