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: Found input variables with inconsistent numbers of samples: [5000, 20000] ? how does this occur is soemthing wrong with my tokeniser ? #725

Open
Achinth04 opened this issue Jul 23, 2023 · 0 comments

Comments

@Achinth04
Copy link

so i had to covert a 3d array to a 2d one, how ever the code breaks here, as i understand 5000 is the num_samples given i don't understand where the 20000 is coming from and why it breaking the runtime

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\lime\lime_base.py", line 136, in feature_selection return self.feature_selection(data, labels, weights, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\lime\lime_base.py", line 82, in feature_selection clf.fit(data, labels, sample_weight=weights) File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\base.py", line 1151, in wrapper return fit_method(estimator, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\linear_model\_ridge.py", line 1134, in fit X, y = self._validate_data( ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\base.py", line 621, in _validate_data X, y = check_X_y(X, y, **check_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\utils\validation.py", line 1166, in check_X_y check_consistent_length(X, y) File "C:\Users\achin\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\utils\validation.py", line 410, in check_consistent_length raise ValueError( ValueError: Found input variables with inconsistent numbers of samples: [5000, 20000]

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

1 participant