# Note

## Download pegasos:
Please run the following commands:

```
bash get_pegasos.sh
```

## How to Install PEGASOS for Experiments
Pegasos uses the SVMLight format and only reads labels in the set ${-1, 1}$. However, some datasets, such as KDD2012, may use 0 for the negative class label.


To modify Pegasos to work with such datasets, please follow these instructions:


1. In the ReadData function of pegasos_optimize.cc (line 546), add the following code to adjust the labels:
```
+ if(label == 0 )
+    label = 2*label-1;
```

After modifying the file, compile Pegasos with the following command:
```
make 
```

## Issue

When running Pegasos with your datasets, if the number of iterations (iter) is large—such as the default value of 100/lambda and lambda is typically very small for large datasets, it can cause an integer overflow.

Please ensure that the iter value you provide does not lead to this issue.


