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 63,141 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 57,959 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 43,765 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
32,839 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
27,227 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
27,017 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,460 points
24,910 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
21,155 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
21,012 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
20,616 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,220 points
18,774 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,615 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,093 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
16,976 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,226 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
15,657 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
15,180 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,892 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
14,201 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
13,807 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
13,644 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
13,326 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,867 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
11,631 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
11,609 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,181 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,138 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,586 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
10,245 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
9,945 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
9,599 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,405 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,003 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
8,514 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
8,422 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,121 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
7,961 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
7,821 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
6,906 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,591 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,460 points
6,433 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,379 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,242 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,075 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
5,969 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,920 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,460 points
5,577 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
5,524 views