Github user feynmanliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4716#discussion_r39896288
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/stat/test/StreamingTest.scala ---
    @@ -0,0 +1,145 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.mllib.stat.test
    +
    +import org.apache.spark.Logging
    +import org.apache.spark.annotation.{Experimental, Since}
    +import org.apache.spark.streaming.dstream.DStream
    +import org.apache.spark.util.StatCounter
    +
    +/**
    + * :: Experimental ::
    + * Performs online 2-sample significance testing for a stream of (Boolean, 
Double) pairs. The
    + * Boolean identifies which sample each observation comes from, and the 
Double is the numeric value
    + * of the observation.
    + *
    + * To address novelty affects, the `peacePeriod` specifies a set number of 
initial
    + * [[org.apache.spark.rdd.RDD]] batches of the [[DStream]] to be dropped 
from significance testing.
    + *
    + * The `windowSize` sets the number of batches each significance test is 
to be performed over. The
    + * window is sliding with a stride length of 1 batch. Setting windowSize 
to 0 will perform
    + * cumulative processing, using all batches seen so far.
    + *
    + * Different tests may be used for assessing statistical significance 
depending on assumptions
    + * satisfied by data. For more details, see [[StreamingTestMethod]]. The 
`testMethod` specifies
    + * which test will be used.
    + *
    + * Use a builder pattern to construct a streaming test in an application, 
for example:
    + *   ```
    + *   val model = new OnlineABTest()
    + *     .setPeacePeriod(10)
    + *     .setWindowSize(0)
    + *     .setTestMethod("welch")
    + *     .registerStream(DStream)
    + *   ```
    + */
    +@Experimental
    +@Since("1.6.0")
    +class StreamingTest(
    +    @Since("1.6.0") var peacePeriod: Int = 0,
    --- End diff --
    
    OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to