The following error appears:
What should I do with this?
import numpy as np
import matplotlib.pyplot asplt
import pandas aspd
import mglearn
from IPython.display import display
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test=train_test_split(
iris_dataset ['data'], iris_dataset ['target'], random_state = 0)
# Create DataFrame from x_train data,
Name the column using the string #iris_dataset.feature_names.
iris_dataaframe=pd.DataFrame(X_train,
columns=iris_dataset.feature_names)
# Create a scatter matrix from the data frame and color it according to y_train.
grr=pd.scatter_matrix(iris_dataframe, c=y_train, figsize(15,15),
marker='o', hist_kwds={'bins':20}, s=60, alpha=.8, cmap=mglearn.cm3)
File"<ipython-input-45-5ef480aab756>", line 6
grr=pd.scatter_matrix(iris_dataframe, c=y_train, figsize(15,15),
marker='o',^
SyntaxError: positional argument follows keyword argument
See: Machine Learning Starting with Python
python
The figsize(15,15)
portion of the pandas.scatter_matrix()
argument is figsize=(15,15)
Modify to
© 2024 OneMinuteCode. All rights reserved.