zhengruifeng opened a new pull request, #594:
URL: https://github.com/apache/spark-connect-rust/pull/594

   ### What changes were proposed in this pull request?
   
   Add `spark_connect::ml::GeneralizedLinearRegression` and its fitted model, 
plus the native Python estimator at 
`pyspark.ml.connect.regression.GeneralizedLinearRegression` (also exported from 
`pyspark.ml.connect`).
   
   The estimator supports all 16 PySpark constructor parameters, typed Rust 
setters/getters, named Python setters, and Spark Connect fitting. Fitted models 
produce DataFrame predictions and the optional `linkPredictionCol`, using the 
shared cached-model ownership and session checks. Add official parameter 
goldens, numerical tests, CI wiring and compatibility documentation.
   
   ### Why are the changes needed?
   
   The native ML APIs lack generalized linear regression. This enables 
Gaussian, binomial, Poisson, Gamma and Tweedie regression, including instance 
weights, offsets and L2 regularization, through Spark's JVM implementation.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Rust and native Python users can construct, configure, fit and 
transform with `GeneralizedLinearRegression`. Unset optional parameters 
preserve Spark's family-dependent defaults. Python `fit` returns the existing 
native `MLModel`.
   
   This addition covers estimator construction, parameters, fitting and 
DataFrame transforms. Coefficient/intercept access, summaries, evaluation, 
persistence and single-vector prediction remain outside this native API.
   
   ### How was this patch tested?
   
   - 643 Rust unit tests passed; all integration tests compile with and without 
`wasm-udf`.
   - Five live Rust tests and the official PySpark parameter golden passed 
against Spark 4.3.0.
   - The same 22 numerical cases passed with official PySpark and the native 
Python client, covering all five families, default/explicit links, dense/sparse 
vectors, offsets, weights, regularization, independent models, lazy predictions 
and rejected inputs. Two shared model-lifetime/session tests also passed (24 
native live tests total).
   - 2,087 Python offline tests passed, with 8 skips and 14 passing subtests. 
The native constructor order/defaults and all 16 named setters match official 
PySpark; the SQL API introspection check found zero missing public members 
beyond the documented transport-internal exclusions.
   - Official Spark 4.3 Connect transport suite: 2,638 passed, 589 skipped 
across 87 files; zero unexpected failures.
   - `cargo fmt`, Ruff lint/format and whitespace checks passed. Clippy passed 
for the core library and new Rust test targets. Workspace/Python Clippy still 
reports errors at code unchanged from the base commit; no reported error site 
is changed by this PR.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-6)
   
   This pull request and its description were written by Isaac.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to