Skip to content

Instantly share code, notes, and snippets.

Oral Exam of PML

Here is the complete list of oral exam questions along with their answers:

Chapter 2: Empirical Risk Minimization and PAC Learning

1. Introduce the Empirical Risk Minimization (ERM) principle

The Empirical Risk Minimization (ERM) involves finding the best hypothesis from a given hypothesis class in order to minimize the empirical risk (or training error), which is the average loss over a training set.
Formally, for a hypothesis class $ \mathcal{H}={h: X\rightarrow Y}$ and a loss function $\ell(x,y,h) $, the empirical risk for a hypothesis $ h $ on a training set ${(x_i, y_i)\}_{i=1}^n $ is given by:

@dododevs
dododevs / macbook-air-13-sd.md
Created February 15, 2021 18:43
Macbook Air 13" 6,2 (mid 2013) SD Card Reader on Linux

Macbook Air 13" 6,2 (mid-2013) SD Card Reader on Linux

The problem

Macbook Air 6,2's hardware comes with a decently annoying issue: the processor's southbridge (codenamed Lynx Point) has a problem with the internal SD card reader (with USB 3.0 devices in general) which makes it unusable after returning from S3 state (suspend-to-ram). The device spontaneously detaches and doesn't appear to come back on when the system resumes. More on that on Wikipedia.

On Mac OS X and macOS the issue doesn't seem to be present - the driver probably takes care of it - but Linux distributions don't currently have a viable solution.

However, there is a workaround.

The workaround

@dododevs
dododevs / headead.txt
Created January 9, 2021 01:47
Headead Privacy Policy
Il normale funzionamento dell'app Headead non richiede accettazione di particolari privacy policy. L'app non memorizza né
diffonde dati personali, account, dati della SIM, dati sul posizionamento e database dell'utente.
Tutti i dati rimangono di proprietà esclusiva dell'utente.
@dododevs
dododevs / expect_demo.sh
Last active July 21, 2019 16:32
The magic of the expect command on Linux
#!/usr/bin/env expect
spawn bluetoothctl # start the process you want to talk with
expect -re {\[bluetooth\]} # wait for a particular input to come in based on the regex
send "default-agent" # generate whatever output and send it to the process
send "\n"
interact # drop to an interactive session with the open process