This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.spark.ml.Pipeline | |
import org.apache.spark.ml.PipelineStage | |
import org.apache.spark.ml.Transformer | |
import org.apache.spark.ml.classification.LogisticRegression | |
import org.apache.spark.ml.feature.LabeledPoint | |
import org.apache.spark.ml.linalg.DenseVector | |
import org.apache.spark.ml.linalg.Vectors | |
import org.apache.spark.ml.param.ParamMap | |
import org.apache.spark.sql.Dataset | |
import org.apache.spark.sql.Row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark.sql import SparkSession | |
from pyspark.sql.functions import * | |
from pyspark.sql import Row | |
from pyspark.sql.types import IntegerType | |
# Create the Spark session | |
spark = SparkSession.builder \ | |
.master("local") \ | |
.config("spark.sql.autoBroadcastJoinThreshold", -1) \ | |
.config("spark.executor.memory", "500mb") \ |
OlderNewer