Search for question
Question

1. Perceptron Dataset: a. Suppose you have a dataset with 4 data points shown below with each point having a label attached to it. Let the starting weight vector (W₁,

W₁, W₂)¹ = (1, 0, 0)¹. Apply the perceptron learning algorithm for this dataset until convergence. For each step, write down the classification result and the resulting update of the weight vector. Assume learning rate is 0.1. Assume N=-1 and P=1. Hint: ● COMP 642 Assignment MODULE 3 Recall the process of perceptron algorithm: You are given x(k) You predict h₁(k) (x(K)) You are given y(k) ● === D₁: (4,3)T EN D₂: (5, -1)T E N D3: (1,1)¹ € P D4: (2,-2)T E P Dataset: Update the weight on the basis of of y(k) and h₁(k)(x(k)) O w¡(k) ← w¡(k) — n(hw(k) (x(k)) − y(k))x(k) b. If we change the dataset to contain the 4 data points shown below, can a single perceptron solve the problem? Why or why not? (Hint-work the problem using the beginning weight vector and learning rate from part a for and look for a repeating pattern). What kind of problems do you think can be solved by perceptron and what kind of problems can't be solved by perceptron? D₁: (1,1)¹ € N D₂: (1,0)¹ € P D3: (0,0)¹ EN D4: (0,1)T E P C. Run the hw_3.ipynb and fill out the code cells related to perceptron. 2. Adaline a. Run the hw_3.ipynb and fill out the code cells related to Adaline. 3. Logistic Regression. a. Run the hw_3.ipynb and fill out the code cells related to Logistic Regression. Include the answers in your homework document submission as well as in the Jupyter notebook. b. In hw_3.ipynb provided, we only use "sepal length" and "petal length" as features for parametric models. Try out other feature combinations to train the model. Which combination do you think is the best one? 4. Compare your results of the Perceptron, Adaline, and Logistic Regression. Submit a .doc or .pdf with your written answers. Submit your Jupyter notebook. Submit a PDF of your Jupyter notebook.