Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug in logistic regression of classification package #324

Closed
qf6101 opened this issue Apr 20, 2018 · 0 comments
Closed

Possible bug in logistic regression of classification package #324

qf6101 opened this issue Apr 20, 2018 · 0 comments

Comments

@qf6101
Copy link

qf6101 commented Apr 20, 2018

Miss intercept in predict method of LRModel. Does this only consider the rank tasks?

  override
  def predict(dataSet: DataBlock[LabeledData]): DataBlock[PredictResult] = {
    val start = System.currentTimeMillis()
    val wVector = weight.getRow(0)
    val cost = System.currentTimeMillis() - start
    LOG.info(s"pull LR Model from PS cost $cost ms.")

    val predict = new MemoryDataBlock[PredictResult](-1)

    dataSet.resetReadIndex()
    for (idx: Int <- 0 until dataSet.size) {
      val instance = dataSet.read
      val id = instance.getY
      val dot = wVector.dot(instance.getX)
      val sig = Maths.sigmoid(dot)
      predict.put(new LRPredictResult(id, dot, sig))
    }
    predict
  }
}
@qf6101 qf6101 changed the title Some candidate bugs in logistic regression of classification package Possible bugs in logistic regression of classification package Apr 20, 2018
@qf6101 qf6101 changed the title Possible bugs in logistic regression of classification package Possible bug in logistic regression of classification package Apr 20, 2018
@paynie paynie closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants