Question: Q- Implement the logistic discrimination algorithm for multiple classes (see Figure 10.8 in Alpaydin book, or LD Algorithm for Multiple Classes). Test out your algorithm
Q- Implement the logistic discrimination algorithm for multiple classes (see Figure 10.8 in Alpaydin book, or LD Algorithm for Multiple Classes). Test out your algorithm over hw1 q3 data.csv dataset (see D2L) which has 214 instances, nine features and six class labels. Compare your results with sklearn libraries logistic regression function. Hint: Link to the documentation for sklearn LogisticRegression classifier is below https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html Sample function call with required arguments and the output is provided below.
weighted_F1, macro_F1 = run_logistic_discrimination("hw1_q3_data.csv") # based on Figure 10.8 in Alpaydin book weighted_F1, macro_F1 = run_logistic_regression("hw1_q3_data.csv") # based on sklearn function, model configuration/hyperparameters can be selected freely
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
