Java Code Examples for org.apache.parquet.example.data.simple.SimpleGroup#getDouble()
The following examples show how to use
org.apache.parquet.example.data.simple.SimpleGroup#getDouble() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SparkModelParser.java From ignite with Apache License 2.0 | 6 votes |
/** * Form the node data according data in parquet row. * * @param g The given group presenting the node data from Spark DT model. */ @NotNull private static SparkModelParser.NodeData extractNodeDataFromParquetRow(SimpleGroup g) { NodeData nodeData = new NodeData(); nodeData.id = g.getInteger(0, 0); nodeData.prediction = g.getDouble(1, 0); nodeData.leftChildId = g.getInteger(5, 0); nodeData.rightChildId = g.getInteger(6, 0); if (nodeData.leftChildId == -1 && nodeData.rightChildId == -1) { nodeData.featureIdx = -1; nodeData.threshold = -1; nodeData.isLeafNode = true; } else { final SimpleGroup splitGrp = (SimpleGroup)g.getGroup(7, 0); nodeData.featureIdx = splitGrp.getInteger(0, 0); nodeData.threshold = splitGrp.getGroup(1, 0).getGroup(0, 0).getDouble(0, 0); } return nodeData; }
Example 2
Source File: SparkModelParser.java From ignite with Apache License 2.0 | 5 votes |
/** * Read interceptor value from parquet. * * @param g Interceptor group. */ private static double readInterceptor(SimpleGroup g) { double interceptor; final SimpleGroup interceptVector = (SimpleGroup)g.getGroup(2, 0); final SimpleGroup interceptVectorVal = (SimpleGroup)interceptVector.getGroup(3, 0); final SimpleGroup interceptVectorValElement = (SimpleGroup)interceptVectorVal.getGroup(0, 0); interceptor = interceptVectorValElement.getDouble(0, 0); return interceptor; }
Example 3
Source File: SparkModelParser.java From ignite with Apache License 2.0 | 2 votes |
/** * Read interceptor value from parquet. * * @param g Interceptor group. */ private static double readSVMInterceptor(SimpleGroup g) { return g.getDouble(1, 0); }
Example 4
Source File: SparkModelParser.java From ignite with Apache License 2.0 | 2 votes |
/** * Read interceptor value from parquet. * * @param g Interceptor group. */ private static double readLinRegInterceptor(SimpleGroup g) { return g.getDouble(0, 0); }