Class/Object

org.clulab.learning

SVMRankingClassifier

Related Docs: object SVMRankingClassifier | package learning

Permalink

class SVMRankingClassifier[F] extends RankingClassifier[F] with Serializable

Wrapper for SVMrank: trains using svm_rank_learn but predicts using native Scala code Only the linear kernel is supported User: mihais Date: 4/23/13 Last Modified: Fix compiler issue: import scala.io.Source.

Linear Supertypes
Serializable, Serializable, RankingClassifier[F], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SVMRankingClassifier
  2. Serializable
  3. Serializable
  4. RankingClassifier
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SVMRankingClassifier(props: Properties)

    Permalink
  2. new SVMRankingClassifier(workingDir: String, modelFile: String = "model.dat", trainFile: String = "train.dat", debugFile: String = "", testFile: String = "test.dat", cLight: Double = 0.1, keepIntermediateFiles: Boolean = false)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val cLight: Double

    Permalink
  6. def clipWeights(thresh: Double): Unit

    Permalink
  7. def clipWeightsRelativeToOneFeature(thresh: Double, feature: F): Unit

    Permalink

    Removes features whose weight is lower than the weight of the reference feature * threshold

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def closeEvalFile(): Unit

    Permalink

    Closes the evaluation file; evaluation is complete

  10. def debug(): Unit

    Permalink

    Saves important info to this file for debug purposes

  11. val debugFile: String

    Permalink
  12. def displayModel(pw: PrintWriter): Unit

    Permalink

    Displays the learned model in a human-readable format, for debug purposes

    Displays the learned model in a human-readable format, for debug purposes

    Definition Classes
    SVMRankingClassifierRankingClassifier
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. var evalFile: Option[PrintWriter]

    Permalink

    Will contain the test datums in svm_rank format, for offline testing

  16. var featureLexicon: Option[Lexicon[F]]

    Permalink
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. val keepIntermediateFiles: Boolean

    Permalink
  22. def loadModelWeights(modelPath: String): Array[Double]

    Permalink
  23. def mkDatumVector(datum: Datum[Int, F]): Counter[Int]

    Permalink
  24. def mkTestFile(pw: PrintWriter, ds: Iterable[Datum[Int, F]], qid: Int): Unit

    Permalink
  25. def mkTrainFile(pw: PrintWriter, d: RankingDataset[F], spans: Option[Iterable[(Int, Int)]]): Int

    Permalink
  26. val modelFile: String

    Permalink
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def openEvalFile(): Unit

    Permalink

    Opens the evaluation file, which contains datums in svm_rank format, for offline testing

  31. def probabilitiesOf(queryDatums: Iterable[Datum[Int, F]], gamma: Double = 1.0): Iterable[Double]

    Permalink

    Returns probabilities that can be used for ranking for a group of datums, from the same query These probabilities are obtained here from scoresOf() using softmax

    Returns probabilities that can be used for ranking for a group of datums, from the same query These probabilities are obtained here from scoresOf() using softmax

    queryDatums

    All datums for one query

    Definition Classes
    RankingClassifier
  32. var qid: Int

    Permalink

    Keeps track of qids for the dump to evalFile

  33. def saveTo(fileName: String): Unit

    Permalink

    Saves the current model to a file

    Saves the current model to a file

    Definition Classes
    SVMRankingClassifierRankingClassifier
  34. def scoresOf(queryDatums: Iterable[Datum[Int, F]]): Iterable[Double]

    Permalink

    Returns scores that can be used for ranking for a group of datums, from the same query These scores do NOT have to be normalized, they are NOT probabilities!

    Returns scores that can be used for ranking for a group of datums, from the same query These scores do NOT have to be normalized, they are NOT probabilities!

    queryDatums

    All datums for one query

    Definition Classes
    SVMRankingClassifierRankingClassifier
  35. def setQid(qid: Int): Unit

    Permalink

    Increments the qid; for the offline evaluation

  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. val testFile: String

    Permalink
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. def train(dataset: RankingDataset[F], spans: Option[Iterable[(Int, Int)]] = None): Unit

    Permalink
  40. val trainFile: String

    Permalink
  41. def trainWithBagging(dataset: RankingDataset[F], numBags: Int, pw: PrintWriter): Unit

    Permalink
  42. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. var weights: Option[Array[Double]]

    Permalink
  46. var weightsOriginal: Option[Array[Double]]

    Permalink
  47. val workingDir: String

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from RankingClassifier[F]

Inherited from AnyRef

Inherited from Any

Ungrouped