{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/39812017","id":39812017,"diff_hunk":"@@ -0,0 +1,447 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.apache.spark.ml.regression\n+\n+import scala.collection.mutable\n+\n+import breeze.linalg.{DenseVector => BDV}\n+import breeze.optimize.{CachedDiffFunction, DiffFunction, LBFGS => BreezeLBFGS}\n+\n+import org.apache.spark.{SparkException, Logging}\n+import org.apache.spark.annotation.{Since, Experimental}\n+import org.apache.spark.ml.{Model, Estimator}\n+import org.apache.spark.ml.param._\n+import org.apache.spark.ml.param.shared._\n+import org.apache.spark.ml.util.{SchemaUtils, Identifiable}\n+import org.apache.spark.mllib.linalg.{Vector, Vectors, VectorUDT}\n+import org.apache.spark.mllib.linalg.BLAS\n+import org.apache.spark.rdd.RDD\n+import org.apache.spark.sql.{Row, DataFrame}\n+import org.apache.spark.sql.functions._\n+import org.apache.spark.sql.types.{DoubleType, StructType}\n+import org.apache.spark.storage.StorageLevel\n+\n+/**\n+ * Params for accelerated failure time (AFT) regression.\n+ */\n+private[regression] trait AFTSurvivalRegressionParams extends Params\n+  with HasFeaturesCol with HasLabelCol with HasPredictionCol with HasMaxIter\n+  with HasTol with HasFitIntercept {\n+\n+  /**\n+   * Param for censored column name.\n+   * The value of this column could be 0 or 1.\n+   * If the value is 1, it means the event has occurred i.e. uncensored; otherwise it censored.\n+   * @group param\n+   */\n+  @Since(\"1.6.0\")\n+  final val censoredCol: Param[String] = new Param(this, \"censoredCol\", \"censored column name\")\n+\n+  /** @group getParam */\n+  @Since(\"1.6.0\")\n+  def getCensoredCol: String = $(censoredCol)\n+\n+  /**\n+   * Param for quantile probabilities array.\n+   * Values of the quantile probabilities array should be in the range [0, 1].\n+   * @group param\n+   */\n+  @Since(\"1.6.0\")\n+  final val quantileProbabilities: DoubleArrayParam = new DoubleArrayParam(this, \"quantile\",\n+    \"quantile probabilities array\", (t: Array[Double]) => t.forall(ParamValidators.inRange(0, 1)))\n+\n+  /** @group getParam */\n+  @Since(\"1.6.0\")\n+  def getQuantileProbabilities: Array[Double] = $(quantileProbabilities)\n+\n+  /** Checks whether the input has quantile probabilities array. */\n+  protected[regression] def hasQuantileProbabilities: Boolean = {\n+    isDefined(quantileProbabilities) && $(quantileProbabilities).size != 0\n+  }\n+\n+  /**\n+   * Validates and transforms the input schema with the provided param map.\n+   * @param schema input schema\n+   * @param fitting whether this is in fitting or prediction\n+   * @return output schema\n+   */\n+  protected def validateAndTransformSchema(\n+      schema: StructType,\n+      fitting: Boolean): StructType = {\n+    SchemaUtils.checkColumnType(schema, $(featuresCol), new VectorUDT)\n+    if (fitting) {\n+      SchemaUtils.checkColumnType(schema, $(censoredCol), DoubleType)\n+      SchemaUtils.checkColumnType(schema, $(labelCol), DoubleType)\n+    }\n+    SchemaUtils.appendColumn(schema, $(predictionCol), DoubleType)\n+  }\n+}\n+\n+/**\n+ * :: Experimental ::\n+ * Fit a parametric survival regression model named accelerated failure time (AFT) model\n+ * ([[https://en.wikipedia.org/wiki/Accelerated_failure_time_model]])\n+ * based on the Weibull distribution of the survival time.\n+ */\n+@Experimental\n+@Since(\"1.6.0\")\n+class AFTSurvivalRegression @Since(\"1.6.0\") (@Since(\"1.6.0\") override val uid: String)\n+  extends Estimator[AFTSurvivalRegressionModel] with AFTSurvivalRegressionParams with Logging {\n+\n+  @Since(\"1.6.0\")\n+  def this() = this(Identifiable.randomUID(\"aftSurvReg\"))\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setFeaturesCol(value: String): this.type = set(featuresCol, value)\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setLabelCol(value: String): this.type = set(labelCol, value)\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setCensoredCol(value: String): this.type = set(censoredCol, value)\n+  setDefault(censoredCol -> \"censored\")\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setPredictionCol(value: String): this.type = set(predictionCol, value)\n+\n+  /**\n+   * Set if we should fit the intercept\n+   * Default is true.\n+   * @group setParam\n+   */\n+  @Since(\"1.6.0\")\n+  def setFitIntercept(value: Boolean): this.type = set(fitIntercept, value)\n+  setDefault(fitIntercept -> true)\n+\n+  /**\n+   * Set the maximum number of iterations.\n+   * Default is 100.\n+   * @group setParam\n+   */\n+  @Since(\"1.6.0\")\n+  def setMaxIter(value: Int): this.type = set(maxIter, value)\n+  setDefault(maxIter -> 100)\n+\n+  /**\n+   * Set the convergence tolerance of iterations.\n+   * Smaller value will lead to higher accuracy with the cost of more iterations.\n+   * Default is 1E-6.\n+   * @group setParam\n+   */\n+  @Since(\"1.6.0\")\n+  def setTol(value: Double): this.type = set(tol, value)\n+  setDefault(tol -> 1E-6)\n+\n+  /**\n+   * Extract [[featuresCol]], [[labelCol]] and [[censoredCol]] from input dataset,\n+   * and put it in an RDD with strong types.\n+   */\n+  protected[ml] def extractAFTPoints(\n+      dataset: DataFrame): RDD[AFTPoint] = {\n+    dataset.select($(featuresCol), $(labelCol), $(censoredCol)).map {\n+      case Row(features: Vector, label: Double, censored: Double) =>\n+        AFTPoint(features, label, censored)\n+    }\n+  }\n+\n+  @Since(\"1.6.0\")\n+  override def fit(dataset: DataFrame): AFTSurvivalRegressionModel = {\n+    validateAndTransformSchema(dataset.schema, fitting = true)\n+    val instances = extractAFTPoints(dataset)\n+    val handlePersistence = dataset.rdd.getStorageLevel == StorageLevel.NONE\n+    if (handlePersistence) instances.persist(StorageLevel.MEMORY_AND_DISK)\n+\n+    val costFun = new AFTCostFun(instances, $(fitIntercept))\n+    val optimizer = new BreezeLBFGS[BDV[Double]]($(maxIter), 10, $(tol))\n+\n+    val numFeatures = dataset.select($(featuresCol)).take(1)(0).getAs[Vector](0).size\n+    /*\n+       The weights vector has three parts:\n+       the first element: Double, log(sigma), the log of scale parameter\n+       the second element: Double, intercept of the beta parameter\n+       the third to the end elements: Doubles, regression coefficients vector of the beta parameter\n+     */\n+    val initialWeights = Vectors.zeros(numFeatures + 2)\n+\n+    val states = optimizer.iterations(new CachedDiffFunction(costFun),\n+      initialWeights.toBreeze.toDenseVector)\n+\n+    val weights = {\n+      val arrayBuilder = mutable.ArrayBuilder.make[Double]\n+      var state: optimizer.State = null\n+      while (states.hasNext) {\n+        state = states.next()\n+        arrayBuilder += state.adjustedValue\n+      }\n+      if (state == null) {\n+        val msg = s\"${optimizer.getClass.getName} failed.\"\n+        throw new SparkException(msg)\n+      }\n+\n+      val rawWeights = state.x.toArray.clone()\n+      rawWeights\n+    }\n+\n+    if (handlePersistence) instances.unpersist()\n+\n+    val coefficients = Vectors.dense(weights.slice(2, weights.length))\n+    val intercept = weights(1)\n+    val scale = math.exp(weights(0))\n+    val model = new AFTSurvivalRegressionModel(uid, coefficients, intercept, scale)\n+    copyValues(model.setParent(this))\n+  }\n+\n+  @Since(\"1.6.0\")\n+  override def transformSchema(schema: StructType): StructType = {\n+    validateAndTransformSchema(schema, fitting = true)\n+  }\n+\n+  @Since(\"1.6.0\")\n+  override def copy(extra: ParamMap): AFTSurvivalRegression = defaultCopy(extra)\n+}\n+\n+/**\n+ * :: Experimental ::\n+ * Model produced by [[AFTSurvivalRegression]].\n+ */\n+@Experimental\n+@Since(\"1.6.0\")\n+class AFTSurvivalRegressionModel private[ml] (\n+    @Since(\"1.6.0\") override val uid: String,\n+    @Since(\"1.6.0\") val coefficients: Vector,\n+    @Since(\"1.6.0\") val intercept: Double,\n+    @Since(\"1.6.0\") val scale: Double)\n+  extends Model[AFTSurvivalRegressionModel] with AFTSurvivalRegressionParams {\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setFeaturesCol(value: String): this.type = set(featuresCol, value)\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setPredictionCol(value: String): this.type = set(predictionCol, value)\n+\n+  /** @group setParam */\n+  @Since(\"1.6.0\")\n+  def setQuantileProbabilities(value: Array[Double]): this.type = set(quantileProbabilities, value)\n+\n+  @Since(\"1.6.0\")\n+  def predictQuantiles(features: Vector): Vector = {\n+    require(hasQuantileProbabilities,\n+      \"AFTSurvivalRegressionModel predictQuantiles must set quantile probabilities array\")\n+    // scale parameter for the Weibull distribution of lifetime\n+    val lambda = math.exp(BLAS.dot(coefficients, features) + intercept)\n+    // shape parameter for the Weibull distribution of lifetime\n+    val k = 1 / scale\n+    val quantiles = $(quantileProbabilities).map {\n+      q => lambda * math.exp(math.log(-math.log(1-q)) / k)\n+    }\n+    Vectors.dense(quantiles)\n+  }\n+\n+  @Since(\"1.6.0\")\n+  def predict(features: Vector): Double = {\n+    math.exp(BLAS.dot(coefficients, features) + intercept)\n+  }\n+\n+  @Since(\"1.6.0\")\n+  override def transform(dataset: DataFrame): DataFrame = {\n+    transformSchema(dataset.schema)\n+    val predictUDF = udf { features: Vector => predict(features) }\n+    dataset.withColumn($(predictionCol), predictUDF(col($(featuresCol))))\n+  }\n+\n+  @Since(\"1.6.0\")\n+  override def transformSchema(schema: StructType): StructType = {\n+    validateAndTransformSchema(schema, fitting = false)\n+  }\n+\n+  @Since(\"1.6.0\")\n+  override def copy(extra: ParamMap): AFTSurvivalRegressionModel = {\n+    copyValues(new AFTSurvivalRegressionModel(uid, coefficients, intercept, scale), extra)\n+      .setParent(parent)\n+  }\n+}\n+\n+/**\n+ * AFTAggregator computes the gradient and loss for a AFT loss function,\n+ * as used in AFT survival regression for samples in sparse or dense vector in a online fashion.\n+ *\n+ * The loss function and likelihood function under the AFT model based on:\n+ * Lawless, J. F., Statistical Models and Methods for Lifetime Data,\n+ * New York: John Wiley & Sons, Inc. 2003.\n+ *\n+ * Two AFTAggregator can be merged together to have a summary of loss and gradient of\n+ * the corresponding joint dataset.\n+ *\n+ * Given the values of the covariates x^{'}, for random lifetime t_{i} of subjects i = 1, ..., n,\n+ * with possible right-censoring, the likelihood function under the AFT model is given as\n+ * {{{\n+ *   L(\\beta,\\sigma)=\\prod_{i=1}^n[\\frac{1}{\\sigma}f_{0}\n+ *   (\\frac{\\log{t_{i}}-x^{'}\\beta}{\\sigma})]^{\\delta_{i}}S_{0}\n+ *   (\\frac{\\log{t_{i}}-x^{'}\\beta}{\\sigma})^{1-\\delta_{i}}\n+ * }}}\n+ * Where \\delta_{i} is the indicator of the event has occurred i.e. uncensored or not.\n+ * Using \\epsilon_{i}=\\frac{\\log{t_{i}}-x^{'}\\beta}{\\sigma}, the log-likelihood function\n+ * assumes the form\n+ * {{{\n+ *   \\iota(\\beta,\\sigma)=\\sum_{i=1}^{n}[-\\delta_{i}\\log\\sigma+\n+ *   \\delta_{i}\\log{f_{0}}(\\epsilon_{i})+(1-\\delta_{i})\\log{S_{0}(\\epsilon_{i})}]\n+ * }}}\n+ * Where S_{0}(\\epsilon_{i}) is the baseline survivor function,\n+ * and f_{0}(\\epsilon_{i}) is corresponding density function.\n+ *\n+ * The most commonly used log-linear survival regression method is based on the Weibull\n+ * distribution of the survival time. The Weibull distribution for lifetime corresponding\n+ * to extreme value distribution for log of the lifetime,\n+ * and the S_{0}(\\epsilon) function is\n+ * {{{\n+ *   S_{0}(\\epsilon_{i})=\\exp(-e^{\\epsilon_{i}})\n+ * }}}\n+ * the f_{0}(\\epsilon_{i}) function is\n+ * {{{\n+ *   f_{0}(\\epsilon_{i})=e^{\\epsilon_{i}}\\exp(-e^{\\epsilon_{i}})\n+ * }}}\n+ * The log-likelihood function for Weibull distribution of lifetime is\n+ * {{{\n+ *   \\iota(\\beta,\\sigma)=\n+ *   -\\sum_{i=1}^n[\\delta_{i}\\log\\sigma-\\delta_{i}\\epsilon_{i}+e^{\\epsilon_{i}}]\n+ * }}}\n+ * Due to minimizing the negative log-likelihood equivalent to maximum a posteriori probability,\n+ * the loss function we use to optimize is -\\iota(\\beta,\\sigma).\n+ * The gradient functions for \\beta and \\log\\sigma respectively are\n+ * {{{\n+ *   \\frac{\\partial (-\\iota)}{\\partial \\beta}=\n+ *   \\sum_{1=1}^{n}[\\delta_{i}-e^{\\epsilon_{i}}]\\frac{x_{i}}{\\sigma}\n+ * }}}\n+ * {{{\n+ *   \\frac{\\partial (-\\iota)}{\\partial (\\log\\sigma)}=\n+ *   \\sum_{i=1}^{n}[\\delta_{i}+(\\delta_{i}-e^{\\epsilon_{i}})\\epsilon_{i}]\n+ * }}}\n+ * @param weights The log of scale parameter, the intercept and\n+ *                regression coefficients corresponding to the features.\n+ * @param fitIntercept Whether to fit an intercept term.\n+ */\n+private class AFTAggregator(weights: BDV[Double], fitIntercept: Boolean)\n+  extends Serializable {\n+\n+  // beta is the intercept and regression coefficients to the covariates\n+  private val beta = weights.slice(1, weights.length)\n+  // sigma is the scale parameter of the AFT model\n+  private val sigma = math.exp(weights(0))\n+\n+  private var totalCnt: Long = 0L\n+  private var lossSum = 0.0\n+  private var gradientBetaSum = BDV.zeros[Double](beta.length)\n+  private var gradientLogSigmaSum = 0.0\n+\n+  def count: Long = totalCnt\n+\n+  def loss: Double = if (totalCnt == 0) 1.0 else lossSum / totalCnt\n+\n+  // Here we optimize loss function over beta and log(sigma)\n+  def gradient: BDV[Double] = BDV.vertcat(BDV(Array(gradientLogSigmaSum / totalCnt.toDouble)),\n+    gradientBetaSum/totalCnt.toDouble)\n+\n+  /**\n+   * Add a new training data to this AFTAggregator, and update the loss and gradient\n+   * of the objective function.\n+   *\n+   * @param data The AFTPoint representation for one data point to be added into this aggregator.\n+   * @return This AFTAggregator object.\n+   */\n+  def add(data: AFTPoint): this.type = {\n+\n+    val xi = if (fitIntercept) {\n+      Vectors.dense(Array(1.0) ++ data.features.toArray).toBreeze\n+    } else {\n+      Vectors.dense(Array(0.0) ++ data.features.toArray).toBreeze\n+    }\n+    val ti = data.label\n+    val delta = data.censored\n+    val epsilon = (math.log(ti) - beta.dot(xi)) / sigma\n+\n+    lossSum += math.log(sigma) * delta\n+    lossSum += (math.exp(epsilon) - delta * epsilon)\n+\n+    // Sanity check (should never occur):\n+    assert(!lossSum.isInfinity,\n+      s\"AFTAggregator loss sum is infinity. Error for unknown reason.\")\n+\n+    gradientBetaSum += xi * (delta - math.exp(epsilon)) / sigma\n+    gradientLogSigmaSum += delta + (delta - math.exp(epsilon)) * epsilon\n+\n+    totalCnt += 1\n+    this\n+  }\n+\n+  /**\n+   * Merge another AFTAggregator, and update the loss and gradient\n+   * of the objective function.\n+   * (Note that it's in place merging; as a result, `this` object will be modified.)\n+   *\n+   * @param other The other AFTAggregator to be merged.\n+   * @return This AFTAggregator object.\n+   */\n+  def merge(other: AFTAggregator): this.type = {\n+    if (totalCnt != 0) {\n+      totalCnt += other.totalCnt\n+      lossSum += other.lossSum\n+\n+      gradientBetaSum += other.gradientBetaSum\n+      gradientLogSigmaSum += other.gradientLogSigmaSum\n+    }\n+    this\n+  }\n+}\n+\n+/**\n+ * AFTCostFun implements Breeze's DiffFunction[T] for AFT cost.\n+ * It returns the loss and gradient at a particular point (coefficients).\n+ * It's used in Breeze's convex optimization routines.\n+ */\n+private class AFTCostFun(data: RDD[AFTPoint], fitIntercept: Boolean)\n+  extends DiffFunction[BDV[Double]] {\n+\n+  override def calculate(coefficients: BDV[Double]): (Double, BDV[Double]) = {\n+\n+    val aftAggregator = data.treeAggregate(new AFTAggregator(coefficients, fitIntercept))(\n+      seqOp = (c, v) => (c, v) match {\n+        case (aggregator, instance) => aggregator.add(instance)\n+      },\n+      combOp = (c1, c2) => (c1, c2) match {\n+        case (aggregator1, aggregator2) => aggregator1.merge(aggregator2)\n+      })\n+\n+    (aftAggregator.loss, aftAggregator.gradient)\n+  }\n+}\n+\n+/**\n+ * Class that represents the (features, label, censored) of a data point.\n+ *\n+ * @param features List of features for this data point.\n+ * @param label Label for this data point.\n+ * @param censored Indicator of the event has occurred or not. If the value is 1, it means\n+ *                 the event has occurred i.e. uncensored; otherwise it censored.","path":"mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala","position":445,"original_position":445,"commit_id":"dc1d59f68ec19da0d35510b2b1aad0df3c8fd2a2","original_commit_id":"dc1d59f68ec19da0d35510b2b1aad0df3c8fd2a2","user":{"login":"mengxr","id":829644,"avatar_url":"https://avatars.githubusercontent.com/u/829644?v=3","gravatar_id":"","url":"https://api.github.com/users/mengxr","html_url":"https://github.com/mengxr","followers_url":"https://api.github.com/users/mengxr/followers","following_url":"https://api.github.com/users/mengxr/following{/other_user}","gists_url":"https://api.github.com/users/mengxr/gists{/gist_id}","starred_url":"https://api.github.com/users/mengxr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengxr/subscriptions","organizations_url":"https://api.github.com/users/mengxr/orgs","repos_url":"https://api.github.com/users/mengxr/repos","events_url":"https://api.github.com/users/mengxr/events{/privacy}","received_events_url":"https://api.github.com/users/mengxr/received_events","type":"User","site_admin":false},"body":"remove `it`","created_at":"2015-09-17T23:42:06Z","updated_at":"2015-09-17T23:42:06Z","html_url":"https://github.com/apache/spark/pull/8611#discussion_r39812017","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/8611","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/39812017"},"html":{"href":"https://github.com/apache/spark/pull/8611#discussion_r39812017"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/8611"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8611","id":44278623,"html_url":"https://github.com/apache/spark/pull/8611","diff_url":"https://github.com/apache/spark/pull/8611.diff","patch_url":"https://github.com/apache/spark/pull/8611.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/8611","number":8611,"state":"open","locked":false,"title":"[SPARK-8518] [ML] Log-linear models for survival analysis ","user":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"body":"[Accelerated Failure Time (AFT) model](https://en.wikipedia.org/wiki/Accelerated_failure_time_model) is the most commonly used and easy to parallel method of survival analysis for censored survival data. It is the log-linear model based on the Weibull distribution of the survival time.\r\nUsers can refer to the R function [```survreg```](https://stat.ethz.ch/R-manual/R-devel/library/survival/html/survreg.html) to compare the model and [```predict```](https://stat.ethz.ch/R-manual/R-devel/library/survival/html/predict.survreg.html) to compare the prediction. There are different kinds of model prediction, I have just select the type ```response``` which is default used for R.","created_at":"2015-09-05T07:47:03Z","updated_at":"2015-09-17T23:42:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"435aa12d1989fade7b635dc90155642cc02d8ddc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/8611/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/8611/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/8611/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/dc1d59f68ec19da0d35510b2b1aad0df3c8fd2a2","head":{"label":"yanboliang:spark-8518","ref":"spark-8518","sha":"dc1d59f68ec19da0d35510b2b1aad0df3c8fd2a2","user":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"repo":{"id":21890948,"name":"spark","full_name":"yanboliang/spark","owner":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yanboliang/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/yanboliang/spark","forks_url":"https://api.github.com/repos/yanboliang/spark/forks","keys_url":"https://api.github.com/repos/yanboliang/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yanboliang/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yanboliang/spark/teams","hooks_url":"https://api.github.com/repos/yanboliang/spark/hooks","issue_events_url":"https://api.github.com/repos/yanboliang/spark/issues/events{/number}","events_url":"https://api.github.com/repos/yanboliang/spark/events","assignees_url":"https://api.github.com/repos/yanboliang/spark/assignees{/user}","branches_url":"https://api.github.com/repos/yanboliang/spark/branches{/branch}","tags_url":"https://api.github.com/repos/yanboliang/spark/tags","blobs_url":"https://api.github.com/repos/yanboliang/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yanboliang/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yanboliang/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/yanboliang/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yanboliang/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/yanboliang/spark/languages","stargazers_url":"https://api.github.com/repos/yanboliang/spark/stargazers","contributors_url":"https://api.github.com/repos/yanboliang/spark/contributors","subscribers_url":"https://api.github.com/repos/yanboliang/spark/subscribers","subscription_url":"https://api.github.com/repos/yanboliang/spark/subscription","commits_url":"https://api.github.com/repos/yanboliang/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/yanboliang/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/yanboliang/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/yanboliang/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/yanboliang/spark/contents/{+path}","compare_url":"https://api.github.com/repos/yanboliang/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yanboliang/spark/merges","archive_url":"https://api.github.com/repos/yanboliang/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yanboliang/spark/downloads","issues_url":"https://api.github.com/repos/yanboliang/spark/issues{/number}","pulls_url":"https://api.github.com/repos/yanboliang/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/yanboliang/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/yanboliang/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yanboliang/spark/labels{/name}","releases_url":"https://api.github.com/repos/yanboliang/spark/releases{/id}","created_at":"2014-07-16T07:24:13Z","updated_at":"2015-05-06T09:49:33Z","pushed_at":"2015-09-17T14:31:40Z","git_url":"git://github.com/yanboliang/spark.git","ssh_url":"git@github.com:yanboliang/spark.git","clone_url":"https://github.com/yanboliang/spark.git","svn_url":"https://github.com/yanboliang/spark","homepage":null,"size":116284,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"c1bc4f439f54625c01a585691e5293cd9961eb0c","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-09-17T21:24:59Z","pushed_at":"2015-09-17T23:34:50Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1622392,"stargazers_count":5462,"watchers_count":5462,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5041,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":337,"forks":5041,"open_issues":337,"watchers":5462,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/8611"},"html":{"href":"https://github.com/apache/spark/pull/8611"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/8611"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/8611/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/8611/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/8611/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/dc1d59f68ec19da0d35510b2b1aad0df3c8fd2a2"}}}}