@Override
    public float predict(float[] unseen) {
        // please ensure the unseen in size consistent with theta1

        int i, j;
        int m = this.Theta1.length;
        int n = this.Theta1[0].length;
        float[] hh = new float[m + 1];// hidden unit summation
        hh[0] = 1;
        for (i = 0; i < m; i++) {
            double h = 0;
            for (j = 0; j < n; j++) {
                h += this.Theta1[i][j] * unseen[j];
            }
            // apply sigmoid
            h = 1.0 / (1.0 + Math.exp(-h));
            hh[i + 1] = (float) h;
        }

        m = this.Theta2.length;
        n = this.Theta2[0].length;
        float[] oo = new float[m];
        for (i = 0; i < m; i++) {
            double o = 0;
            for (j = 0; j < n; j++) {
                o += this.Theta2[i][j] * hh[j];
            }
            // apply sigmoid
            o = 1.0 / (1.0 + Math.exp(-o));
            oo[i] = (float) o;
        }

        return oo[0];
    }
The given input vector of unseen is m=(256 + 1) * n= 1 this returns a
prediction probability
tika-core/src/main/java/org/apache/tika/detect/NNTrainedModel.java