9. Multiclass Classification Algorithms
Activity 9.01: Performing Multiclass Classification and Evaluating Performance
Solution:
- Import the required libraries:
import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report,\
confusion_matrix,\
accuracy_score
from sklearn import metrics
from sklearn.metrics import precision_recall_fscore_support
import matplotlib.pyplot as plt
import seaborn as sns
- Load the marketing data into a DataFrame named data and look at the first five rows of the DataFrame using the following code:
data...