implemented with Apache Spark
In this work, we develop a distributed least squares approximation (DLSA) method that is able to solve a large family of regression problems (e.g., linear regression, logistic regression, and Cox's model) on a distributed system. By approximating the local objective function using a local quadratic form, we are able to obtain a combined estimator by taking a weighted average of local estimators. The resulting estimator is proved to be statistically as efficient as the global estimator. Moreover, it requires only one round of communication. We further conduct shrinkage estimation based on the DLSA estimation using an adaptive Lasso approach. The solution can be easily obtained by using the LARS algorithm on the master node. It is theoretically shown that the resulting estimator possesses the oracle property and is selection consistent by using a newly designed distributed Bayesian information criterion (DBIC). The finite sample performance and the computational efficiency are further illustrated by an extensive numerical study and an airline dataset.
- The entire methodology has been implemented in a Spark system available at https://github.com/feng-li/dlsa.
- An R package
dlsaprovides the conceptual demo available at https://github.com/feng-li/dlsa_r.
-
Spark >= 2.3.1 -
Python >= 3.7.0pyarrow >= 0.15.0Please read this Compatibility issue with Spark 2.3.x or 2.4.xscikit-learn >= 0.21.2rpy2 >= 3.0.4(optional)
-
R >= 3.5(optional)lars
See
setup.pyfor detailed requirements.
Run the PySpark code on the Spark platform
./bash/spark_dlsa_run.shor simply run
./logistic_dlsa.py- Zhu, X., Li, F., & Wang, H., (2019) Least Squares Approximation for a Distributed System. Working Paper.