(1) Use Python to generate a 2D (x; E R2) linearly separable data set with 50...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(1) Use Python to generate a 2D (x; E R2) linearly separable data set with 50 data points. The data set should have approximately half positive and half negative instances. Create a scatter plot to visualize the data set. Split the data set into training set (60%) and test set (40%). (2) Use Python (not sklearn package) to create the Batch Perceptron training algorithm and use the training data set in a.(1) to train a Perceptron model. Plot the error function curve when the training process converges. Create a plot that shows the training instances and the learnt decision boundary. (3) Use the test set in a.(1) to test the trained model in a.(2) and calculate the accuracy (error rate) of the trained model. (4) Use Python (not sklearn package) to create the sequential Perceptron training algorithm and use the training data set in a. (1) to train a Perceptron model. Plot the weights vs iterations curve when the training process converges. Create a plot that shows the training instances and the resulting decision boundary. (5) Use the test set in a.(1) to test the trained model in a. (4) and calculate the accuracy (error rate) of the trained model. (6) Show how you select learning rate during the training process of a. (2) or a.(4) and demonstrate how the choice of the learning rate is affecting the convergence of the training process. b. Nonlinearly separable case: (1) Use Python to generate a 2D not linearly separable data set with 50 data points. The data set should have approximately half positive and half negative instances. Create a scatter plot to visualize the data set. (2) Modify the training algorithm you developed in a.(2) to have a training algorithm that works on a nonseparable data set. Use the synthetic data set in b.(1) to test your algorithm. Show the error function curve. Plot the decision boundary on the scatter plot of the data set. (1) Use Python to generate a 2D (x; E R2) linearly separable data set with 50 data points. The data set should have approximately half positive and half negative instances. Create a scatter plot to visualize the data set. Split the data set into training set (60%) and test set (40%). (2) Use Python (not sklearn package) to create the Batch Perceptron training algorithm and use the training data set in a.(1) to train a Perceptron model. Plot the error function curve when the training process converges. Create a plot that shows the training instances and the learnt decision boundary. (3) Use the test set in a.(1) to test the trained model in a.(2) and calculate the accuracy (error rate) of the trained model. (4) Use Python (not sklearn package) to create the sequential Perceptron training algorithm and use the training data set in a. (1) to train a Perceptron model. Plot the weights vs iterations curve when the training process converges. Create a plot that shows the training instances and the resulting decision boundary. (5) Use the test set in a.(1) to test the trained model in a. (4) and calculate the accuracy (error rate) of the trained model. (6) Show how you select learning rate during the training process of a. (2) or a.(4) and demonstrate how the choice of the learning rate is affecting the convergence of the training process. b. Nonlinearly separable case: (1) Use Python to generate a 2D not linearly separable data set with 50 data points. The data set should have approximately half positive and half negative instances. Create a scatter plot to visualize the data set. (2) Modify the training algorithm you developed in a.(2) to have a training algorithm that works on a nonseparable data set. Use the synthetic data set in b.(1) to test your algorithm. Show the error function curve. Plot the decision boundary on the scatter plot of the data set.
Expert Answer:
Answer rating: 100% (QA)
Ill provide you with a stepbystep guide on how to complete each of the tasks youve described To acco... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Calculate a log fx (x;,) x2 for a normal distribution and find its value for = 0.9 and = 0.8 (describe the steps in your derivation in detail).
-
Write a python program that drawing the Olympic logo. The Olympic flag has a white background, with five interlocked rings in the center: blue, yellow, black, green, and red. 009
-
You purchase one Apple Tree Inc February 115 call contract for a premium of $7.00. You hold the option until the expiration date when Apple Tree stock sells for $108.14 per share. Calculate gain/loss...
-
Draw the array's dimensions and contents of the following initialized two-dimensional arrays: 1) 2) int[][] arr1= new int [3] [4]; arr1 [0] [1]-5; arrl [0] [2] = 10: arrl [1] [2]-7; arri [0] [3] = 9;...
-
What is the difference between a revenue municipal bond and a general-obligation municipal bond? Which is considered riskier and why?
-
In the early days of computers, Chris Schuler was a very enterprising young man who, while attending UCLA, was also conducting a major fraud against Continental Telephone and Telegraph Company...
-
A single cylinder, single acting pump lifts 30 litres of water per second against a static head of 25 m. The cylinder bore is 350 mm and stroke is 450 mm. Determine the speed of pump if slip is 2...
-
Gentry Electronics has enjoyed tremendous sales growth during the last 10 years. However, even though sales have steadily increased, the company's CEO, Erica Harding, is concerned about certain...
-
A pitcher throws a 0.60 kg ball of clay at a 4.0 kg block of wood. The clay sticks to the wood on impact, and their joint velocity afterward is 2.5 m/s. What was the original speed of the clay (in...
-
On June 1, Year 1, Tsanumis Corporation (a U.S.-based manufacturing firm) received an order to sell goods to a foreign customer at a price of 1 million euros. The goods will be shipped and payment...
-
When choosing an accounting software for your business, what should you consider as important factors? List any six (6).
-
Under the common law the limitations on the liability of possessors was to encourage full utilization of the land. True False
-
American students have organized opposition to the sale by their campus stores of university apparel made for American retailers by workers in foreign countries who work in sweatshop conditions (long...
-
Ecuador is the worlds leading exporter of bananas, which are grown and harvested by a large labor force that includes many children. Assume Ecuador now outlaws the use of child labor on banana...
-
Res ipsa loquitur is a court-created doctrine that allows plaintiffs to create an inference of negligence without having to provide direct evidence of negligence. True False
-
Under the common law, protection was given to the actual possessor of the land and not an abstract legal owner, and landlords were absolved of liability once they surrendered possession of their...
-
What is Granularity? Explain Criteria for choosing granularity parameter.
-
Nitrogen monoxide reacts with hydrogen as follows: 2NO(g)+ H2(g) N2O(g) + H2O(g) The rate law is [H2]/ t = k[NO]2[H2], where k is 1.10 107 L2/(mol2s) at 826oC. A vessel contains NO and H2 at...
-
Solve each polynomial equation in Exercises 110 by factoring and then using the zero-product principle. 4x - 12x 12x = 9x = 9x - 27
-
Fill in each blank so that the resulting statement is true. A matrix that has the same number of rows as columns is called a/an_________ matrix.
-
In Exercises 3744, perform the indicated matrix operations given that A, B, and C are defined as follows. If an operation is not defined, state the reason. 5C - 2B = 4 0 5 1 -3 0 B 5 1 1 1 -[A] - [1]...
-
Why is it important to test a theory? Why not simply accept a theory if it sounds right?
-
What is the intuition behind the geometric growth in interest?
-
You have $100,000 to donate to your college. You want to endow a perpetual scholarship that makes its first payment in 1 year. If the colleges discount rate is 4%, how large will the annual...
Study smarter with the SolutionInn App