Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import the iris data using: [WITH PYTHON] import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from sklearn

import the iris data using: [WITH PYTHON]

import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from sklearn import datasets

iris = datasets.load_iris()

Task:

image text in transcribed

Problem 3: Perceptron learning algorithm (30 points) 1. Apply the Scikit-learn implementation of PLA (see sklearn.Linear model.Perceptron to optimally (linearly) separate first the "Iris setosa" (class 0) from the other two species. Report the numerical error rate (Perceptron.scorep. Visualize the separation plane in 2-dimenional PCA space. (15 points) For plotting the hyperplane, you may find this useful: 1 interNum 100 2 xx8= np.linspace(X[ : , ].min ( ), X[:,].max ( ), interNum) 4 xxn= np.iinspace (XL:,n].min ( ), X[:,n].max (), interNum) 6 gridData np.array (np.meshgrid(xx0, .. ., xxn)) .T.reshape (-1,n) 7 gridPrediction = . . . # prediction boundary set 9 gridDataBoundgridData[np.abs(gridPrediction) SOME DISTANCE, :] 10 gridDataBoundPCA .. . 2. With the same PCA space as above, keep using PLA to separate the other two species (class 1 & 2). Report the numerical error rate and visualize the separation plane in 2-dimensional PCA space. (15 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

Identify four applications of HRM to healthcare organizations.

Answered: 1 week ago