wut-compare scripts
parent
0ab498a879
commit
170fd6a131
|
@ -28,6 +28,8 @@ Learning/Testing, results are inaccurate.
|
|||
The following scripts are in the repo:
|
||||
|
||||
* `wut` --- Feed it an observation ID and it returns if it is a "good", "bad", or "failed" observation.
|
||||
* `wut-compare` --- Compare an observation IDs' presumably human vetting with a `wut` vetting.
|
||||
* `wut-compare-all` --- Compare all the observations in `download/` with `wut` vettings.
|
||||
* `wut-dl-sort` --- Populate `data/` dir with waterfalls from `download/`.
|
||||
* `wut-ml` --- Main machine learning Python script using Tensorflow and Keras.
|
||||
* `wut-obs` --- Download the JSON for an observation ID.
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
# wut-compare
|
||||
#
|
||||
# Check the results of a prediction against vetted results
|
||||
#
|
||||
# Usage:
|
||||
# wut-compare [Observation ID]
|
||||
# Example:
|
||||
# wut-compare 1468165
|
||||
#
|
||||
|
||||
OBSID="$1"
|
||||
|
||||
# Download observation
|
||||
./wut-water $OBSID
|
||||
|
||||
# Get previous rating
|
||||
VET=`cat download/$OBSID/$OBSID.json | jq --compact-output '.[0] | {vetted_status}' | cut -f 2 -d ":" | sed -e 's/}//g' -e 's/"//g'`
|
||||
echo "Vetted Status: $VET"
|
||||
|
||||
# Get Machine Learning Result
|
||||
./wut $OBSID
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
# wut-compare-all
|
||||
#
|
||||
# Check the results of a prediction against vetted results.
|
||||
# Uses all files in download directory
|
||||
#
|
||||
# Usage:
|
||||
# wut-compare-all
|
||||
# Example:
|
||||
# wut-compare-all
|
||||
#
|
||||
|
||||
MAIN_DIR=`pwd`
|
||||
|
||||
cd download/ || exit
|
||||
|
||||
GOOD_SCORE=0
|
||||
BAD_SCORE=0
|
||||
for OBSID in *
|
||||
do
|
||||
echo -n "$OBSID "
|
||||
cd $MAIN_DIR
|
||||
# Get previous rating
|
||||
VET=`cat download/$OBSID/$OBSID.json | jq --compact-output '.[0] | {vetted_status}' | cut -f 2 -d ":" | sed -e 's/}//g' -e 's/"//g'`
|
||||
echo -n "Vet: $VET "
|
||||
|
||||
# Get Machine Learning Result
|
||||
WUT_VET=`./wut $OBSID | cut -f 2 -d " "`
|
||||
echo -n "Wut: $WUT_VET "
|
||||
if [ $VET = $WUT_VET ] ; then
|
||||
let GOOD_SCORE=$GOOD_SCORE+1
|
||||
else
|
||||
let BAD_SCORE=$BAD_SCORE+1
|
||||
fi
|
||||
echo "SCORE: Good $GOOD_SCORE, Bad $BAD_SCORE"
|
||||
done
|
||||
|
Loading…
Reference in New Issue