Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/machine-learning

Discy Latest Questions

Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 8
Kenil Vasani
Asked: December 14, 2020In: Python

ValueError: could not convert string to float:

  • 8

I am following a this tutorial to write a Naive Bayes Classifier: http://machinelearningmastery.com/naive-bayes-classifier-scratch-python/ I keep getting this error: dataset[i] = [float(x) for x in dataset[i]] ValueError: could not convert string to float: Here is the part of my code where ...

csvmachine-learningpythonscikit-learn
  • 1 1 Answer
  • 9 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 4
Kenil Vasani
Asked: December 14, 2020In: Python

AttributeError: module ‘tensorflow’ has no attribute ‘feature_column’

  • 4

So I am new to machine learning and was trying out the TensorFlow Linear Model Tutorial given here: https://www.tensorflow.org/tutorials/wide I literally just downloaded their tutorial and tried to run it in my computer but I got the error: AttributeError: module ...

machine-learningpythontensorflow
  • 1 1 Answer
  • 11 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 2
Kenil Vasani
Asked: December 14, 2020In: Python

error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

  • 2

I am building an image processing classifier. This line is giving me an error: input_img_resize=cv2.resize(input_img,(128,128)) The error: ('error: /io/opencv/modules/imgproc/src/imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize') My code: PATH = os.getcwd() # Define data path data_path = PATH + '/data' data_dir_list = os.listdir(data_path) img_rows=128 img_cols=128 num_channel=3 num_epoch=30 num_classes ...

image-processingimage-resizingmachine-learningopencvpython
  • 1 1 Answer
  • 10 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 6
Kenil Vasani
Asked: December 14, 2020In: Python

AttributeError: ‘GridSearchCV’ object has no attribute ‘cv_results_’

  • 6

I try to apply this code : pipe = make_pipeline(TfidfVectorizer(min_df=5), LogisticRegression()) param_grid = {'logisticregression__C': [ 0.001, 0.01, 0.1, 1, 10, 100], "tfidfvectorizer__ngram_range": [(1, 1),(1, 2),(1, 3)]} grid = GridSearchCV(pipe, ...

machine-learningpythonscikit-learntext-mining
  • 1 1 Answer
  • 10 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 7
Kenil Vasani
Asked: December 14, 2020In: Python

ValueError: x and y must be the same size

  • 7

import numpy as np import pandas as pd import matplotlib.pyplot as pt data1 = pd.read_csv('stage1_labels.csv') X = data1.iloc[:, :-1].values y = data1.iloc[:, 1].values from sklearn.preprocessing import LabelEncoder, OneHotEncoder label_X = LabelEncoder() X[:,0] = label_X.fit_transform(X[:,0]) encoder = OneHotEncoder(categorical_features = [0]) X = encoder.fit_transform(X).toarray() from sklearn.cross_validation import train_test_split X_train, X_test, y_train,y_test = train_test_split(X, y, ...

csvmachine-learningmatplotlibnumpypython
  • 1 1 Answer
  • 10 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 8
Kenil Vasani
Asked: December 14, 2020In: Python

Getting TypeError: ‘(slice(None, None, None), 0)’ is an invalid key

  • 8

Trying to plot the decision Boundary of the k-NN Classifier but is unable to do so getting TypeError: ‘(slice(None, None, None), 0)’ is an invalid key` h = .01 # step size in the mesh ...

knnmachine-learningpython
  • 1 1 Answer
  • 11 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 8
Kenil Vasani
Asked: December 14, 2020In: Python

Getting No loop matching the specified signature and casting error

  • 8

I’m a beginner to python and machine learning . I get below error when i try to fit data into statsmodels.formula.api OLS.fit() Traceback (most recent call last): File “”, line 47, in regressor_OLS = sm.OLS(y , ...

machine-learningnumpypythonscikit-learn
  • 1 1 Answer
  • 9 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 8
Kenil Vasani
Asked: December 14, 2020In: Python

Keras AttributeError: ‘list’ object has no attribute ‘ndim’

  • 8

I’m running a Keras neural network model in Jupyter Notebook (Python 3.6) I get the following error AttributeError: ‘list’ object has no attribute ‘ndim’ after calling the .fit() method from Keras.model model = Sequential() model.add(Dense(5, input_dim=len(X_data[0]), activation='sigmoid' )) model.add(Dense(1, activation = 'sigmoid')) model.compile(loss='mean_squared_error', optimizer='adam', metrics=['acc']) model.fit(X_data, y_data, ...

jupyter-notebookkerasmachine-learningpythontensorflow
  • 1 1 Answer
  • 9 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 5
Kenil Vasani
Asked: December 11, 2020In: Python

ModuleNotFoundError: No module named ‘numpy.testing.nosetester’

  • 5

I was using the Decision Tree and this error was raised. The same situation appeared when I used Back Propagation. How can I solve it? import pandas as pd import numpy as np a = np.test() f = open('E:/lgdata.csv') data = pd.read_csv(f,index_col = 'id') x = ...

machine-learningnosenumpypython
  • 1 1 Answer
  • 12 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 5
Kenil Vasani
Asked: December 10, 2020In: Python

Error in Python script “Expected 2D array, got 1D array instead:”?

  • 5

I’m following this tutorial to make this ML prediction: import numpy as np import matplotlib.pyplot as plt from matplotlib import style style.use("ggplot") from sklearn import svm x = [1, 5, 1.5, 8, 1, 9] y = [2, 8, 1.8, 8, 0.6, 11] plt.scatter(x,y) plt.show() X = np.array([[1,2], ...

machine-learningpredictpythonpython-3.x
  • 1 1 Answer
  • 12 Views
Answer

Sidebar

Ask A Question
  • Popular
  • Kenil Vasani

    SyntaxError: invalid syntax to repo init in the AOSP code

    • 5 Answers
  • Kenil Vasani

    Homebrew fails on MacOS Big Sur

    • 3 Answers
  • Kenil Vasani

    runtimeError: package fails to pass a sanity check for numpy ...

    • 3 Answers
  • Kenil Vasani

    xlrd.biffh.XLRDError: Excel xlsx file; not supported

    • 3 Answers
  • Kenil Vasani

    Error: Node Sass version 5.0.0 is incompatible with ^4.0.0

    • 2 Answers

Explore

  • Most Answered
  • Most Visited
  • Most Voted
  • Random

© 2020-2021 ErrorCorner. All Rights Reserved
by ErrorCorner.com