SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Assignment-2_CS5710/Assignment-2_CS5710_Logistic-
Regression.pdf
Introduction to Machine Learning (CS 4710/5710)
Assignment-2 (80 points)
Logistic Regression
Due by 23rd march (Monday) 11:59pm
You are allowed to discuss the problem and solution design with
others, but the code you submit
must be your own. Your solution must include the certification
of authenticity “I certify that the
codes/answers of this assignment are entirely my own work.”
Datasets
The training and test files will follow the same format as the
text files in the UCI datasets.
Datasets and description of the datasets are uploaded with this
assignment onto Blackboard. For
each dataset, a training file and a test file are provided. The
name of each file indicates what
dataset the file belongs to, and whether the file contains
training or test data. Your code should
also work with ANY OTHER training and test files using the
same format as the files in the UCI
datasets.
Logistic Regression
You must implement a Python executable file called
logistic_regression that uses logistic
regression to fit a function to the given UCI datasets. Your code
should work for all the three
datasets (for different number of features). Your function
should be invoked as follows:
logistic_regression with following three command line
arguments: <training_file> <test_file>
• <training_file>: The first argument, <training_file> is the path
name of the training file,
where the training data is stored. The path name can specify any
file stored on the local
computer.
• <test_file>: The second argument, <test_file> is the path name
of the test file, where the
test data is stored. The path name can specify any file stored on
the local computer.
Training Stage for Logistic Regression
You need to apply gradient descent method at the training stage
of your model. The hypothesis
of the logistic regression is:
Gradient Descent Method:
At the end of the training stage, your program should print out
the values of the weights that you
have estimated. The output of the training phase should be a
sequence of lines like this:
�0=%.4f
�1=%.4f
�2=%.4f
...
Test Stage for Logistic Regression
After the training stage, you should apply the function that you
have learned on the test data. For
each test object (following the order in which each test object
appears in the test file), you should
print a line containing the following info:
• Object ID. This is the line number where that object occurs in
the test file.
• Predicted class (the result of the classification).
• True class (the last column on the line where the object
occurs).
• Accuracy. This is defined as follows:
o If the predicted class is correct, the accuracy is 1.
o If the predicted class is incorrect, the accuracy is 0.
The output of the test stage should be a sequence of lines like
this:
ID=%5d, output=%14.4f, target value = %10.4f,
Misclassification error = %4d
Submission Guidelines and Requirements
• Please zip up logistic_regression.py (or
logistic_regression.ipynb). Submit the zip file via
Blackboard.
• Include your name, UCM ID and Certification statement in
your solution:
//Your name
// Your UCM ID
//Certificate of Authenticity: “I certify that the codes/answers of
this assignment are
entirely my own work.”
Assignment-2_CS5710/UCI_Dataset/Description of UCI
Datasets.docx
Description of UCI Datasets
The files in the UCI datasets directory contain training files and
test files for three datasets. Both the training file and the test
file are text files, containing data in tabular format. Each value
is a number, and values are separated by white space. The i-th
row and j-th column contain the value for the j-th dimension of
the i-th object. The only exception is the LAST column, that
stores the class label for each object. Make sure you do not use
data from the last column (i.e., the class labels) as parts of the
input vector.
The datasets are copied from the UCI repository of machine
learning datasets. Here are some details on each dataset:
· The pendigits dataset. This dataset contains data for pen-based
recognition of handwritten digits.
· 7494 training objects.
· 3498 test objets.
· 16 dimensions.
· 10 classes.
· The satellite dataset. The full name of this dataset is Statlog
(Landsat Satellite) Data Set, and it contains data for
classification of pixels in satellite images.
· 4435 training objects.
· 2000 test objets.
· 36 dimensions.
· 6 classes.
· The yeast dataset. This dataset contains some biological data
· 1000 training objects.
· 484 test objets.
· 8 dimensions.
· 10 classes.
For each dataset, a training file and a test file are provided. The
name of each file indicates what dataset the file belongs to, and
whether the file contains training or test data.
Note that, for the purposes of your assignments, it does not
matter at all where the data come from. The methods that you
are asked to implement should work on all three datasets, as
well as ANY other datasets following the same format.
Assignment-2_CS5710/UCI_Dataset/pendigits_test.txt
88 92 2 99 16 66 94 37 70 0 0 24 42 65 100 100 8
80 100 18 98 60 66 100 29 42 0 0 23 42 61 56 98 8
0 94 9 57 20 19 7 0 20 36 70 68 100 100 18 92 8
95 82 71 100 27 77 77 73 100 80 93 42 56 13 0 0 9
68 100 6 88 47 75 87 82 85 56 100 29 75 6 0 0 9
70 100 100 97 70 81 45 65 30 49 20 33 0 16 0 0 1
40 100 0 81 15 58 100 57 47 87 50 88 40 42 36 0 4
3 71 0 95 45 100 100 99 79 78 48 53 31 24 54 0 7
79 87 98 81 71 100 72 73 100 66 91 21 48 0 0 13 9
92 95 30 100 34 68 87 89 84 78 100 35 64 0 0 19 9
58 64 100 96 27 100 0 63 79 65 91 72 48 36 10 0 9
34 89 3 70 1 25 49 0 100 23 100 67 56 99 0 100 0
0 90 46 100 88 92 79 69 60 48 39 27 47 6 100 0 2
20 71 0 29 31 0 78 12 100 51 84 93 37 100 8 66 0
100 100 67 98 41 80 44 50 78 42 68 16 35 2 0 0 5
91 69 48 57 9 79 60 100 100 75 95 40 64 8 0 0 9
30 74 55 100 89 87 66 56 100 38 92 8 41 0 0 20 3
5 65 0 89 37 100 88 97 100 79 71 53 48 26 59 0 7
42 93 19 88 0 42 24 0 83 11 100 56 75 100 17 97 0
4 100 0 72 15 44 79 50 100 76 90 51 83 22 85 0 4
100 100 79 80 54 59 32 38 21 16 50 0 79 16 0 16 6
0 76 30 48 53 9 11 0 47 34 97 66 100 100 38 85 8
0 93 40 100 57 61 51 17 35 0 12 37 54 48 100 49 7
100 100 73 95 40 69 14 39 2 2 39 0 37 29 0 14 6
88 100 42 77 12 50 0 22 45 0 100 17 73 44 15 49 6
33 86 0 55 1 12 52 0 90 34 100 76 56 100 6 77 0
69 100 44 77 5 50 0 28 67 23 100 44 95 29 89 0 4
27 83 0 42 9 0 65 17 96 57 100 100 45 95 10 58 0
19 100 35 93 0 63 12 36 89 37 100 66 94 33 89 0 4
27 73 81 100 83 91 78 52 62 14 0 0 29 1 100 5 1
77 96 38 100 58 77 99 86 100 50 84 12 43 0 0 0 9
41 84 73 100 100 82 62 60 97 38 91 8 42 0 0 19 3
32 92 24 47 71 36 38 0 0 0 21 48 49 92 100 100 5
53 100 30 95 0 60 100 55 92 87 77 79 79 37 79 0 4
100 95 75 100 42 70 0 44 42 33 85 49 83 31 85 0 4
0 50 41 69 76 90 100 100 89 74 78 50 70 25 68 0 1
2 75 37 100 56 99 58 61 46 25 0 0 34 5 100 8 1
10 100 0 60 14 18 60 0 100 24 96 66 58 95 19 73 0
79 90 100 93 63 100 82 84 99 61 87 22 44 0 0 19 9
0 88 59 100 89 72 82 40 63 9 28 0 25 25 100 27 7
5 97 9 61 37 25 0 0 7 32 56 64 100 96 37 100 8
59 89 42 23 29 42 25 100 100 82 75 46 98 0 0 3 3
20 100 6 61 25 28 18 0 0 27 11 63 55 75 100 82 5
100 100 49 77 17 51 2 24 24 0 100 10 73 35 0 42 6
29 80 0 41 14 0 70 14 100 53 100 96 49 100 19 62 0
21 87 33 52 62 13 5 0 0 36 74 66 100 100 5 89 8
13 67 40 100 65 78 37 42 0 11 6 4 60 0 100 19 2
5 70 56 44 60 3 0 0 30 39 84 72 100 100 32 74 8
0 94 68 100 89 68 72 33 43 0 3 21 25 50 100 58 7
100 93 48 100 27 69 30 33 16 0 0 26 41 51 100 58 8
0 55 46 58 73 82 100 100 92 75 89 50 84 25 89 0 1
96 66 62 100 32 69 74 62 89 56 100 10 50 0 0 10 9
32 96 70 100 12 95 32 66 89 62 100 22 51 0 0 16 5
79 100 41 82 0 61 23 45 77 37 86 54 86 25 100 0 4
22 72 55 100 54 89 53 50 55 12 0 1 49 0 100 4 1
23 70 51 100 74 82 51 46 20 15 0 4 50 0 100 2 2
88 100 100 95 75 79 38 64 25 47 12 32 0 16 12 0 1
76 100 31 87 1 52 0 14 61 0 100 27 50 42 1 21 6
29 97 0 57 22 10 68 0 100 40 83 90 37 100 12 57 0
53 67 80 44 67 7 0 0 35 36 83 68 100 100 25 80 8
11 45 17 6 55 0 88 25 100 61 79 94 38 100 0 84 0
88 90 18 100 17 66 79 33 49 0 0 28 41 67 100 98 8
75 100 42 78 13 51 0 22 40 0 100 16 88 43 22 35 6
27 82 65 100 100 89 69 62 33 39 0 15 37 1 88 0 2
70 84 11 76 0 91 56 100 99 83 100 55 88 28 75 0 9
88 100 29 100 30 74 85 83 100 67 97 27 57 0 0 5 9
51 54 100 87 36 100 19 62 44 22 2 0 0 37 78 57 8
15 84 0 57 5 17 52 0 95 28 100 67 70 100 20 87 0
0 76 29 95 92 100 81 77 75 56 100 35 85 13 31 0 3
38 65 36 98 100 100 99 69 62 55 96 26 55 0 0 15 3
82 100 8 92 45 60 100 29 52 0 0 24 21 61 53 98 8
0 82 34 100 78 90 49 62 80 49 100 18 62 0 18 13 3
53 64 73 100 70 83 67 42 36 11 0 0 49 4 100 9 1
0 39 30 69 48 100 39 69 41 35 33 5 31 2 100 0 1
12 91 48 100 66 77 77 63 100 42 75 15 34 0 0 15 3
100 89 34 100 0 75 76 78 83 62 90 35 85 8 5 0 9
26 98 24 49 45 13 17 0 0 35 26 72 62 91 100 100 5
61 100 24 88 21 49 26 9 0 0 7 37 51 60 100 78 8
25 76 0 39 15 0 68 1 98 36 100 76 58 100 7 90 0
0 63 37 44 42 6 1 0 25 36 65 67 100 100 46 80 8
62 100 25 91 0 49 7 2 55 0 92 30 100 78 63 100 0
78 99 21 85 0 50 5 14 59 0 100 27 100 65 79 100 0
76 93 24 100 0 72 58 73 74 74 100 42 92 12 37 0 9
100 100 79 86 62 71 50 57 33 43 21 28 8 14 0 0 1
100 98 71 100 42 88 35 55 59 41 61 16 31 3 0 0 5
27 50 56 89 64 100 55 52 35 9 0 2 52 2 100 0 1
0 67 25 100 49 73 36 33 6 0 1 6 53 3 100 11 2
56 97 15 77 0 35 23 0 70 3 100 36 95 78 54 100 0
100 83 25 100 16 67 58 28 12 0 0 33 65 65 89 91 8
23 97 0 48 17 0 58 3 93 35 100 89 59 100 23 73 0
95 76 34 80 0 97 57 100 98 80 100 53 83 25 59 0 9
0 93 41 100 57 65 47 26 21 0 2 35 51 38 100 36 7
17 81 59 100 76 75 53 48 100 44 89 13 40 0 0 20 3
77 64 100 96 45 100 35 63 34 25 0 0 0 36 48 62 8
9 88 22 100 26 65 16 31 0 5 33 1 66 0 100 3 2
99 88 74 100 56 75 100 85 99 57 89 17 46 0 0 4 9
26 94 0 61 6 16 47 0 91 17 100 60 71 95 27 100 0
76 67 75 100 0 77 49 40 83 0 5 12 36 52 100 87 8
34 100 14 83 2 66 0 48 23 34 65 30 91 17 100 0 4
0 98 75 100 84 65 54 31 26 0 100 21 96 39 6 41 7
100 100 55 82 23 54 0 23 33 0 87 15 66 44 11 40 6
8 100 67 99 72 65 55 31 32 0 0 26 36 47 100 52 7
49 100 7 83 0 54 100 60 72 82 51 86 59 36 68 0 4
15 70 48 100 63 89 57 56 67 24 15 1 0 0 100 0 1
0 95 39 100 67 73 53 30 40 0 21 40 53 45 100 40 7
80 100 28 81 44 70 89 82 89 54 100 25 69 4 0 0 9
62 81 100 100 84 91 40 76 67 64 83 26 46 0 0 9 5
45 69 74 100 68 94 57 50 39 9 0 3 50 3 100 0 1
0 89 61 100 100 85 47 65 44 47 98 29 71 4 6 0 3
100 100 70 86 53 72 37 58 20 43 10 29 0 14 13 0 1
100 100 82 91 64 75 50 59 27 43 14 27 0 11 0 0 1
32 75 59 100 88 84 72 54 100 38 89 10 39 0 0 19 3
0 98 39 100 71 80 72 39 69 0 48 29 60 50 100 55 7
0 100 52 94 74 60 71 23 55 0 9 21 43 31 100 31 7
8 96 55 100 62 67 42 30 25 0 0 36 41 49 100 50 7
23 89 59 100 75 68 58 33 36 0 0 18 48 27 100 32 7
42 98 22 72 75 51 62 0 0 6 23 57 43 100 100 99 5
21 85 57 100 63 71 30 55 85 47 100 15 48 0 0 11 3
100 91 49 100 28 66 55 30 26 0 0 30 50 61 95 90 8
7 59 29 100 31 91 32 46 31 1 0 0 54 1 100 0 1
100 65 92 100 39 93 9 62 0 27 31 0 60 26 19 28 6
86 100 46 83 17 56 0 28 17 1 92 0 100 21 22 16 6
100 100 58 96 20 95 0 62 28 58 66 45 55 11 17 0 5
54 87 85 100 76 71 65 47 100 21 77 0 33 5 0 22 3
52 100 12 74 0 41 12 9 66 0 100 27 98 60 79 93 0
19 76 53 100 92 81 73 40 33 13 0 0 49 5 100 6 2
14 93 0 54 52 31 24 0 2 29 4 78 44 96 100 100 5
61 100 0 72 1 42 79 43 100 67 67 90 56 45 57 0 4
10 98 0 54 7 11 51 0 90 30 100 72 66 100 18 88 0
0 93 41 100 62 75 44 39 26 3 5 0 29 19 100 28 7
97 100 45 84 0 62 2 46 48 41 100 45 58 23 21 0 4
52 87 79 100 79 75 72 49 100 29 76 8 36 0 0 7 3
100 96 2 100 0 65 61 32 37 0 19 32 68 68 64 96 8
18 73 62 100 53 85 53 53 52 20 0 0 8 6 100 6 1
29 100 4 77 0 54 64 53 100 69 71 47 46 24 32 0 4
0 84 3 73 30 98 100 100 90 79 73 48 61 16 59 0 7
45 100 12 79 0 52 62 40 100 56 88 55 78 27 68 0 4
14 72 5 25 39 0 81 20 100 63 75 100 30 98 0 65 0
28 96 98 97 87 95 13 100 34 64 100 45 63 0 0 18 5
0 83 28 96 63 100 72 78 58 54 50 29 65 8 100 0 2
24 96 0 61 7 16 43 0 82 11 100 48 78 86 39 100 0
0 94 33 100 52 83 64 65 77 47 100 30 89 13 52 0 3
39 60 64 100 96 84 69 41 25 12 0 15 50 0 100 4 2
98 89 53 100 12 72 0 27 37 0 86 21 100 63 92 90 0
83 95 6 100 20 65 100 38 83 0 0 12 12 55 36 95 8
3 74 33 100 52 71 33 34 3 2 0 4 51 0 100 1 2
0 79 27 93 60 100 77 80 72 54 64 28 66 4 100 0 2
9 49 42 63 82 85 100 100 76 74 51 48 29 22 0 0 1
12 100 10 90 0 56 58 43 100 65 97 70 91 35 90 0 4
36 100 3 88 0 64 54 55 100 67 73 45 46 23 29 0 4
20 57 0 20 40 0 83 23 100 62 87 100 40 88 11 53 0
0 87 18 95 89 100 100 79 64 41 38 0 1 10 52 24 7
0 61 29 88 51 100 43 66 43 32 23 0 11 2 100 3 1
37 67 84 100 51 80 24 41 32 0 100 4 69 28 0 13 6
24 72 50 100 61 64 33 33 0 12 29 19 64 0 100 10 2
83 74 74 100 42 73 51 36 46 0 0 12 35 41 100 54 8
18 74 49 100 53 67 31 31 0 0 13 11 59 2 100 8 2
24 100 24 76 0 45 100 48 100 57 61 65 61 31 67 0 4
24 96 34 62 72 36 37 0 15 40 0 89 50 99 100 100 5
0 66 39 83 100 100 100 82 84 62 68 41 58 20 50 0 1
31 97 100 100 25 94 12 62 48 62 94 33 60 0 0 5 5
57 94 100 100 48 82 24 48 71 64 85 31 54 0 0 1 5
87 74 63 100 46 71 87 82 100 54 88 17 40 1 0 0 9
79 98 30 90 2 53 0 10 46 0 88 27 100 70 73 100 0
0 77 34 100 82 97 72 64 39 36 4 10 48 1 100 0 2
14 100 14 92 0 65 55 55 100 72 72 53 49 27 29 0 4
0 73 27 86 73 100 100 98 89 72 83 46 82 20 85 0 1
0 87 27 100 55 87 68 68 82 50 100 32 100 13 73 0 3
79 100 27 86 0 53 9 15 53 0 95 25 100 63 76 99 0
87 100 56 95 71 86 87 81 94 50 100 19 53 6 0 0 9
62 83 62 75 81 100 74 86 100 53 90 18 37 0 0 16 9
10 61 35 100 69 88 41 46 0 13 10 28 53 0 100 23 2
70 100 72 97 45 57 39 13 91 0 100 39 41 44 0 11 6
70 100 54 86 29 53 23 16 69 0 100 23 50 36 0 21 6
57 87 41 78 74 38 84 0 0 7 37 48 100 81 90 100 8
11 98 0 55 52 36 45 0 17 22 11 72 42 100 100 99 5
37 80 53 100 88 83 59 60 100 44 92 15 49 0 0 8 3
0 69 47 81 88 100 100 91 91 68 76 45 71 22 68 0 1
24 100 17 56 58 34 37 0 0 23 12 59 51 85 100 93 5
54 98 17 64 0 18 50 0 93 36 100 84 54 100 19 60 0
64 100 10 99 0 71 56 77 72 71 100 37 75 8 19 0 9
100 100 93 86 73 72 57 57 40 44 23 29 10 15 0 0 1
100 99 52 100 17 70 0 32 24 0 68 16 40 45 3 28 6
44 100 20 63 22 22 63 0 100 29 95 69 47 89 0 74 0
0 83 20 100 67 96 73 74 64 51 51 30 56 9 100 0 2
54 73 37 100 0 71 49 36 76 0 19 19 53 56 100 91 8
100 100 63 100 32 78 8 53 0 23 23 0 63 8 44 32 6
75 100 31 92 1 55 0 10 46 0 84 31 100 73 68 99 0
87 100 49 77 19 52 0 24 25 0 83 2 100 25 45 31 6
47 100 12 70 0 41 65 43 100 49 51 69 49 33 50 0 4
9 74 38 100 53 78 30 43 0 17 27 8 63 6 100 0 2
100 94 72 100 49 93 44 64 68 53 55 29 29 13 0 0 5
0 73 40 98 58 100 55 64 58 27 24 3 43 0 100 4 1
73 100 13 64 66 49 100 93 43 70 0 28 17 0 29 34 8
13 78 49 100 65 76 38 48 4 23 0 9 54 14 100 0 2
11 95 8 55 56 35 33 0 0 25 1 65 43 92 100 100 5
33 100 2 54 0 5 62 0 100 42 91 92 32 95 4 49 0
51 100 85 98 100 80 67 67 59 43 67 17 37 1 0 0 3
21 65 9 25 40 0 79 25 100 61 87 98 40 100 0 80 0
77 100 28 90 0 50 15 10 72 0 100 33 48 45 21 11 6
100 100 64 98 36 99 34 68 59 60 62 36 32 17 0 0 5
0 100 59 97 81 66 63 32 44 0 3 25 37 34 100 39 7
18 72 25 100 24 70 22 34 17 0 0 2 51 2 100 2 1
100 93 74 100 30 74 0 44 2 10 57 0 96 23 44 33 6
28 77 40 100 49 67 29 32 0 18 32 14 66 0 100 18 2
100 75 62 62 54 95 93 100 98 63 81 28 46 0 0 1 9
87 67 66 100 0 79 49 45 100 10 40 0 37 40 81 78 8
0 55 20 68 65 88 100 100 76 75 51 50 28 25 11 0 1
19 90 2 64 15 24 62 0 100 30 97 71 55 100 0 92 0
0 94 60 100 98 75 93 40 76 6 48 0 34 23 100 24 7
100 100 70 89 57 74 43 59 35 45 17 29 9 14 0 0 1
86 70 51 100 0 76 78 41 100 0 0 13 40 54 98 80 8
100 100 56 89 22 59 0 26 24 0 77 11 77 39 22 36 6
0 92 44 100 71 83 56 59 100 47 89 19 50 0 3 1 3
29 97 59 100 46 72 14 58 0 43 32 27 64 9 100 0 2
19 78 40 100 54 75 31 45 0 19 26 9 62 0 100 13 2
12 87 0 77 35 97 100 100 98 78 81 43 73 6 72 0 7
81 85 34 100 40 66 60 30 26 0 0 22 47 51 100 78 8
13 91 18 54 66 40 37 0 5 29 0 81 44 99 100 100 5
25 100 16 73 0 44 57 40 100 54 88 58 65 29 51 0 4
23 100 0 81 25 48 100 44 96 80 85 68 76 28 65 0 4
73 100 23 90 70 82 77 95 91 60 100 24 60 0 0 2 9
82 88 35 100 0 69 48 36 79 0 24 15 50 54 100 86 8
64 65 100 100 41 85 67 42 64 0 0 16 20 59 81 74 8
0 54 47 78 69 100 53 68 33 35 0 6 31 0 100 7 1
34 99 9 67 52 42 35 0 0 4 19 62 52 97 100 100 5
48 73 27 86 0 48 7 5 53 0 91 27 100 71 66 100 0
0 74 19 98 60 100 46 66 22 34 15 0 59 0 100 11 2
41 93 88 100 86 75 47 53 0 38 5 25 50 10 100 0 2
0 98 49 100 64 89 47 44 42 0 8 37 48 49 100 51 7
0 100 81 100 68 62 34 26 24 0 92 28 100 50 5 46 7
2 88 37 76 87 100 0 93 48 81 95 70 87 34 100 0 9
77 96 27 100 0 67 3 27 42 0 89 12 100 52 88 90 0
100 100 60 90 32 70 11 48 0 23 16 0 44 12 8 6 6
28 69 43 100 77 86 60 45 29 9 0 1 52 0 100 6 2
0 87 42 100 100 94 87 73 67 53 64 32 69 11 22 0 3
86 100 38 76 8 48 0 20 50 0 100 18 74 45 8 57 6
100 95 78 100 28 72 0 39 1 4 71 0 88 32 11 41 6
100 100 74 90 28 68 0 44 77 46 72 48 37 23 9 0 4
96 100 51 76 17 50 0 20 41 0 100 16 73 39 4 33 6
0 86 52 100 100 80 99 36 65 0 26 3 34 38 90 49 7
73 100 24 85 0 39 22 0 70 20 100 62 78 99 31 76 0
1 77 80 74 75 100 0 84 38 66 100 76 87 38 88 0 9
23 63 0 84 47 100 98 90 100 66 81 43 51 21 19 0 9
17 82 50 100 86 86 56 57 97 46 100 17 51 0 0 6 3
100 100 64 78 33 56 13 32 3 8 54 0 54 17 0 9 6
65 100 33 80 12 57 0 35 6 12 52 0 100 13 58 19 6
100 93 38 100 21 67 85 34 62 0 0 20 50 57 88 93 8
14 96 87 100 21 96 22 58 70 65 100 28 54 0 0 17 5
16 86 44 100 35 59 12 25 0 4 33 3 66 1 100 0 2
100 100 83 96 67 80 50 64 37 48 20 32 7 16 0 0 1
0 89 29 100 66 87 70 66 84 46 100 26 75 8 25 0 3
84 96 0 100 28 66 100 36 68 0 2 21 46 60 88 95 8
10 68 35 100 59 72 37 30 0 3 15 14 58 2 100 0 2
24 100 31 56 45 16 16 0 0 43 15 81 57 87 100 88 5
16 86 0 43 25 1 68 0 100 35 90 85 50 100 13 75 0
53 85 60 100 57 67 32 39 0 15 29 5 69 0 100 24 2
94 100 50 77 17 49 5 16 50 0 100 14 57 31 0 24 6
71 98 76 100 39 75 0 51 39 36 100 49 76 26 86 0 4
0 84 54 100 100 79 95 42 69 8 29 0 28 26 90 30 7
46 100 38 76 0 48 47 48 100 67 91 64 70 31 44 0 4
95 75 42 100 14 74 80 39 73 0 0 20 47 59 100 84 8
38 100 6 73 0 41 71 37 100 67 80 63 49 32 21 0 4
100 100 58 80 26 58 0 35 0 11 61 0 74 12 16 6 6
0 82 46 75 97 100 27 97 45 81 100 79 88 39 78 0 9
57 93 18 71 0 34 19 0 64 4 96 34 100 73 69 100 0
88 83 71 100 44 78 86 77 100 64 87 21 46 1 0 0 9
96 36 83 81 42 100 9 65 0 20 42 0 88 20 100 62 0
0 91 27 100 31 62 16 26 10 0 40 3 70 7 100 8 2
27 94 1 60 0 20 38 0 81 16 100 53 92 93 51 100 0
97 82 68 100 42 69 44 32 23 0 0 24 42 49 100 61 8
10 100 0 77 30 60 73 55 100 71 77 53 64 27 57 0 4
0 62 47 88 67 100 63 65 59 29 46 2 34 0 100 0 1
100 100 58 91 24 69 2 42 0 12 39 0 49 26 4 37 6
7 98 58 100 90 70 71 27 41 0 0 27 50 37 100 35 7
79 89 100 100 79 83 57 67 36 50 18 34 7 17 0 0 1
12 64 57 46 46 0 0 3 44 41 100 74 90 100 25 79 8
0 53 34 82 45 100 43 65 50 30 40 0 37 2 100 7 1
11 64 23 100 52 84 34 45 5 10 0 0 50 3 100 5 2
95 79 73 100 61 72 98 95 100 55 84 16 36 0 0 1 9
0 50 32 76 60 100 63 64 62 29 30 6 40 1 100 0 1
0 95 54 100 66 90 55 46 51 0 18 16 45 27 100 29 7
0 75 15 100 47 99 42 69 31 39 30 9 63 0 100 1 2
9 74 32 100 63 84 48 48 12 19 0 13 49 4 100 0 2
62 81 22 80 0 38 23 0 71 4 100 43 84 88 40 100 0
21 66 0 28 27 0 77 14 100 49 88 88 40 100 6 70 0
0 89 58 100 88 87 60 44 32 0 22 3 39 33 100 40 7
2 91 0 56 28 21 43 0 39 33 76 65 100 100 37 96 8
26 83 72 100 84 69 56 45 100 47 87 15 36 0 0 24 3
4 63 28 100 35 82 28 37 0 6 2 10 51 7 100 0 1
24 78 56 100 96 83 77 53 100 39 97 10 46 0 0 18 3
0 99 54 100 78 72 73 39 71 6 48 0 45 14 100 16 7
25 100 1 63 0 21 41 0 87 16 100 57 74 93 25 89 0
2 76 35 100 76 86 57 52 18 26 0 14 51 11 100 0 2
36 84 81 100 97 70 52 46 96 33 100 5 45 0 0 18 3
77 93 35 77 83 37 72 0 0 18 37 60 100 94 75 100 8
4 87 64 61 56 21 0 0 47 36 100 70 99 100 19 78 8
22 95 97 100 100 98 18 95 32 70 100 47 72 0 0 16 5
100 100 77 87 57 72 40 58 26 45 14 30 3 14 0 0 1
21 90 68 100 69 67 56 47 100 37 80 3 31 0 0 28 3
29 94 91 100 60 92 34 70 72 65 100 31 60 0 0 13 5
28 86 38 57 91 37 57 1 0 0 8 62 42 98 100 100 5
100 100 64 81 35 60 13 37 0 14 31 0 53 21 5 24 6
59 93 14 69 0 33 24 0 78 12 100 47 85 83 36 100 0
43 100 0 73 6 44 90 41 100 54 56 68 52 34 62 0 4
49 100 16 85 0 64 20 47 88 51 100 43 84 22 71 0 4
0 96 43 100 76 92 54 48 36 0 21 13 56 32 100 36 7
100 100 51 81 18 54 0 24 29 0 89 11 84 36 23 28 6
30 73 81 71 82 100 33 91 81 68 100 35 55 9 0 0 9
35 100 27 68 0 37 65 42 100 60 100 66 96 32 96 0 4
100 100 57 85 20 57 0 27 26 0 90 8 81 34 14 36 6
84 100 55 81 32 58 20 33 30 9 100 6 52 13 0 0 6
17 86 68 100 71 70 57 60 100 41 91 7 35 0 0 19 3
99 89 26 100 27 68 83 32 40 0 0 27 63 61 100 91 8
0 70 18 97 76 100 92 74 66 36 54 0 100 26 58 33 7
7 67 62 39 100 8 38 0 24 33 57 67 74 100 0 91 8
72 100 1 75 0 42 100 38 99 66 65 83 61 42 64 0 4
31 56 100 80 48 100 0 67 61 52 98 71 63 33 24 0 9
49 80 46 69 65 27 30 0 0 33 49 67 100 100 27 99 8
0 89 33 100 49 54 39 6 16 0 10 36 55 35 100 31 7
6 75 36 97 92 100 69 75 66 51 100 30 54 12 0 0 3
70 97 16 84 0 49 12 14 62 0 95 29 100 65 92 100 0
32 100 86 86 100 56 81 27 46 0 0 17 38 34 98 47 7
48 84 99 100 100 94 53 74 48 44 90 26 55 0 0 1 5
11 100 8 63 44 36 37 0 0 21 1 59 46 84 100 91 5
0 92 28 100 67 74 70 35 48 0 5 24 45 34 100 34 7
0 97 51 100 65 88 46 44 42 0 9 29 40 34 100 40 7
39 88 0 66 68 60 68 15 8 0 19 47 31 95 100 100 5
100 81 54 100 0 72 43 36 66 0 26 24 67 61 95 91 8
100 100 55 89 17 61 0 29 28 0 94 6 94 33 26 34 6
14 85 54 100 100 96 72 72 87 41 92 10 47 0 0 3 3
17 100 21 85 0 53 45 47 96 57 92 61 98 28 100 0 4
0 95 41 100 59 67 51 27 40 0 12 32 52 47 100 55 7
25 70 40 100 68 81 47 46 18 14 0 0 53 3 100 12 2
41 100 58 60 70 19 1 0 0 35 60 65 100 95 25 84 8
67 100 27 73 4 41 6 6 60 0 100 24 52 37 0 22 6
53 92 100 100 66 94 40 66 49 39 87 18 48 0 0 4 5
81 80 53 100 43 73 87 88 100 59 88 16 46 0 0 0 9
0 86 42 100 84 84 83 42 78 0 45 15 49 41 100 48 7
0 88 45 100 81 79 80 43 72 7 58 0 47 23 100 24 7
56 97 24 69 100 58 96 17 25 0 5 42 0 85 75 100 5
30 100 21 86 0 58 32 36 80 43 100 61 91 30 89 0 4
31 100 2 56 12 3 60 0 100 35 91 85 42 90 0 60 0
41 93 32 64 32 23 0 0 0 32 51 56 100 82 58 100 8
4 64 27 100 31 83 26 39 0 8 5 3 52 2 100 0 1
0 74 68 69 90 100 13 91 42 70 100 77 83 39 79 0 9
0 100 46 98 95 82 95 41 84 0 49 9 45 22 100 28 7
47 100 31 76 0 45 63 50 100 64 92 61 94 28 96 0 4
14 90 65 100 100 84 57 65 71 53 91 26 56 3 0 0 3
0 91 25 63 86 33 75 0 14 11 53 43 100 75 75 100 8
53 100 16 78 0 47 59 38 100 63 86 58 58 29 29 0 4
24 61 45 100 90 99 68 54 29 17 0 14 51 0 100 5 2
20 82 71 100 100 96 41 87 10 71 62 48 54 0 0 0 5
100 91 75 100 47 79 39 45 73 40 78 13 41 0 0 0 5
18 75 51 100 65 72 41 35 8 3 0 0 50 6 100 15 2
13 96 0 71 78 61 82 12 7 0 4 49 15 97 100 100 5
74 100 47 84 0 66 23 53 84 42 100 44 60 23 33 0 4
0 67 44 80 88 100 100 88 88 66 69 44 50 22 50 0 1
100 77 64 61 9 74 54 100 100 85 91 51 59 19 0 0 9
72 74 63 100 0 78 67 42 100 0 15 4 38 47 …
For your information, you need to implement Multi-Class
(multi-nomial) Logistic Regression using one-vs-all method in
Assignment-2. Please see the lecture slides for more
information on one-vs-all method. All three datasets of UCI
Datasets have more than two classes, so datasets are applicable
for Multi-Class Logistic Regression. Another reminder (as
announced several times in the class): please do not use any
library functions (other than Numpy and Pandas) for your
implementation. Please let me know if you have any questions.
Thank you.
Assignment-2_CS5710Assignment-2_CS5710_Logistic-Regression.pdf.docx

Weitere ähnliche Inhalte

Ähnlich wie Assignment-2_CS5710Assignment-2_CS5710_Logistic-Regression.pdf.docx

Basic course exam 2 scores (pdf)
Basic course exam 2 scores (pdf)Basic course exam 2 scores (pdf)
Basic course exam 2 scores (pdf)pghdovs
 
Learn Your Times Tables
Learn Your Times TablesLearn Your Times Tables
Learn Your Times TablesMark Runge
 
Storytelling through data
Storytelling through dataStorytelling through data
Storytelling through dataGramener
 
LT SAP HANAネットワークプロトコル初段
LT SAP HANAネットワークプロトコル初段LT SAP HANAネットワークプロトコル初段
LT SAP HANAネットワークプロトコル初段Koji Shinkubo
 
People Power1.What is the purpose of the event specifications gu.docx
People Power1.What is the purpose of the event specifications gu.docxPeople Power1.What is the purpose of the event specifications gu.docx
People Power1.What is the purpose of the event specifications gu.docxkarlhennesey
 
Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...
Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...
Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...Alexander Litvinenko
 
Catalogo tubos colmena
Catalogo tubos colmenaCatalogo tubos colmena
Catalogo tubos colmenajairecas
 
รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557
รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557
รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557ยุทธกิจ สัตยาวุธ
 
PBC-Series-Standard Range-Update
PBC-Series-Standard Range-UpdatePBC-Series-Standard Range-Update
PBC-Series-Standard Range-UpdateIgnatius Gunawan
 
Ejercicios con referencias, filtros
Ejercicios con referencias, filtrosEjercicios con referencias, filtros
Ejercicios con referencias, filtrosDAYCIQUISHPE
 
Hardness conversion chart
Hardness conversion chartHardness conversion chart
Hardness conversion chartDiana Ixchel
 
Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...
Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...
Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...Nanosyn
 
Daniel coloma (2) (1) blog
Daniel coloma (2) (1) blog Daniel coloma (2) (1) blog
Daniel coloma (2) (1) blog Isaacklilop
 

Ähnlich wie Assignment-2_CS5710Assignment-2_CS5710_Logistic-Regression.pdf.docx (20)

Grading
GradingGrading
Grading
 
Basic course exam 2 scores (pdf)
Basic course exam 2 scores (pdf)Basic course exam 2 scores (pdf)
Basic course exam 2 scores (pdf)
 
Catalogo
CatalogoCatalogo
Catalogo
 
Mult020249 001
Mult020249 001Mult020249 001
Mult020249 001
 
Learn Your Times Tables
Learn Your Times TablesLearn Your Times Tables
Learn Your Times Tables
 
Storytelling through data
Storytelling through dataStorytelling through data
Storytelling through data
 
Regression project
Regression projectRegression project
Regression project
 
LT SAP HANAネットワークプロトコル初段
LT SAP HANAネットワークプロトコル初段LT SAP HANAネットワークプロトコル初段
LT SAP HANAネットワークプロトコル初段
 
People Power1.What is the purpose of the event specifications gu.docx
People Power1.What is the purpose of the event specifications gu.docxPeople Power1.What is the purpose of the event specifications gu.docx
People Power1.What is the purpose of the event specifications gu.docx
 
Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...
Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...
Application of Parallel Hierarchical Matrices in Spatial Statistics and Param...
 
Catalogo tubos colmena
Catalogo tubos colmenaCatalogo tubos colmena
Catalogo tubos colmena
 
Cp 24062018 2241
Cp 24062018 2241Cp 24062018 2241
Cp 24062018 2241
 
รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557
รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557
รายงานระดับบุคคล 1085460018-โรงเรียนอนุบาลระนอง ป.3/2557
 
PBC-Series-Standard Range-Update
PBC-Series-Standard Range-UpdatePBC-Series-Standard Range-Update
PBC-Series-Standard Range-Update
 
Ejercicios con referencias, filtros
Ejercicios con referencias, filtrosEjercicios con referencias, filtros
Ejercicios con referencias, filtros
 
Hardness conversion chart
Hardness conversion chartHardness conversion chart
Hardness conversion chart
 
Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...
Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...
Chemistry to Clinic: The Nanosyn Approach to Bridging the Gaps in Translation...
 
Daniel coloma (2) (1) blog
Daniel coloma (2) (1) blog Daniel coloma (2) (1) blog
Daniel coloma (2) (1) blog
 
Baja wf
Baja wfBaja wf
Baja wf
 
ECE469 proj2_Lakshmi Yasaswi Kamireddy
ECE469 proj2_Lakshmi Yasaswi KamireddyECE469 proj2_Lakshmi Yasaswi Kamireddy
ECE469 proj2_Lakshmi Yasaswi Kamireddy
 

Mehr von mckellarhastings

Conduct an internet search finding a job you are interested (HR .docx
Conduct an internet search finding a job you are interested (HR .docxConduct an internet search finding a job you are interested (HR .docx
Conduct an internet search finding a job you are interested (HR .docxmckellarhastings
 
Conduct an Internet or library search for information on The Bay of.docx
Conduct an Internet or library search for information on The Bay of.docxConduct an Internet or library search for information on The Bay of.docx
Conduct an Internet or library search for information on The Bay of.docxmckellarhastings
 
Conduct an internet search about the murder of Yeardley Love. After .docx
Conduct an internet search about the murder of Yeardley Love. After .docxConduct an internet search about the murder of Yeardley Love. After .docx
Conduct an internet search about the murder of Yeardley Love. After .docxmckellarhastings
 
At this point, you’ve organized your HR project team and you are.docx
At this point, you’ve organized your HR project team and you are.docxAt this point, you’ve organized your HR project team and you are.docx
At this point, you’ve organized your HR project team and you are.docxmckellarhastings
 
At the beginning of 2012, the Jeater company had the following balan.docx
At the beginning of 2012, the Jeater company had the following balan.docxAt the beginning of 2012, the Jeater company had the following balan.docx
At the beginning of 2012, the Jeater company had the following balan.docxmckellarhastings
 
At many different points throughout the collection Born a Crime, Tre.docx
At many different points throughout the collection Born a Crime, Tre.docxAt many different points throughout the collection Born a Crime, Tre.docx
At many different points throughout the collection Born a Crime, Tre.docxmckellarhastings
 
At least 200 wordss or more per question. Answer UNDER question. And.docx
At least 200 wordss or more per question. Answer UNDER question. And.docxAt least 200 wordss or more per question. Answer UNDER question. And.docx
At least 200 wordss or more per question. Answer UNDER question. And.docxmckellarhastings
 
At least 200 words per question. Chapter 11The Idea .docx
At least 200 words per question. Chapter 11The Idea .docxAt least 200 words per question. Chapter 11The Idea .docx
At least 200 words per question. Chapter 11The Idea .docxmckellarhastings
 
At least 150 words each. Use a reference for each question and us.docx
At least 150 words each.  Use a reference for each question and us.docxAt least 150 words each.  Use a reference for each question and us.docx
At least 150 words each. Use a reference for each question and us.docxmckellarhastings
 
At least 250 words per question. Chapter 11The Idea of Craft A.docx
At least 250 words per question. Chapter 11The Idea of Craft A.docxAt least 250 words per question. Chapter 11The Idea of Craft A.docx
At least 250 words per question. Chapter 11The Idea of Craft A.docxmckellarhastings
 
At its core, pathology is the study of disease. Diseases occur for m.docx
At its core, pathology is the study of disease. Diseases occur for m.docxAt its core, pathology is the study of disease. Diseases occur for m.docx
At its core, pathology is the study of disease. Diseases occur for m.docxmckellarhastings
 
assumptions people make about this topic (homelessness, immigration,.docx
assumptions people make about this topic (homelessness, immigration,.docxassumptions people make about this topic (homelessness, immigration,.docx
assumptions people make about this topic (homelessness, immigration,.docxmckellarhastings
 
At age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docx
At age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docxAt age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docx
At age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docxmckellarhastings
 
At each of the locations listed below, there is evidence of plat.docx
At each of the locations listed below, there is evidence of plat.docxAt each of the locations listed below, there is evidence of plat.docx
At each of the locations listed below, there is evidence of plat.docxmckellarhastings
 
Assume you hold the Special Agent in Charge role of the Joint .docx
Assume you hold the Special Agent in Charge role of the Joint .docxAssume you hold the Special Agent in Charge role of the Joint .docx
Assume you hold the Special Agent in Charge role of the Joint .docxmckellarhastings
 
Assume you are a DFI and you must deliver a presentation to the Stat.docx
Assume you are a DFI and you must deliver a presentation to the Stat.docxAssume you are a DFI and you must deliver a presentation to the Stat.docx
Assume you are a DFI and you must deliver a presentation to the Stat.docxmckellarhastings
 
Assume that you work for the District Board of Education. The Direct.docx
Assume that you work for the District Board of Education. The Direct.docxAssume that you work for the District Board of Education. The Direct.docx
Assume that you work for the District Board of Education. The Direct.docxmckellarhastings
 
Assume that you have been tasked by your employer to develop an inci.docx
Assume that you have been tasked by your employer to develop an inci.docxAssume that you have been tasked by your employer to develop an inci.docx
Assume that you have been tasked by your employer to develop an inci.docxmckellarhastings
 
Assume that you generate an authenticated and encrypted message by f.docx
Assume that you generate an authenticated and encrypted message by f.docxAssume that you generate an authenticated and encrypted message by f.docx
Assume that you generate an authenticated and encrypted message by f.docxmckellarhastings
 
Assume that you are in your chosen criminal justice profession, .docx
Assume that you are in your chosen criminal justice profession, .docxAssume that you are in your chosen criminal justice profession, .docx
Assume that you are in your chosen criminal justice profession, .docxmckellarhastings
 

Mehr von mckellarhastings (20)

Conduct an internet search finding a job you are interested (HR .docx
Conduct an internet search finding a job you are interested (HR .docxConduct an internet search finding a job you are interested (HR .docx
Conduct an internet search finding a job you are interested (HR .docx
 
Conduct an Internet or library search for information on The Bay of.docx
Conduct an Internet or library search for information on The Bay of.docxConduct an Internet or library search for information on The Bay of.docx
Conduct an Internet or library search for information on The Bay of.docx
 
Conduct an internet search about the murder of Yeardley Love. After .docx
Conduct an internet search about the murder of Yeardley Love. After .docxConduct an internet search about the murder of Yeardley Love. After .docx
Conduct an internet search about the murder of Yeardley Love. After .docx
 
At this point, you’ve organized your HR project team and you are.docx
At this point, you’ve organized your HR project team and you are.docxAt this point, you’ve organized your HR project team and you are.docx
At this point, you’ve organized your HR project team and you are.docx
 
At the beginning of 2012, the Jeater company had the following balan.docx
At the beginning of 2012, the Jeater company had the following balan.docxAt the beginning of 2012, the Jeater company had the following balan.docx
At the beginning of 2012, the Jeater company had the following balan.docx
 
At many different points throughout the collection Born a Crime, Tre.docx
At many different points throughout the collection Born a Crime, Tre.docxAt many different points throughout the collection Born a Crime, Tre.docx
At many different points throughout the collection Born a Crime, Tre.docx
 
At least 200 wordss or more per question. Answer UNDER question. And.docx
At least 200 wordss or more per question. Answer UNDER question. And.docxAt least 200 wordss or more per question. Answer UNDER question. And.docx
At least 200 wordss or more per question. Answer UNDER question. And.docx
 
At least 200 words per question. Chapter 11The Idea .docx
At least 200 words per question. Chapter 11The Idea .docxAt least 200 words per question. Chapter 11The Idea .docx
At least 200 words per question. Chapter 11The Idea .docx
 
At least 150 words each. Use a reference for each question and us.docx
At least 150 words each.  Use a reference for each question and us.docxAt least 150 words each.  Use a reference for each question and us.docx
At least 150 words each. Use a reference for each question and us.docx
 
At least 250 words per question. Chapter 11The Idea of Craft A.docx
At least 250 words per question. Chapter 11The Idea of Craft A.docxAt least 250 words per question. Chapter 11The Idea of Craft A.docx
At least 250 words per question. Chapter 11The Idea of Craft A.docx
 
At its core, pathology is the study of disease. Diseases occur for m.docx
At its core, pathology is the study of disease. Diseases occur for m.docxAt its core, pathology is the study of disease. Diseases occur for m.docx
At its core, pathology is the study of disease. Diseases occur for m.docx
 
assumptions people make about this topic (homelessness, immigration,.docx
assumptions people make about this topic (homelessness, immigration,.docxassumptions people make about this topic (homelessness, immigration,.docx
assumptions people make about this topic (homelessness, immigration,.docx
 
At age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docx
At age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docxAt age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docx
At age 12, Freeman Hrabowski marched with Martin Luther King. Now he.docx
 
At each of the locations listed below, there is evidence of plat.docx
At each of the locations listed below, there is evidence of plat.docxAt each of the locations listed below, there is evidence of plat.docx
At each of the locations listed below, there is evidence of plat.docx
 
Assume you hold the Special Agent in Charge role of the Joint .docx
Assume you hold the Special Agent in Charge role of the Joint .docxAssume you hold the Special Agent in Charge role of the Joint .docx
Assume you hold the Special Agent in Charge role of the Joint .docx
 
Assume you are a DFI and you must deliver a presentation to the Stat.docx
Assume you are a DFI and you must deliver a presentation to the Stat.docxAssume you are a DFI and you must deliver a presentation to the Stat.docx
Assume you are a DFI and you must deliver a presentation to the Stat.docx
 
Assume that you work for the District Board of Education. The Direct.docx
Assume that you work for the District Board of Education. The Direct.docxAssume that you work for the District Board of Education. The Direct.docx
Assume that you work for the District Board of Education. The Direct.docx
 
Assume that you have been tasked by your employer to develop an inci.docx
Assume that you have been tasked by your employer to develop an inci.docxAssume that you have been tasked by your employer to develop an inci.docx
Assume that you have been tasked by your employer to develop an inci.docx
 
Assume that you generate an authenticated and encrypted message by f.docx
Assume that you generate an authenticated and encrypted message by f.docxAssume that you generate an authenticated and encrypted message by f.docx
Assume that you generate an authenticated and encrypted message by f.docx
 
Assume that you are in your chosen criminal justice profession, .docx
Assume that you are in your chosen criminal justice profession, .docxAssume that you are in your chosen criminal justice profession, .docx
Assume that you are in your chosen criminal justice profession, .docx
 

Kürzlich hochgeladen

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Kürzlich hochgeladen (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

Assignment-2_CS5710Assignment-2_CS5710_Logistic-Regression.pdf.docx

  • 1. Assignment-2_CS5710/Assignment-2_CS5710_Logistic- Regression.pdf Introduction to Machine Learning (CS 4710/5710) Assignment-2 (80 points) Logistic Regression Due by 23rd march (Monday) 11:59pm You are allowed to discuss the problem and solution design with others, but the code you submit must be your own. Your solution must include the certification of authenticity “I certify that the codes/answers of this assignment are entirely my own work.” Datasets The training and test files will follow the same format as the text files in the UCI datasets. Datasets and description of the datasets are uploaded with this assignment onto Blackboard. For each dataset, a training file and a test file are provided. The name of each file indicates what dataset the file belongs to, and whether the file contains
  • 2. training or test data. Your code should also work with ANY OTHER training and test files using the same format as the files in the UCI datasets. Logistic Regression You must implement a Python executable file called logistic_regression that uses logistic regression to fit a function to the given UCI datasets. Your code should work for all the three datasets (for different number of features). Your function should be invoked as follows: logistic_regression with following three command line arguments: <training_file> <test_file> • <training_file>: The first argument, <training_file> is the path name of the training file, where the training data is stored. The path name can specify any file stored on the local computer. • <test_file>: The second argument, <test_file> is the path name of the test file, where the test data is stored. The path name can specify any file stored on the local computer.
  • 3. Training Stage for Logistic Regression You need to apply gradient descent method at the training stage of your model. The hypothesis of the logistic regression is: Gradient Descent Method: At the end of the training stage, your program should print out the values of the weights that you have estimated. The output of the training phase should be a sequence of lines like this: �0=%.4f �1=%.4f �2=%.4f ... Test Stage for Logistic Regression After the training stage, you should apply the function that you have learned on the test data. For
  • 4. each test object (following the order in which each test object appears in the test file), you should print a line containing the following info: • Object ID. This is the line number where that object occurs in the test file. • Predicted class (the result of the classification). • True class (the last column on the line where the object occurs). • Accuracy. This is defined as follows: o If the predicted class is correct, the accuracy is 1. o If the predicted class is incorrect, the accuracy is 0. The output of the test stage should be a sequence of lines like this: ID=%5d, output=%14.4f, target value = %10.4f, Misclassification error = %4d Submission Guidelines and Requirements • Please zip up logistic_regression.py (or logistic_regression.ipynb). Submit the zip file via
  • 5. Blackboard. • Include your name, UCM ID and Certification statement in your solution: //Your name // Your UCM ID //Certificate of Authenticity: “I certify that the codes/answers of this assignment are entirely my own work.” Assignment-2_CS5710/UCI_Dataset/Description of UCI Datasets.docx Description of UCI Datasets The files in the UCI datasets directory contain training files and test files for three datasets. Both the training file and the test file are text files, containing data in tabular format. Each value is a number, and values are separated by white space. The i-th row and j-th column contain the value for the j-th dimension of the i-th object. The only exception is the LAST column, that stores the class label for each object. Make sure you do not use data from the last column (i.e., the class labels) as parts of the input vector. The datasets are copied from the UCI repository of machine learning datasets. Here are some details on each dataset: · The pendigits dataset. This dataset contains data for pen-based recognition of handwritten digits. · 7494 training objects. · 3498 test objets. · 16 dimensions. · 10 classes.
  • 6. · The satellite dataset. The full name of this dataset is Statlog (Landsat Satellite) Data Set, and it contains data for classification of pixels in satellite images. · 4435 training objects. · 2000 test objets. · 36 dimensions. · 6 classes. · The yeast dataset. This dataset contains some biological data · 1000 training objects. · 484 test objets. · 8 dimensions. · 10 classes. For each dataset, a training file and a test file are provided. The name of each file indicates what dataset the file belongs to, and whether the file contains training or test data. Note that, for the purposes of your assignments, it does not matter at all where the data come from. The methods that you are asked to implement should work on all three datasets, as well as ANY other datasets following the same format. Assignment-2_CS5710/UCI_Dataset/pendigits_test.txt 88 92 2 99 16 66 94 37 70 0 0 24 42 65 100 100 8 80 100 18 98 60 66 100 29 42 0 0 23 42 61 56 98 8 0 94 9 57 20 19 7 0 20 36 70 68 100 100 18 92 8 95 82 71 100 27 77 77 73 100 80 93 42 56 13 0 0 9 68 100 6 88 47 75 87 82 85 56 100 29 75 6 0 0 9 70 100 100 97 70 81 45 65 30 49 20 33 0 16 0 0 1 40 100 0 81 15 58 100 57 47 87 50 88 40 42 36 0 4
  • 7. 3 71 0 95 45 100 100 99 79 78 48 53 31 24 54 0 7 79 87 98 81 71 100 72 73 100 66 91 21 48 0 0 13 9 92 95 30 100 34 68 87 89 84 78 100 35 64 0 0 19 9 58 64 100 96 27 100 0 63 79 65 91 72 48 36 10 0 9 34 89 3 70 1 25 49 0 100 23 100 67 56 99 0 100 0 0 90 46 100 88 92 79 69 60 48 39 27 47 6 100 0 2 20 71 0 29 31 0 78 12 100 51 84 93 37 100 8 66 0 100 100 67 98 41 80 44 50 78 42 68 16 35 2 0 0 5 91 69 48 57 9 79 60 100 100 75 95 40 64 8 0 0 9 30 74 55 100 89 87 66 56 100 38 92 8 41 0 0 20 3 5 65 0 89 37 100 88 97 100 79 71 53 48 26 59 0 7 42 93 19 88 0 42 24 0 83 11 100 56 75 100 17 97 0 4 100 0 72 15 44 79 50 100 76 90 51 83 22 85 0 4 100 100 79 80 54 59 32 38 21 16 50 0 79 16 0 16 6 0 76 30 48 53 9 11 0 47 34 97 66 100 100 38 85 8 0 93 40 100 57 61 51 17 35 0 12 37 54 48 100 49 7 100 100 73 95 40 69 14 39 2 2 39 0 37 29 0 14 6 88 100 42 77 12 50 0 22 45 0 100 17 73 44 15 49 6
  • 8. 33 86 0 55 1 12 52 0 90 34 100 76 56 100 6 77 0 69 100 44 77 5 50 0 28 67 23 100 44 95 29 89 0 4 27 83 0 42 9 0 65 17 96 57 100 100 45 95 10 58 0 19 100 35 93 0 63 12 36 89 37 100 66 94 33 89 0 4 27 73 81 100 83 91 78 52 62 14 0 0 29 1 100 5 1 77 96 38 100 58 77 99 86 100 50 84 12 43 0 0 0 9 41 84 73 100 100 82 62 60 97 38 91 8 42 0 0 19 3 32 92 24 47 71 36 38 0 0 0 21 48 49 92 100 100 5 53 100 30 95 0 60 100 55 92 87 77 79 79 37 79 0 4 100 95 75 100 42 70 0 44 42 33 85 49 83 31 85 0 4 0 50 41 69 76 90 100 100 89 74 78 50 70 25 68 0 1 2 75 37 100 56 99 58 61 46 25 0 0 34 5 100 8 1 10 100 0 60 14 18 60 0 100 24 96 66 58 95 19 73 0 79 90 100 93 63 100 82 84 99 61 87 22 44 0 0 19 9 0 88 59 100 89 72 82 40 63 9 28 0 25 25 100 27 7 5 97 9 61 37 25 0 0 7 32 56 64 100 96 37 100 8 59 89 42 23 29 42 25 100 100 82 75 46 98 0 0 3 3 20 100 6 61 25 28 18 0 0 27 11 63 55 75 100 82 5
  • 9. 100 100 49 77 17 51 2 24 24 0 100 10 73 35 0 42 6 29 80 0 41 14 0 70 14 100 53 100 96 49 100 19 62 0 21 87 33 52 62 13 5 0 0 36 74 66 100 100 5 89 8 13 67 40 100 65 78 37 42 0 11 6 4 60 0 100 19 2 5 70 56 44 60 3 0 0 30 39 84 72 100 100 32 74 8 0 94 68 100 89 68 72 33 43 0 3 21 25 50 100 58 7 100 93 48 100 27 69 30 33 16 0 0 26 41 51 100 58 8 0 55 46 58 73 82 100 100 92 75 89 50 84 25 89 0 1 96 66 62 100 32 69 74 62 89 56 100 10 50 0 0 10 9 32 96 70 100 12 95 32 66 89 62 100 22 51 0 0 16 5 79 100 41 82 0 61 23 45 77 37 86 54 86 25 100 0 4 22 72 55 100 54 89 53 50 55 12 0 1 49 0 100 4 1 23 70 51 100 74 82 51 46 20 15 0 4 50 0 100 2 2 88 100 100 95 75 79 38 64 25 47 12 32 0 16 12 0 1 76 100 31 87 1 52 0 14 61 0 100 27 50 42 1 21 6 29 97 0 57 22 10 68 0 100 40 83 90 37 100 12 57 0 53 67 80 44 67 7 0 0 35 36 83 68 100 100 25 80 8 11 45 17 6 55 0 88 25 100 61 79 94 38 100 0 84 0
  • 10. 88 90 18 100 17 66 79 33 49 0 0 28 41 67 100 98 8 75 100 42 78 13 51 0 22 40 0 100 16 88 43 22 35 6 27 82 65 100 100 89 69 62 33 39 0 15 37 1 88 0 2 70 84 11 76 0 91 56 100 99 83 100 55 88 28 75 0 9 88 100 29 100 30 74 85 83 100 67 97 27 57 0 0 5 9 51 54 100 87 36 100 19 62 44 22 2 0 0 37 78 57 8 15 84 0 57 5 17 52 0 95 28 100 67 70 100 20 87 0 0 76 29 95 92 100 81 77 75 56 100 35 85 13 31 0 3 38 65 36 98 100 100 99 69 62 55 96 26 55 0 0 15 3 82 100 8 92 45 60 100 29 52 0 0 24 21 61 53 98 8 0 82 34 100 78 90 49 62 80 49 100 18 62 0 18 13 3 53 64 73 100 70 83 67 42 36 11 0 0 49 4 100 9 1 0 39 30 69 48 100 39 69 41 35 33 5 31 2 100 0 1 12 91 48 100 66 77 77 63 100 42 75 15 34 0 0 15 3 100 89 34 100 0 75 76 78 83 62 90 35 85 8 5 0 9 26 98 24 49 45 13 17 0 0 35 26 72 62 91 100 100 5 61 100 24 88 21 49 26 9 0 0 7 37 51 60 100 78 8 25 76 0 39 15 0 68 1 98 36 100 76 58 100 7 90 0
  • 11. 0 63 37 44 42 6 1 0 25 36 65 67 100 100 46 80 8 62 100 25 91 0 49 7 2 55 0 92 30 100 78 63 100 0 78 99 21 85 0 50 5 14 59 0 100 27 100 65 79 100 0 76 93 24 100 0 72 58 73 74 74 100 42 92 12 37 0 9 100 100 79 86 62 71 50 57 33 43 21 28 8 14 0 0 1 100 98 71 100 42 88 35 55 59 41 61 16 31 3 0 0 5 27 50 56 89 64 100 55 52 35 9 0 2 52 2 100 0 1 0 67 25 100 49 73 36 33 6 0 1 6 53 3 100 11 2 56 97 15 77 0 35 23 0 70 3 100 36 95 78 54 100 0 100 83 25 100 16 67 58 28 12 0 0 33 65 65 89 91 8 23 97 0 48 17 0 58 3 93 35 100 89 59 100 23 73 0 95 76 34 80 0 97 57 100 98 80 100 53 83 25 59 0 9 0 93 41 100 57 65 47 26 21 0 2 35 51 38 100 36 7 17 81 59 100 76 75 53 48 100 44 89 13 40 0 0 20 3 77 64 100 96 45 100 35 63 34 25 0 0 0 36 48 62 8 9 88 22 100 26 65 16 31 0 5 33 1 66 0 100 3 2 99 88 74 100 56 75 100 85 99 57 89 17 46 0 0 4 9 26 94 0 61 6 16 47 0 91 17 100 60 71 95 27 100 0
  • 12. 76 67 75 100 0 77 49 40 83 0 5 12 36 52 100 87 8 34 100 14 83 2 66 0 48 23 34 65 30 91 17 100 0 4 0 98 75 100 84 65 54 31 26 0 100 21 96 39 6 41 7 100 100 55 82 23 54 0 23 33 0 87 15 66 44 11 40 6 8 100 67 99 72 65 55 31 32 0 0 26 36 47 100 52 7 49 100 7 83 0 54 100 60 72 82 51 86 59 36 68 0 4 15 70 48 100 63 89 57 56 67 24 15 1 0 0 100 0 1 0 95 39 100 67 73 53 30 40 0 21 40 53 45 100 40 7 80 100 28 81 44 70 89 82 89 54 100 25 69 4 0 0 9 62 81 100 100 84 91 40 76 67 64 83 26 46 0 0 9 5 45 69 74 100 68 94 57 50 39 9 0 3 50 3 100 0 1 0 89 61 100 100 85 47 65 44 47 98 29 71 4 6 0 3 100 100 70 86 53 72 37 58 20 43 10 29 0 14 13 0 1 100 100 82 91 64 75 50 59 27 43 14 27 0 11 0 0 1 32 75 59 100 88 84 72 54 100 38 89 10 39 0 0 19 3 0 98 39 100 71 80 72 39 69 0 48 29 60 50 100 55 7 0 100 52 94 74 60 71 23 55 0 9 21 43 31 100 31 7 8 96 55 100 62 67 42 30 25 0 0 36 41 49 100 50 7
  • 13. 23 89 59 100 75 68 58 33 36 0 0 18 48 27 100 32 7 42 98 22 72 75 51 62 0 0 6 23 57 43 100 100 99 5 21 85 57 100 63 71 30 55 85 47 100 15 48 0 0 11 3 100 91 49 100 28 66 55 30 26 0 0 30 50 61 95 90 8 7 59 29 100 31 91 32 46 31 1 0 0 54 1 100 0 1 100 65 92 100 39 93 9 62 0 27 31 0 60 26 19 28 6 86 100 46 83 17 56 0 28 17 1 92 0 100 21 22 16 6 100 100 58 96 20 95 0 62 28 58 66 45 55 11 17 0 5 54 87 85 100 76 71 65 47 100 21 77 0 33 5 0 22 3 52 100 12 74 0 41 12 9 66 0 100 27 98 60 79 93 0 19 76 53 100 92 81 73 40 33 13 0 0 49 5 100 6 2 14 93 0 54 52 31 24 0 2 29 4 78 44 96 100 100 5 61 100 0 72 1 42 79 43 100 67 67 90 56 45 57 0 4 10 98 0 54 7 11 51 0 90 30 100 72 66 100 18 88 0 0 93 41 100 62 75 44 39 26 3 5 0 29 19 100 28 7 97 100 45 84 0 62 2 46 48 41 100 45 58 23 21 0 4 52 87 79 100 79 75 72 49 100 29 76 8 36 0 0 7 3 100 96 2 100 0 65 61 32 37 0 19 32 68 68 64 96 8
  • 14. 18 73 62 100 53 85 53 53 52 20 0 0 8 6 100 6 1 29 100 4 77 0 54 64 53 100 69 71 47 46 24 32 0 4 0 84 3 73 30 98 100 100 90 79 73 48 61 16 59 0 7 45 100 12 79 0 52 62 40 100 56 88 55 78 27 68 0 4 14 72 5 25 39 0 81 20 100 63 75 100 30 98 0 65 0 28 96 98 97 87 95 13 100 34 64 100 45 63 0 0 18 5 0 83 28 96 63 100 72 78 58 54 50 29 65 8 100 0 2 24 96 0 61 7 16 43 0 82 11 100 48 78 86 39 100 0 0 94 33 100 52 83 64 65 77 47 100 30 89 13 52 0 3 39 60 64 100 96 84 69 41 25 12 0 15 50 0 100 4 2 98 89 53 100 12 72 0 27 37 0 86 21 100 63 92 90 0 83 95 6 100 20 65 100 38 83 0 0 12 12 55 36 95 8 3 74 33 100 52 71 33 34 3 2 0 4 51 0 100 1 2 0 79 27 93 60 100 77 80 72 54 64 28 66 4 100 0 2 9 49 42 63 82 85 100 100 76 74 51 48 29 22 0 0 1 12 100 10 90 0 56 58 43 100 65 97 70 91 35 90 0 4 36 100 3 88 0 64 54 55 100 67 73 45 46 23 29 0 4 20 57 0 20 40 0 83 23 100 62 87 100 40 88 11 53 0
  • 15. 0 87 18 95 89 100 100 79 64 41 38 0 1 10 52 24 7 0 61 29 88 51 100 43 66 43 32 23 0 11 2 100 3 1 37 67 84 100 51 80 24 41 32 0 100 4 69 28 0 13 6 24 72 50 100 61 64 33 33 0 12 29 19 64 0 100 10 2 83 74 74 100 42 73 51 36 46 0 0 12 35 41 100 54 8 18 74 49 100 53 67 31 31 0 0 13 11 59 2 100 8 2 24 100 24 76 0 45 100 48 100 57 61 65 61 31 67 0 4 24 96 34 62 72 36 37 0 15 40 0 89 50 99 100 100 5 0 66 39 83 100 100 100 82 84 62 68 41 58 20 50 0 1 31 97 100 100 25 94 12 62 48 62 94 33 60 0 0 5 5 57 94 100 100 48 82 24 48 71 64 85 31 54 0 0 1 5 87 74 63 100 46 71 87 82 100 54 88 17 40 1 0 0 9 79 98 30 90 2 53 0 10 46 0 88 27 100 70 73 100 0 0 77 34 100 82 97 72 64 39 36 4 10 48 1 100 0 2 14 100 14 92 0 65 55 55 100 72 72 53 49 27 29 0 4 0 73 27 86 73 100 100 98 89 72 83 46 82 20 85 0 1 0 87 27 100 55 87 68 68 82 50 100 32 100 13 73 0 3 79 100 27 86 0 53 9 15 53 0 95 25 100 63 76 99 0
  • 16. 87 100 56 95 71 86 87 81 94 50 100 19 53 6 0 0 9 62 83 62 75 81 100 74 86 100 53 90 18 37 0 0 16 9 10 61 35 100 69 88 41 46 0 13 10 28 53 0 100 23 2 70 100 72 97 45 57 39 13 91 0 100 39 41 44 0 11 6 70 100 54 86 29 53 23 16 69 0 100 23 50 36 0 21 6 57 87 41 78 74 38 84 0 0 7 37 48 100 81 90 100 8 11 98 0 55 52 36 45 0 17 22 11 72 42 100 100 99 5 37 80 53 100 88 83 59 60 100 44 92 15 49 0 0 8 3 0 69 47 81 88 100 100 91 91 68 76 45 71 22 68 0 1 24 100 17 56 58 34 37 0 0 23 12 59 51 85 100 93 5 54 98 17 64 0 18 50 0 93 36 100 84 54 100 19 60 0 64 100 10 99 0 71 56 77 72 71 100 37 75 8 19 0 9 100 100 93 86 73 72 57 57 40 44 23 29 10 15 0 0 1 100 99 52 100 17 70 0 32 24 0 68 16 40 45 3 28 6 44 100 20 63 22 22 63 0 100 29 95 69 47 89 0 74 0 0 83 20 100 67 96 73 74 64 51 51 30 56 9 100 0 2 54 73 37 100 0 71 49 36 76 0 19 19 53 56 100 91 8 100 100 63 100 32 78 8 53 0 23 23 0 63 8 44 32 6
  • 17. 75 100 31 92 1 55 0 10 46 0 84 31 100 73 68 99 0 87 100 49 77 19 52 0 24 25 0 83 2 100 25 45 31 6 47 100 12 70 0 41 65 43 100 49 51 69 49 33 50 0 4 9 74 38 100 53 78 30 43 0 17 27 8 63 6 100 0 2 100 94 72 100 49 93 44 64 68 53 55 29 29 13 0 0 5 0 73 40 98 58 100 55 64 58 27 24 3 43 0 100 4 1 73 100 13 64 66 49 100 93 43 70 0 28 17 0 29 34 8 13 78 49 100 65 76 38 48 4 23 0 9 54 14 100 0 2 11 95 8 55 56 35 33 0 0 25 1 65 43 92 100 100 5 33 100 2 54 0 5 62 0 100 42 91 92 32 95 4 49 0 51 100 85 98 100 80 67 67 59 43 67 17 37 1 0 0 3 21 65 9 25 40 0 79 25 100 61 87 98 40 100 0 80 0 77 100 28 90 0 50 15 10 72 0 100 33 48 45 21 11 6 100 100 64 98 36 99 34 68 59 60 62 36 32 17 0 0 5 0 100 59 97 81 66 63 32 44 0 3 25 37 34 100 39 7 18 72 25 100 24 70 22 34 17 0 0 2 51 2 100 2 1 100 93 74 100 30 74 0 44 2 10 57 0 96 23 44 33 6 28 77 40 100 49 67 29 32 0 18 32 14 66 0 100 18 2
  • 18. 100 75 62 62 54 95 93 100 98 63 81 28 46 0 0 1 9 87 67 66 100 0 79 49 45 100 10 40 0 37 40 81 78 8 0 55 20 68 65 88 100 100 76 75 51 50 28 25 11 0 1 19 90 2 64 15 24 62 0 100 30 97 71 55 100 0 92 0 0 94 60 100 98 75 93 40 76 6 48 0 34 23 100 24 7 100 100 70 89 57 74 43 59 35 45 17 29 9 14 0 0 1 86 70 51 100 0 76 78 41 100 0 0 13 40 54 98 80 8 100 100 56 89 22 59 0 26 24 0 77 11 77 39 22 36 6 0 92 44 100 71 83 56 59 100 47 89 19 50 0 3 1 3 29 97 59 100 46 72 14 58 0 43 32 27 64 9 100 0 2 19 78 40 100 54 75 31 45 0 19 26 9 62 0 100 13 2 12 87 0 77 35 97 100 100 98 78 81 43 73 6 72 0 7 81 85 34 100 40 66 60 30 26 0 0 22 47 51 100 78 8 13 91 18 54 66 40 37 0 5 29 0 81 44 99 100 100 5 25 100 16 73 0 44 57 40 100 54 88 58 65 29 51 0 4 23 100 0 81 25 48 100 44 96 80 85 68 76 28 65 0 4 73 100 23 90 70 82 77 95 91 60 100 24 60 0 0 2 9 82 88 35 100 0 69 48 36 79 0 24 15 50 54 100 86 8
  • 19. 64 65 100 100 41 85 67 42 64 0 0 16 20 59 81 74 8 0 54 47 78 69 100 53 68 33 35 0 6 31 0 100 7 1 34 99 9 67 52 42 35 0 0 4 19 62 52 97 100 100 5 48 73 27 86 0 48 7 5 53 0 91 27 100 71 66 100 0 0 74 19 98 60 100 46 66 22 34 15 0 59 0 100 11 2 41 93 88 100 86 75 47 53 0 38 5 25 50 10 100 0 2 0 98 49 100 64 89 47 44 42 0 8 37 48 49 100 51 7 0 100 81 100 68 62 34 26 24 0 92 28 100 50 5 46 7 2 88 37 76 87 100 0 93 48 81 95 70 87 34 100 0 9 77 96 27 100 0 67 3 27 42 0 89 12 100 52 88 90 0 100 100 60 90 32 70 11 48 0 23 16 0 44 12 8 6 6 28 69 43 100 77 86 60 45 29 9 0 1 52 0 100 6 2 0 87 42 100 100 94 87 73 67 53 64 32 69 11 22 0 3 86 100 38 76 8 48 0 20 50 0 100 18 74 45 8 57 6 100 95 78 100 28 72 0 39 1 4 71 0 88 32 11 41 6 100 100 74 90 28 68 0 44 77 46 72 48 37 23 9 0 4 96 100 51 76 17 50 0 20 41 0 100 16 73 39 4 33 6 0 86 52 100 100 80 99 36 65 0 26 3 34 38 90 49 7
  • 20. 73 100 24 85 0 39 22 0 70 20 100 62 78 99 31 76 0 1 77 80 74 75 100 0 84 38 66 100 76 87 38 88 0 9 23 63 0 84 47 100 98 90 100 66 81 43 51 21 19 0 9 17 82 50 100 86 86 56 57 97 46 100 17 51 0 0 6 3 100 100 64 78 33 56 13 32 3 8 54 0 54 17 0 9 6 65 100 33 80 12 57 0 35 6 12 52 0 100 13 58 19 6 100 93 38 100 21 67 85 34 62 0 0 20 50 57 88 93 8 14 96 87 100 21 96 22 58 70 65 100 28 54 0 0 17 5 16 86 44 100 35 59 12 25 0 4 33 3 66 1 100 0 2 100 100 83 96 67 80 50 64 37 48 20 32 7 16 0 0 1 0 89 29 100 66 87 70 66 84 46 100 26 75 8 25 0 3 84 96 0 100 28 66 100 36 68 0 2 21 46 60 88 95 8 10 68 35 100 59 72 37 30 0 3 15 14 58 2 100 0 2 24 100 31 56 45 16 16 0 0 43 15 81 57 87 100 88 5 16 86 0 43 25 1 68 0 100 35 90 85 50 100 13 75 0 53 85 60 100 57 67 32 39 0 15 29 5 69 0 100 24 2 94 100 50 77 17 49 5 16 50 0 100 14 57 31 0 24 6 71 98 76 100 39 75 0 51 39 36 100 49 76 26 86 0 4
  • 21. 0 84 54 100 100 79 95 42 69 8 29 0 28 26 90 30 7 46 100 38 76 0 48 47 48 100 67 91 64 70 31 44 0 4 95 75 42 100 14 74 80 39 73 0 0 20 47 59 100 84 8 38 100 6 73 0 41 71 37 100 67 80 63 49 32 21 0 4 100 100 58 80 26 58 0 35 0 11 61 0 74 12 16 6 6 0 82 46 75 97 100 27 97 45 81 100 79 88 39 78 0 9 57 93 18 71 0 34 19 0 64 4 96 34 100 73 69 100 0 88 83 71 100 44 78 86 77 100 64 87 21 46 1 0 0 9 96 36 83 81 42 100 9 65 0 20 42 0 88 20 100 62 0 0 91 27 100 31 62 16 26 10 0 40 3 70 7 100 8 2 27 94 1 60 0 20 38 0 81 16 100 53 92 93 51 100 0 97 82 68 100 42 69 44 32 23 0 0 24 42 49 100 61 8 10 100 0 77 30 60 73 55 100 71 77 53 64 27 57 0 4 0 62 47 88 67 100 63 65 59 29 46 2 34 0 100 0 1 100 100 58 91 24 69 2 42 0 12 39 0 49 26 4 37 6 7 98 58 100 90 70 71 27 41 0 0 27 50 37 100 35 7 79 89 100 100 79 83 57 67 36 50 18 34 7 17 0 0 1 12 64 57 46 46 0 0 3 44 41 100 74 90 100 25 79 8
  • 22. 0 53 34 82 45 100 43 65 50 30 40 0 37 2 100 7 1 11 64 23 100 52 84 34 45 5 10 0 0 50 3 100 5 2 95 79 73 100 61 72 98 95 100 55 84 16 36 0 0 1 9 0 50 32 76 60 100 63 64 62 29 30 6 40 1 100 0 1 0 95 54 100 66 90 55 46 51 0 18 16 45 27 100 29 7 0 75 15 100 47 99 42 69 31 39 30 9 63 0 100 1 2 9 74 32 100 63 84 48 48 12 19 0 13 49 4 100 0 2 62 81 22 80 0 38 23 0 71 4 100 43 84 88 40 100 0 21 66 0 28 27 0 77 14 100 49 88 88 40 100 6 70 0 0 89 58 100 88 87 60 44 32 0 22 3 39 33 100 40 7 2 91 0 56 28 21 43 0 39 33 76 65 100 100 37 96 8 26 83 72 100 84 69 56 45 100 47 87 15 36 0 0 24 3 4 63 28 100 35 82 28 37 0 6 2 10 51 7 100 0 1 24 78 56 100 96 83 77 53 100 39 97 10 46 0 0 18 3 0 99 54 100 78 72 73 39 71 6 48 0 45 14 100 16 7 25 100 1 63 0 21 41 0 87 16 100 57 74 93 25 89 0 2 76 35 100 76 86 57 52 18 26 0 14 51 11 100 0 2 36 84 81 100 97 70 52 46 96 33 100 5 45 0 0 18 3
  • 23. 77 93 35 77 83 37 72 0 0 18 37 60 100 94 75 100 8 4 87 64 61 56 21 0 0 47 36 100 70 99 100 19 78 8 22 95 97 100 100 98 18 95 32 70 100 47 72 0 0 16 5 100 100 77 87 57 72 40 58 26 45 14 30 3 14 0 0 1 21 90 68 100 69 67 56 47 100 37 80 3 31 0 0 28 3 29 94 91 100 60 92 34 70 72 65 100 31 60 0 0 13 5 28 86 38 57 91 37 57 1 0 0 8 62 42 98 100 100 5 100 100 64 81 35 60 13 37 0 14 31 0 53 21 5 24 6 59 93 14 69 0 33 24 0 78 12 100 47 85 83 36 100 0 43 100 0 73 6 44 90 41 100 54 56 68 52 34 62 0 4 49 100 16 85 0 64 20 47 88 51 100 43 84 22 71 0 4 0 96 43 100 76 92 54 48 36 0 21 13 56 32 100 36 7 100 100 51 81 18 54 0 24 29 0 89 11 84 36 23 28 6 30 73 81 71 82 100 33 91 81 68 100 35 55 9 0 0 9 35 100 27 68 0 37 65 42 100 60 100 66 96 32 96 0 4 100 100 57 85 20 57 0 27 26 0 90 8 81 34 14 36 6 84 100 55 81 32 58 20 33 30 9 100 6 52 13 0 0 6 17 86 68 100 71 70 57 60 100 41 91 7 35 0 0 19 3
  • 24. 99 89 26 100 27 68 83 32 40 0 0 27 63 61 100 91 8 0 70 18 97 76 100 92 74 66 36 54 0 100 26 58 33 7 7 67 62 39 100 8 38 0 24 33 57 67 74 100 0 91 8 72 100 1 75 0 42 100 38 99 66 65 83 61 42 64 0 4 31 56 100 80 48 100 0 67 61 52 98 71 63 33 24 0 9 49 80 46 69 65 27 30 0 0 33 49 67 100 100 27 99 8 0 89 33 100 49 54 39 6 16 0 10 36 55 35 100 31 7 6 75 36 97 92 100 69 75 66 51 100 30 54 12 0 0 3 70 97 16 84 0 49 12 14 62 0 95 29 100 65 92 100 0 32 100 86 86 100 56 81 27 46 0 0 17 38 34 98 47 7 48 84 99 100 100 94 53 74 48 44 90 26 55 0 0 1 5 11 100 8 63 44 36 37 0 0 21 1 59 46 84 100 91 5 0 92 28 100 67 74 70 35 48 0 5 24 45 34 100 34 7 0 97 51 100 65 88 46 44 42 0 9 29 40 34 100 40 7 39 88 0 66 68 60 68 15 8 0 19 47 31 95 100 100 5 100 81 54 100 0 72 43 36 66 0 26 24 67 61 95 91 8 100 100 55 89 17 61 0 29 28 0 94 6 94 33 26 34 6 14 85 54 100 100 96 72 72 87 41 92 10 47 0 0 3 3
  • 25. 17 100 21 85 0 53 45 47 96 57 92 61 98 28 100 0 4 0 95 41 100 59 67 51 27 40 0 12 32 52 47 100 55 7 25 70 40 100 68 81 47 46 18 14 0 0 53 3 100 12 2 41 100 58 60 70 19 1 0 0 35 60 65 100 95 25 84 8 67 100 27 73 4 41 6 6 60 0 100 24 52 37 0 22 6 53 92 100 100 66 94 40 66 49 39 87 18 48 0 0 4 5 81 80 53 100 43 73 87 88 100 59 88 16 46 0 0 0 9 0 86 42 100 84 84 83 42 78 0 45 15 49 41 100 48 7 0 88 45 100 81 79 80 43 72 7 58 0 47 23 100 24 7 56 97 24 69 100 58 96 17 25 0 5 42 0 85 75 100 5 30 100 21 86 0 58 32 36 80 43 100 61 91 30 89 0 4 31 100 2 56 12 3 60 0 100 35 91 85 42 90 0 60 0 41 93 32 64 32 23 0 0 0 32 51 56 100 82 58 100 8 4 64 27 100 31 83 26 39 0 8 5 3 52 2 100 0 1 0 74 68 69 90 100 13 91 42 70 100 77 83 39 79 0 9 0 100 46 98 95 82 95 41 84 0 49 9 45 22 100 28 7 47 100 31 76 0 45 63 50 100 64 92 61 94 28 96 0 4 14 90 65 100 100 84 57 65 71 53 91 26 56 3 0 0 3
  • 26. 0 91 25 63 86 33 75 0 14 11 53 43 100 75 75 100 8 53 100 16 78 0 47 59 38 100 63 86 58 58 29 29 0 4 24 61 45 100 90 99 68 54 29 17 0 14 51 0 100 5 2 20 82 71 100 100 96 41 87 10 71 62 48 54 0 0 0 5 100 91 75 100 47 79 39 45 73 40 78 13 41 0 0 0 5 18 75 51 100 65 72 41 35 8 3 0 0 50 6 100 15 2 13 96 0 71 78 61 82 12 7 0 4 49 15 97 100 100 5 74 100 47 84 0 66 23 53 84 42 100 44 60 23 33 0 4 0 67 44 80 88 100 100 88 88 66 69 44 50 22 50 0 1 100 77 64 61 9 74 54 100 100 85 91 51 59 19 0 0 9 72 74 63 100 0 78 67 42 100 0 15 4 38 47 … For your information, you need to implement Multi-Class (multi-nomial) Logistic Regression using one-vs-all method in Assignment-2. Please see the lecture slides for more information on one-vs-all method. All three datasets of UCI Datasets have more than two classes, so datasets are applicable for Multi-Class Logistic Regression. Another reminder (as announced several times in the class): please do not use any library functions (other than Numpy and Pandas) for your implementation. Please let me know if you have any questions. Thank you.