Merge branch 'LoadPipelineModel' of https://github.com/Java-Cesco/Detecting_frau…
…d_clicks into feature/demo_pipe
Showing
8 changed files
with
19 additions
and
0 deletions
This diff is collapsed. Click to expand it.
decisionTree.model/metadata/.part-00000.crc
0 → 100644
No preview for this file type
decisionTree.model/metadata/_SUCCESS
0 → 100644
File mode changed
decisionTree.model/metadata/part-00000
0 → 100644
1 | +{"class":"org.apache.spark.ml.PipelineModel","timestamp":1528787042384,"sparkVersion":"2.3.0","uid":"pipeline_149a4863990b","paramMap":{"stageUids":["vecIdx_88268a92b43c","dtr_f575620c5b77"]}} |
No preview for this file type
File mode changed
1 | +{"class":"org.apache.spark.ml.feature.VectorIndexerModel","timestamp":1528787042566,"sparkVersion":"2.3.0","uid":"vecIdx_88268a92b43c","paramMap":{"handleInvalid":"error","maxCategories":2,"inputCol":"features","outputCol":"indexedFeatures"}} |
src/main/java/LoadModel.java
0 → 100644
1 | +import org.apache.spark.ml.PipelineModel; | ||
2 | +import org.apache.spark.ml.regression.DecisionTreeRegressionModel; | ||
3 | +import org.apache.spark.sql.SparkSession; | ||
4 | + | ||
5 | +public class LoadModel { | ||
6 | + public static void main(String args[]) { | ||
7 | + SparkSession spark = SparkSession | ||
8 | + .builder() | ||
9 | + .appName("Detecting Fraud Clicks") | ||
10 | + .master("local") | ||
11 | + .getOrCreate(); | ||
12 | + | ||
13 | + PipelineModel model = PipelineModel.load("decisionTree.model"); | ||
14 | +// DecisionTreeRegressionModel treeModel = (DecisionTreeRegressionModel) (model.stages()[1]); | ||
15 | +// System.out.println(treeModel.toDebugString()); | ||
16 | + } | ||
17 | +} |
-
Please register or login to post a comment