We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a693b4 commit c4ef04bCopy full SHA for c4ef04b
examples/src/main/r/ml/glm.R
@@ -56,6 +56,15 @@ summary(binomialGLM)
56
# Prediction
57
binomialPredictions <- predict(binomialGLM, binomialTestDF)
58
head(binomialPredictions)
59
+
60
+# Fit a generalized linear model of family "tweedie" with spark.glm
61
+training3 <- read.df("data/mllib/sample_multiclass_classification_data.txt", source = "libsvm")
62
+tweedieDF <- transform(training3, label= training3$label * exp(randn(10)))
63
+tweedieGLM <- spark.glm(tweedieDF, label ~ features, family = "tweedie",
64
+ var.power = 1.2, link.power = 0)
65
66
+# Model summary
67
+summary(tweedieGLM)
68
# $example off$
69
70
sparkR.session.stop()
0 commit comments