fork download
  1. # Normalize the data attributes for the Iris dataset.
  2. from sklearn.datasets import load_iris
  3. from sklearn import preprocessing
  4. # load the iris dataset
  5. iris = load_iris()
  6. print(iris.data.shape)
  7.  
  8. # separate the data from the target attributes
  9.  
  10. X = iris.data
  11. y = iris.target
  12. # normalize the data attributes
  13. normalized_X = preprocessing.normalize(X)
Success #stdin #stdout #stderr 0.29s 40512KB
stdin
mushroom
stdout
Standard output is empty
stderr
Error: unexpected symbol in "from sklearn.datasets"
Execution halted