Skip to main content
. 2022 May 8;22(9):3580. doi: 10.3390/s22093580
Algorithm 1 Is Intoxicated?
  • 1:

    Input:ModelIntoxication Detection Model

  • 2:

    Input:sSoberGait Measurements while Sober

  • 3:

    Input:sSuspectSuspected Gait Measurements

  • 4:

    Input:ThresholdConfidence threshold

  • 5:

    Output:BooleanTrue/False for intoxication

  • 6:

    procedure isIntoxicated?

  • 7:

        fSober[]=features(sSober)

  • 8:

        fSuspect[]=features(sSuspect)

  • 9:

        n=length(fSober)

  • 10:

        difference[]=newarray[n]

  • 11:

        for (i=0;i<n;i++) do

  • 12:

            difference[i]=fSuspect[i]fSober[i]

  • 13:

        Probability=Model.classify(difference)

  • 14:

        return(Probability>Threshold)