Most viewed questions in Machine Learning

+1 vote
1 answer

UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

Hi@akhtar, You need to install a GUI toolkit, ...READ MORE

Mar 5, 2020 in Machine Learning by MD
• 95,460 points

edited Aug 11, 2021 by Soumya 64,476 views
+1 vote
2 answers

ValueError: Found input variables with inconsistent numbers of samples: [1, 1000]

Hi@akhtar, Here you used x as your feature ...READ MORE

Apr 14, 2020 in Machine Learning by MD
• 95,460 points

edited Aug 11, 2021 by Soumya 58,925 views
+1 vote
1 answer

ModuleNotFoundError: No module named 'keras'

Hi@akhtar, I think this problem is related to ...READ MORE

Apr 23, 2020 in Machine Learning by MD
• 95,460 points

edited Aug 11, 2021 by Soumya 44,650 views
+1 vote
1 answer

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8nhf9w2t/grpcio/

Hi@akhtar, You may get this error because of ...READ MORE

May 16, 2020 in Machine Learning by MD
• 95,460 points
33,872 views
+1 vote
1 answer

ValueError: could not convert string to float in Machine learning.

Hi@akhtar, You are trying to use constant variable ...READ MORE

Apr 14, 2020 in Machine Learning by MD
• 95,460 points
28,170 views
0 votes
1 answer

Python error "TypeError: unsupported operand type(s) for -: 'list' and 'int'"

what he said READ MORE

Dec 12, 2021 in Machine Learning by anonymous

edited Mar 5 27,744 views
0 votes
1 answer

ImportError: cannot import name 'LinearRegression' from 'sklearn'

from sklearn.linear_model import LinearRegression try using this READ MORE

Mar 31, 2023 in Machine Learning by anonymous

edited Mar 5 26,901 views
0 votes
1 answer

Understanding the probability of a double-six if i roll two dice

The chance of not getting a double ...READ MORE

Mar 23, 2022 in Machine Learning by Nandini
• 5,480 points
25,359 views
0 votes
1 answer

what is C parameter in sklearn Logistic Regression?

C is known as a "hyperparameter." The ...READ MORE

Feb 24, 2022 in Machine Learning by Nandini
• 5,480 points
22,881 views
0 votes
1 answer

What is "entropy and information gain"?

Entropy is uncertainty/ randomness in the data, ...READ MORE

Mar 2, 2022 in Machine Learning by Dev
• 6,000 points
22,558 views
+1 vote
2 answers

ValueError: Not enough values to unpack

Make the following changes in your script, ...READ MORE

Jun 24, 2019 in Machine Learning by Omkar
• 69,180 points
19,842 views
0 votes
2 answers

ModuleNotFoundError: No module named 'tensorflow'

If you are using Anaconda, go to ...READ MORE

Nov 17, 2020 in Machine Learning by Vignesh

edited Aug 11, 2021 by Soumya 18,113 views
0 votes
1 answer

R: Calculate and interpret odds ratio in logistic regression

A logit, or the log of the ...READ MORE

Apr 4, 2022 in Machine Learning by Nandini
• 5,480 points
17,995 views
0 votes
1 answer

ValueError: Expected 2D array, got 1D array instead: array=[2 4 7 9].

Hi@akhtar, According to your code, you are trying ...READ MORE

Apr 9, 2020 in Machine Learning by MD
• 95,460 points
17,478 views
0 votes
1 answer

AttributeError: module 'cv2.cv2' has no attribute 'face_LBPHFaceRecognizer'

Hi@MD, LBPHFaceRecognizer module comes from a package named ...READ MORE

Apr 20, 2020 in Machine Learning by akhtar
• 38,260 points
16,760 views
0 votes
1 answer

Ignore the NaN and do the linear regression on remaining values

Yes, you can do this using statsmodels: import ...READ MORE

May 22, 2019 in Machine Learning by Hari
16,589 views
0 votes
2 answers

valueerror: found input variables with inconsistent numbers of samples: [40, 10]

X_train, X_test, y_train, y_test = train_test_split( input ...READ MORE

Sep 29, 2021 in Machine Learning by SREEKANTH REDDY DADHIREDDY

edited Mar 5 16,201 views
0 votes
1 answer

What is h5 model in Keras?

Hi@akhtar, H5 is a file format to store ...READ MORE

Jul 14, 2020 in Machine Learning by MD
• 95,460 points
15,789 views
0 votes
1 answer

What is greedy approach in Decision tree algorithm?

“Greedy Approach is based on the concept ...READ MORE

May 13, 2019 in Machine Learning by Upadhya
15,667 views
0 votes
1 answer

OpenCV Error: Assertion failed (size.width>0 && size.height>0)

Hi@akhtar, You are getting this error, because your ...READ MORE

Apr 20, 2020 in Machine Learning by MD
• 95,460 points
14,689 views
0 votes
1 answer

ModuleNotFoundError: No module named 'cPickle'

Hi@akhtar, There is no cPickle module in Python 3. ...READ MORE

Jul 14, 2020 in Machine Learning by MD
• 95,460 points
14,502 views
0 votes
1 answer

How to compare expected and predicted values?

The predict() function returns a plain numpy ...READ MORE

Jul 14, 2019 in Machine Learning by Tina
14,057 views
0 votes
1 answer

AttributeError: module 'matplotlib' has no attribute 'scatter'

Hi@akhtar, To avoid this error, make sure you ...READ MORE

Apr 16, 2020 in Machine Learning by MD
• 95,460 points
13,166 views
0 votes
1 answer

Different types of Logistic Regression

There are three main types of logistic ...READ MORE

May 13, 2019 in Machine Learning by Nikhil
12,335 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'constant'

Hi@akhtar, There may be problem in the versions. ...READ MORE

Apr 21, 2020 in Machine Learning by MD
• 95,460 points
12,280 views
0 votes
1 answer

AttributeError: module 'sklearn' has no attribute 'LinearRegresion'

Hi@akhtar, You need to import the LinearRegression module ...READ MORE

Oct 15, 2020 in Machine Learning by MD
• 95,460 points
11,862 views
0 votes
1 answer

ImportError: No module named 'tensorflow.contrib.rnn.python.ops.core_rnn

Hi@akhtar, I think you got this error because of incompatible ...READ MORE

Apr 22, 2020 in Machine Learning by MD
• 95,460 points
11,694 views
0 votes
1 answer

Epoch vs Iteration when training neural networks

Epoch can be understood as the number ...READ MORE

Feb 10, 2022 in Machine Learning by Nandini
• 5,480 points
11,675 views
0 votes
1 answer

ERROR: Could not install packages opencv-contrib-python due to an EnvironmentError: [WinError 5] Access is denied:

Hi@akhtar, I think you are trying to install ...READ MORE

Apr 20, 2020 in Machine Learning by MD
• 95,460 points
11,320 views
+1 vote
1 answer

how to analysis the heatmap to find the correlation

Hi @Vikas, there are 5 simple steps ...READ MORE

Sep 30, 2019 in Machine Learning by Vishal
11,252 views
0 votes
1 answer

How to extract the regression coefficient from statsmodels.api?

The coefficients can be obtained using the ...READ MORE

Mar 17, 2022 in Machine Learning by Dev
• 6,000 points
10,884 views
0 votes
1 answer

ValueError: Input contains NaN, infinity or a value too large for dtype('float32')

Assuming X_test is a pandas dataframe, you ...READ MORE

May 23, 2019 in Machine Learning by Maya
9,826 views
0 votes
1 answer

ImportError: cannot import name 'train_test_split' from 'sklearn.linear_model

Hi@MD, I think in your version, linear_model  don't have train_test_split ...READ MORE

Apr 13, 2020 in Machine Learning by akhtar
• 38,260 points
9,456 views
0 votes
1 answer

How to convert categorical variable into dummy variable?

Hi@akhtar, You can do this task using pandas ...READ MORE

May 7, 2020 in Machine Learning by MD
• 95,460 points
9,361 views
0 votes
1 answer
0 votes
1 answer

Features of KNN algorithm

The KNN algorithm has the following features: KNN ...READ MORE

May 13, 2019 in Machine Learning by Vedant
9,184 views
0 votes
2 answers

AttributeError: module 'scipy' has no attribute '_version_'

Hi@Sanjana, Actually you are missing one underscore in ...READ MORE

Aug 12, 2020 in Machine Learning by MD
• 95,460 points
8,843 views
+1 vote
1 answer

ModuleNotFoundError: No module named 'mnist'

Hi@akhtar, This mnist package comes with keras module ...READ MORE

May 9, 2020 in Machine Learning by MD
• 95,460 points
8,831 views
0 votes
1 answer

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Hi@akhtar, In your file_name_path you have to give ...READ MORE

May 19, 2020 in Machine Learning by MD
• 95,460 points
8,495 views
+1 vote
1 answer

TypeError: A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.

Hi, There is a problem with your X ...READ MORE

Dec 16, 2020 in Machine Learning by MD
• 95,460 points
7,571 views
0 votes
1 answer

Difference between reinforcement learning and supervised learning?

In reinforcement learning, the output depends on ...READ MORE

May 9, 2019 in Machine Learning by Nipun
7,001 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'log'

Use tf.math.log READ MORE

Apr 23, 2021 in Machine Learning by Vipulnath

edited Mar 5 6,977 views
0 votes
1 answer

How to load a model from an HDF5 file in Keras?

Hi@akhtar, If you stored the complete model, not ...READ MORE

Jul 14, 2020 in Machine Learning by MD
• 95,460 points
6,867 views
0 votes
1 answer

Tensorflow ImportError: cannot import name'abs' error

Hi@akhtar, You may get this error, if you ...READ MORE

Apr 23, 2020 in Machine Learning by MD
• 95,460 points
6,818 views
0 votes
1 answer

IndexError: tuple index out of range

Hi@akhtar, I don't know your use cases. But ...READ MORE

Apr 15, 2020 in Machine Learning by MD
• 95,460 points
6,497 views
0 votes
1 answer

How to convert 1D array into 2D array using pandas?

Hi@akhtar, You can follow the below given codes to ...READ MORE

May 8, 2020 in Machine Learning by MD
• 95,460 points
6,453 views
0 votes
1 answer

Numpy rounds very small number to zeros - Markov Chain(Python)

Use higher-precision floats, if available on your ...READ MORE

Aug 2, 2019 in Machine Learning by Harry
6,282 views
0 votes
1 answer

problem with Found input variables with inconsistent numbers of samples: [1204, 134]

Hi@Alessandro, Here you used x as your feature parameter ...READ MORE

Jul 20, 2020 in Machine Learning by MD
• 95,460 points
6,071 views
+1 vote
1 answer

not able to see all columns and rows of a pandas DataFrame?

Hi@akhtar, Your data set contains lots of rows ...READ MORE

Apr 8, 2020 in Machine Learning by MD
• 95,460 points
6,058 views