predict

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

Error in Python script "Expected 2D array, got 1D array instead:"? Question: 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) …

Total answers: 11