本文整理汇总了Scala中org.apache.spark.mllib.stat.MultivariateOnlineSummarizer类的典型用法代码示例。如果您正苦于以下问题:Scala MultivariateOnlineSummarizer类的具体用法?Scala MultivariateOnlineSummarizer怎么用?Scala MultivariateOnlineSummarizer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MultivariateOnlineSummarizer类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。
示例1: KryoRegistrator
//设置package包名称以及导入依赖的类
package com.github.leifker.spark.util
import com.datastax.spark.connector.{CassandraRow, CassandraRowMetadata}
import com.esotericsoftware.kryo.Kryo
import com.github.leifker.cassandra.config.{CassandraConfig, KeyspaceConfig}
import com.github.leifker.spark.sentiment.Review
import org.apache.spark.mllib.stat.MultivariateOnlineSummarizer
import org.apache.spark.serializer.{KryoRegistrator => SparkKryoRegistrator}
class KryoRegistrator extends SparkKryoRegistrator {
override def registerClasses(kryo: Kryo) {
kryo.register(Class.forName("scala.math.Ordering$$anon$9"))
kryo.register(Class.forName("scala.math.Ordering$$anonfun$by$1"))
kryo.register(Class.forName("org.apache.spark.ml.feature.CountVectorizer$$anonfun$6"))
kryo.register(Class.forName("org.apache.spark.ml.classification.MultiClassSummarizer"))
kryo.register(Class.forName("org.apache.spark.ml.classification.LogisticAggregator"))
kryo.register(Class.forName("org.apache.spark.mllib.evaluation.binary.BinaryLabelCounter"))
kryo.register(Class.forName("[Lorg.apache.spark.mllib.evaluation.binary.BinaryLabelCounter;"))
kryo.register(Class.forName("scala.reflect.ClassTag$$anon$1"))
kryo.register(Class.forName("[[B"))
kryo.register(classOf[Class[_]])
kryo.register(scala.math.Ordering.Long.getClass)
kryo.register(classOf[MultivariateOnlineSummarizer])
kryo.register(classOf[Review])
kryo.register(classOf[CassandraConfig])
kryo.register(classOf[KeyspaceConfig])
kryo.register(classOf[Array[CassandraRow]])
kryo.register(classOf[CassandraRow])
kryo.register(classOf[CassandraRowMetadata])
kryo.register(classOf[scala.collection.mutable.WrappedArray.ofRef[_]])
kryo.register(classOf[Array[Object]])
kryo.register(classOf[Array[Double]])
}
}