April 2017
Intermediate to advanced
532 pages
12h 39m
English
The BikeSharingExecutor object can be used to choose and run the respective regression model, for example, to run LinearRegression and execute the linear regression pipeline, set the program argument as LR_<type>, where type is the data format; for other commands, refer to the following code snippet:
def executeCommand(arg: String, vectorAssembler: VectorAssembler, vectorIndexer: VectorIndexer, dataFrame: DataFrame, spark: SparkSession) = arg match { case "LR_Vectors" => LinearRegressionPipeline.linearRegressionWithVectorFormat (vectorAssembler, vectorIndexer, dataFrame) case "LR_SVM" => LinearRegressionPipeline.linearRegressionWithSVMFormat(spark) case "GLR_Vectors" => GeneralizedLinearRegressionPipeline .genLinearRegressionWithVectorFormat(vectorAssembler, ...Read now
Unlock full access