describe {SparkR} | R Documentation |
Computes statistics for numeric columns. If no columns are given, this function computes statistics for all numerical columns.
Returns the summary of a model produced by glm() or spark.glm(), similarly to R's summary().
Returns the summary of a naive Bayes model produced by spark.naiveBayes(), similarly to R's summary().
Returns the summary of a k-means model produced by spark.kmeans(), similarly to R's summary().
Returns the summary of an AFT survival regression model produced by spark.survreg(), similarly to R's summary().
## S4 method for signature 'SparkDataFrame,character' describe(x, col, ...) ## S4 method for signature 'SparkDataFrame,ANY' describe(x) ## S4 method for signature 'SparkDataFrame' summary(object, ...) describe(x, col, ...) summary(object, ...) ## S4 method for signature 'GeneralizedLinearRegressionModel' summary(object, ...) ## S4 method for signature 'NaiveBayesModel' summary(object, ...) ## S4 method for signature 'KMeansModel' summary(object, ...) ## S4 method for signature 'AFTSurvivalRegressionModel' summary(object, ...)
x |
A SparkDataFrame to be computed. |
col |
A string of name |
... |
Additional expressions |
object |
A fitted generalized linear model |
object |
A fitted MLlib model |
object |
a fitted k-means model |
object |
a fitted AFT survival regression model |
A SparkDataFrame
coefficients the model's coefficients, intercept
a list containing 'apriori', the label distribution, and 'tables', conditional
the model's coefficients, size and cluster
coefficients the model's coefficients, intercept and log(scale).
Other SparkDataFrame functions: $
,
$<-
, select
,
select
,
select,SparkDataFrame,Column-method
,
select,SparkDataFrame,list-method
,
selectExpr
;
SparkDataFrame-class
,
dataFrame
; [
,
[[
, subset
;
agg
, agg
,
count,GroupedData-method
,
summarize
, summarize
;
arrange
, arrange
,
arrange
, orderBy
,
orderBy
, orderBy
,
orderBy
; as.data.frame
,
as.data.frame,SparkDataFrame-method
;
attach
,
attach,SparkDataFrame-method
;
cache
; collect
;
colnames
, colnames
,
colnames<-
, colnames<-
,
columns
, names
,
names<-
; coltypes
,
coltypes
, coltypes<-
,
coltypes<-
; columns
,
dtypes
, printSchema
,
schema
, schema
;
count
, nrow
;
dapply
, dapply
,
dapplyCollect
, dapplyCollect
;
dim
; distinct
,
unique
; dropDuplicates
,
dropDuplicates
; dropna
,
dropna
, fillna
,
fillna
, na.omit
,
na.omit
; drop
,
drop
; dtypes
;
except
, except
;
explain
, explain
;
filter
, filter
,
where
, where
;
first
, first
;
groupBy
, groupBy
,
group_by
, group_by
;
head
; histogram
;
insertInto
, insertInto
;
intersect
, intersect
;
isLocal
, isLocal
;
join
; limit
,
limit
; merge
,
merge
; mutate
,
mutate
, transform
,
transform
; ncol
;
persist
; printSchema
;
rbind
, rbind
,
unionAll
, unionAll
;
registerTempTable
,
registerTempTable
; rename
,
rename
, withColumnRenamed
,
withColumnRenamed
;
repartition
; sample
,
sample
, sample_frac
,
sample_frac
;
saveAsParquetFile
,
saveAsParquetFile
,
write.parquet
, write.parquet
;
saveAsTable
, saveAsTable
;
saveDF
, saveDF
,
write.df
, write.df
,
write.df
; selectExpr
;
showDF
, showDF
;
show
, show
,
show,GroupedData-method
,
show,WindowSpec-method
; str
;
take
; unpersist
;
withColumn
, withColumn
;
write.jdbc
, write.jdbc
;
write.json
, write.json
;
write.text
, write.text
## Not run: sc <- sparkR.init() sqlContext <- sparkRSQL.init(sc) path <- "path/to/file.json" df <- read.json(sqlContext, path) describe(df) describe(df, "col1") describe(df, "col1", "col2") ## End(Not run) ## Not run: model <- glm(y ~ x, trainingData) summary(model) ## End(Not run) ## Not run: model <- spark.naiveBayes(trainingData, y ~ x) summary(model) ## End(Not run) ## Not run: model <- spark.kmeans(trainingData, ~ ., 2) summary(model) ## End(Not run) ## Not run: model <- spark.survreg(trainingData, Surv(futime, fustat) ~ ecog_ps + rx) summary(model) ## End(Not run)