This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Make some metric validation data | |
| # Random predictions (AUC = 0.5) | |
| awk -v n_lines=499999 'BEGIN {for (i=0; i<n_lines; i++) {print int(rand()>0.5),rand()}}' > label_pred | |
| # Always correct predictions (AUC = 1) | |
| awk -v n_lines=499999 'BEGIN {for (i=0; i<n_lines; i++) {label=rand(); print int(label>0.5),label}}' > label_pred | |
| # Correct half the time, random and incorrect otherwise (AUC = 0.75) | |
| awk -v n_lines=499999 'BEGIN {for (i=0; i<n_lines; i++) {label=rand(); r=rand(); r>0.5 ? pred=label : pred=r; print int(label>0.5),pred}}' > label_pred | |
| # model output from file called "predictions" with labels "labels" | |
| paste -d' ' labels predictions > label_pred |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # based on https://www.instructables.com/Portable-Raspberry-Pi-Geiger-Counter-With-Display/ | |
| # geiger.py gets data from Mighty Ohm Geiger Counter and writes to a file geiger.dat on Raspberry Pi | |
| import time | |
| import datetime | |
| import string | |
| import signal | |
| import re | |
| import serial | |
| import os |
OlderNewer