Skip to content

This project was developed for the final examination of the course Distributed Autonomous Systems for Master's degree in Automation Engineering at the University of Bologna.

Notifications You must be signed in to change notification settings

saa-97/Distributed-Classification-via-Logistic-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed-Classification-via-Logistic-Regression

The objective is to apply a Gradient Tracking algorithm to achieve consensus optimization across multiple agents. This will demostrate how distributed systems can collaborate to determine a nonlinear classifier for data points in a feature space.

Task 1.1: Gradient Tracking Algorithm

  1. Open file task_1.1_1.2
  2. Set the variable Task1_1 to 1
  3. You can set the following parameters as you wish from the file directly:
    • NN (number of agents)
    • alpha (learning rate)
    • MAXITERS (Maximum Iterations for the update steps)
    • graph_type (you can choose which type of graph you want among the agents from the following: "cycle", "path", "star", "complete")
  4. Now run the python file

Task 1.2: Centralized Gradient Method using the logistic regression cost function

  1. Open file task_1.1_1.2
  2. Set the variable Task_1_2 to 1
  3. You can set the following parameters as you wish from the file directly:
    • mm_training (defines the size of the training dataset)
    • alpha_w (learning rate for weights)
    • alpha_b (learning rate for bias)
    • MAXITERS (Maximum Iterations for the update steps)
    • Now run the python file
  4. You can also choose the type of decision boundary in the dataset from the following:
    • ellipse (This is an elliptical boundary, set it to 1 and curve to 0 to choose this)
    • curve (This is a non-linear curved boundary, set it to 1 and ellipse to 0 to choose this)

Task 1.3: Gradient Tracking Method on the Logistic Regression Cost Function

  1. Open file task_1.3
  2. You can set the following parameters as you wish from the file directly:
    • NN (number of agents)
    • alpha (learning rate)
    • MAXITERS (Maximum Iterations for the update steps)
    • dataset_size (defines the size of the training dataset)
    • graph_type (you can choose which type of graph you want among the agents from the following: "cycle", "path", "star", "complete")
  3. You can also choose the type of decision boundary in the dataset from the following:
    • ellipse (This is an elliptical boundary, set it to 1 and curve to 0 to choose this)
    • curve (This is a non-linear curved boundary, set it to 1 and ellipse to 0 to choose this)
  4. Execute the python file

About

This project was developed for the final examination of the course Distributed Autonomous Systems for Master's degree in Automation Engineering at the University of Bologna.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages