/** * <!-- writeExample(ExceptionlessOutputStream,int[],double[],int[],double[]) --> Writes an * example vector to the specified stream, with all features being written in the order they * appear in the vector. * * @param out The output stream. * @param featureIndexes The lexicon indexes of the features. * @param featureValues The values or "strengths" of the features. * @param labelIndexes The lexicon indexes of the labels. * @param labelValues The values or "strengths" of the labels. **/ public static void writeExample(ExceptionlessOutputStream out, int[] featureIndexes, double[] featureValues, int[] labelIndexes, double[] labelValues) { writeExample(out, featureIndexes, featureValues, labelIndexes, labelValues, featureIndexes.length, null); }
/** * <!-- writeExample(ExceptionlessOutputStream,int[],double[],int[],double[],int) --> Writes an * example vector to the specified stream, with all features being written in the order they * appear in the vector. * * @param out The output stream. * @param featureIndexes The lexicon indexes of the features. * @param featureValues The values or "strengths" of the features. * @param labelIndexes The lexicon indexes of the labels. * @param labelValues The values or "strengths" of the labels. * @param unpruned The number of features in the vector that aren't pruned. **/ public static void writeExample(ExceptionlessOutputStream out, int[] featureIndexes, double[] featureValues, int[] labelIndexes, double[] labelValues, int unpruned) { writeExample(out, featureIndexes, featureValues, labelIndexes, labelValues, unpruned, null); }
/** * <!-- writeExample(ExceptionlessOutputStream,int[],double[],int[],double[],Lexicon) --> Writes * an example vector contained in an object array to the underlying output stream, with features * sorted according to their representations in the given lexicon if present, or in the order * they appear in the vector otherwise. * * @param out The output stream. * @param featureIndexes The lexicon indexes of the features. * @param featureValues The values or "strengths" of the features. * @param labelIndexes The lexicon indexes of the labels. * @param labelValues The values or "strengths" of the labels. * @param lex A lexicon. **/ public static void writeExample(ExceptionlessOutputStream out, int[] featureIndexes, double[] featureValues, int[] labelIndexes, double[] labelValues, Lexicon lex) { writeExample(out, featureIndexes, featureValues, labelIndexes, labelValues, featureIndexes.length, lex); }
writeExample(eos, featureIndexes, featureValues, labelIndexes, labelValues, unpruned, lexicon);
writeExample(eos, featureIndexes, featureValues, labelIndexes, labelValues, lexicon);