package bags
- Alphabetic
- Public
- All
Type Members
- case class BaggedClassificationResult(predictions: Seq[PredictionResult[Any]]) extends BaggedResult[Any] with Product with Serializable
-
class
BaggedModel[+T] extends Model[BaggedResult[T]]
Container holding a parallel sequence of models and the sample counts used to train them
-
case class
BaggedMultiResult(predictions: Seq[PredictionResult[Double]], NibIn: Vector[Vector[Int]], bias: Option[Seq[Double]] = None, rescale: Double = 1.0) extends BaggedResult[Double] with RegressionResult with Product with Serializable
Container with model-wise predictions and logic to compute variances and training row scores
Container with model-wise predictions and logic to compute variances and training row scores
These calculations are implemented using matrix arithmetic to make them more performant when the number of predictions is large. This obfuscates the algorithm significantly, however. To see what is being computed, look at BaggedSingleResult, which is more clear. These two implementations are tested for consistency.
- predictions
for each constituent model
- NibIn
the sample matrix as (N_models x N_training)
- bias
model to use for estimating bias
-
trait
BaggedResult[+T] extends PredictionResult[T]
Interface defining the return value of a BaggedModel
Interface defining the return value of a BaggedModel
This allows the implementation to depend on the number of simultaneous predictions, which has performance implications.
-
case class
BaggedSingleResult(predictions: Seq[PredictionResult[Double]], NibIn: Vector[Vector[Int]], bias: Option[Double] = None, rescale: Double = 1.0) extends BaggedResult[Double] with RegressionResult with Product with Serializable
Container with model-wise predictions and logic to compute variances and training row scores
Container with model-wise predictions and logic to compute variances and training row scores
- predictions
for each constituent model
- NibIn
the sample matrix as (N_models x N_training)
- bias
model to use for estimating bias
- class BaggedTrainingResult[+T] extends TrainingResult
-
case class
Bagger(method: Learner, numBags: Int = -1, useJackknife: Boolean = true, biasLearner: Option[Learner] = None, uncertaintyCalibration: Boolean = false) extends Learner with Product with Serializable
A bagger creates an ensemble of models by training the learner on random samples of the training data
A bagger creates an ensemble of models by training the learner on random samples of the training data
Created by maxhutch on 11/14/16.
- method
learner to train each model in the ensemble
- numBags
number of models in the ensemble
-
case class
BaggerHelper(models: ParSeq[Model[PredictionResult[Any]]], trainingData: Seq[(Vector[Any], Any)], Nib: Vector[Vector[Int]], useJackknife: Boolean, uncertaintyCalibration: Boolean) extends Product with Serializable
Helper class to subsume shared functionality of Bagger and MultiTaskBagger.
Helper class to subsume shared functionality of Bagger and MultiTaskBagger.
- models
collection of trained models
- trainingData
on which models were trained
- Nib
vector (over models) of vectors (over training data) of the number of repeats in each model's bag
- useJackknife
whether to use jackknife for uncertainty quantification
- uncertaintyCalibration
whether to apply empirical uncertainty calibration
- Attributes
- protected
-
case class
MultiTaskBagger(method: MultiTaskLearner, numBags: Int = -1, useJackknife: Boolean = true, biasLearner: Option[Learner] = None, uncertaintyCalibration: Boolean = false) extends MultiTaskLearner with Product with Serializable
Create an ensemble of multi-task models
Create an ensemble of multi-task models
- method
learner to train each model in the ensemble
- numBags
number of models in the ensemble
Value Members
- object BaggedResult
- object Bagger extends Serializable