Apache Spark中SparkML的SVC版本支持与非线性核支持确认问询
Let's break down your questions one by one with clear confirmations and context:
Statement 1: Non-RDD-based SVM is only supported in Apache Spark 2.2.0 and above
Confirmed as correct
Before Spark 2.2.0, the DataFrame-based Spark ML library had no native SVM implementation. Only the older RDD-based MLlib offered SVM functionality. The LinearSVC class (the non-RDD SVM implementation in Spark ML) was officially introduced in Spark 2.2.0, which matches the API documentation context you referenced.
Statement 2: Current Spark ML SVM does not support non-linear classifiers with kernel functions
Confirmed as correct
Across all stable Spark versions (including the latest releases as of now), Spark ML's LinearSVC only supports linear classification. There’s no built-in support for non-linear kernel functions (like RBF or polynomial) in the non-RDD Spark ML SVM implementation. If you need non-linear SVM capabilities, you’d have to use the older RDD-based MLlib SVM (which supports some kernels) or build a custom solution.
Additional Follow-Up Answers
- Was LinearSVC missing in Apache Spark 2.1?
Yes, completely. Spark 2.1’s ML module had noLinearSVCclass—SVM functionality was only accessible via the RDD-based MLlibSVMWithSGDorSVMModel. - Does Spark 2.2 support non-linear kernel functions for SVM?
No. Spark 2.2 introducedLinearSVCbut strictly limited it to linear classification. Non-linear kernel support wasn’t added to the Spark ML implementation with this release, and hasn’t been included in subsequent versions either.
内容的提问来源于stack exchange,提问作者Romeo Kienzler

