Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
5e71354c
Commit
5e71354c
authored
11 years ago
by
Tor Myklebust
Browse files
Options
Downloads
Patches
Plain Diff
Fix copypasta in __init__.py. Don't import anything directly into pyspark.mllib.
parent
02208a17
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/pyspark/mllib/__init__.py
+8
-26
8 additions, 26 deletions
python/pyspark/mllib/__init__.py
with
8 additions
and
26 deletions
python/pyspark/mllib/__init__.py
+
8
−
26
View file @
5e71354c
...
...
@@ -16,31 +16,13 @@
#
"""
PySpark is the Python API for Spark.
Public classes:
- L{SparkContext<pyspark.context.SparkContext>}
Main entry point for Spark functionality.
- L{RDD<pyspark.rdd.RDD>}
A Resilient Distributed Dataset (RDD), the basic abstraction in Spark.
- L{Broadcast<pyspark.broadcast.Broadcast>}
A broadcast variable that gets reused across tasks.
- L{Accumulator<pyspark.accumulators.Accumulator>}
An
"
add-only
"
shared variable that tasks can only add values to.
- L{SparkFiles<pyspark.files.SparkFiles>}
Access files shipped with jobs.
- L{StorageLevel<pyspark.storagelevel.StorageLevel>}
Finer-grained cache persistence levels.
Python bindings for MLlib.
"""
import
sys
import
os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
environ
[
"
SPARK_HOME
"
],
"
python/lib/py4j0.7.egg
"
))
from
pyspark.mllib.regression
import
LinearRegressionModel
,
LassoModel
,
RidgeRegressionModel
,
LinearRegressionWithSGD
,
LassoWithSGD
,
RidgeRegressionWithSGD
from
pyspark.mllib.classification
import
LogisticRegressionModel
,
SVMModel
,
LogisticRegressionWithSGD
,
SVMWithSGD
from
pyspark.mllib.recommendation
import
MatrixFactorizationModel
,
ALS
from
pyspark.mllib.clustering
import
KMeansModel
,
KMeans
__all__
=
[
"
LinearRegressionModel
"
,
"
LassoModel
"
,
"
RidgeRegressionModel
"
,
"
LinearRegressionWithSGD
"
,
"
LassoWithSGD
"
,
"
RidgeRegressionWithSGD
"
,
"
LogisticRegressionModel
"
,
"
SVMModel
"
,
"
LogisticRegressionWithSGD
"
,
"
SVMWithSGD
"
,
"
MatrixFactorizationModel
"
,
"
ALS
"
,
"
KMeansModel
"
,
"
KMeans
"
]
#from pyspark.mllib.regression import LinearRegressionModel, LassoModel, RidgeRegressionModel, LinearRegressionWithSGD, LassoWithSGD, RidgeRegressionWithSGD
#from pyspark.mllib.classification import LogisticRegressionModel, SVMModel, LogisticRegressionWithSGD, SVMWithSGD
#from pyspark.mllib.recommendation import MatrixFactorizationModel, ALS
#from pyspark.mllib.clustering import KMeansModel, KMeans
#
#
#__all__ = ["LinearRegressionModel", "LassoModel", "RidgeRegressionModel", "LinearRegressionWithSGD", "LassoWithSGD", "RidgeRegressionWithSGD", "LogisticRegressionModel", "SVMModel", "LogisticRegressionWithSGD", "SVMWithSGD", "MatrixFactorizationModel", "ALS", "KMeansModel", "KMeans"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment