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,440 points

edited Aug 11, 2021 by Soumya 61,823 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,440 points

edited Aug 11, 2021 by Soumya 57,169 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,440 points

edited Aug 11, 2021 by Soumya 42,969 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,440 points
31,862 views
0 votes
1 answer

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

Hey, look at your code's second last ...READ MORE

Aug 2, 2019 in Machine Learning by Naman
26,852 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,440 points
26,099 views
0 votes
1 answer

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

Hi@akhtar, You got this error because LinearRegression is ...READ MORE

Apr 24, 2020 in Machine Learning by MD
• 95,440 points
23,167 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
19,005 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
18,974 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,210 points
18,013 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 17,319 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,440 points
16,485 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
16,295 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
16,088 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,230 points
15,524 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
14,561 views
0 votes
2 answers

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

keep random_state =42 in train_test_split module READ MORE

Aug 27, 2020 in Machine Learning by sairam
• 160 points
14,528 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
14,229 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,440 points
13,259 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,440 points
12,677 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
12,524 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,440 points
12,449 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
11,515 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,440 points
11,031 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,440 points
10,686 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,440 points
10,268 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,440 points
10,175 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
10,064 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
9,349 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,128 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,440 points
9,100 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,440 points
8,596 views
0 votes
1 answer
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
7,877 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,230 points
7,568 views
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
7,560 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,440 points
7,224 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,440 points
7,160 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,440 points
7,051 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
6,197 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,440 points
6,071 views
0 votes
1 answer

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

Hi@akhtar, In Tensorflow 2.0, there is no attribute named ...READ MORE

Jul 13, 2020 in Machine Learning by MD
• 95,440 points
6,006 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,440 points
5,875 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,440 points
5,860 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,440 points
5,782 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,440 points
5,515 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
5,423 views
0 votes
1 answer

DLL load failed: A dynamic link library (DLL) initialization routine failed.

Hi@akhtar, This problem is related to version. Follow ...READ MORE

Apr 23, 2020 in Machine Learning by MD
• 95,440 points
5,068 views
0 votes
0 answers

ValueError: Found input variables with inconsistent numbers of samples: [11, 3988]

After reshaping also I am getting the ...READ MORE

Aug 27, 2020 in Machine Learning by sairam
• 160 points

edited Aug 27, 2020 by MD 5,043 views