Search in sources :

Example 1 with StringDictionary

use of com.airbnb.aerosolve.core.util.StringDictionary in project aerosolve by airbnb.

the class KernelModel method loadInternal.

@Override
protected void loadInternal(ModelHeader header, BufferedReader reader) throws IOException {
    long rows = header.getNumRecords();
    dictionary = new StringDictionary(header.getDictionary());
    supportVectors = new ArrayList<>();
    for (long i = 0; i < rows; i++) {
        String line = reader.readLine();
        ModelRecord record = Util.decodeModel(line);
        supportVectors.add(new SupportVector(record));
    }
}
Also used : ModelRecord(com.airbnb.aerosolve.core.ModelRecord) SupportVector(com.airbnb.aerosolve.core.util.SupportVector) StringDictionary(com.airbnb.aerosolve.core.util.StringDictionary)

Aggregations

ModelRecord (com.airbnb.aerosolve.core.ModelRecord)1 StringDictionary (com.airbnb.aerosolve.core.util.StringDictionary)1 SupportVector (com.airbnb.aerosolve.core.util.SupportVector)1