Use scikit-learn models with AllenNLP.
SklearnEstimator
: a base class for scikit-learn estimators to be used with AllenNLP. There are a few subclasses for now:DummyClassifierEstimator
,SvcEstimator
,PipelineEstimator
, andStandardScalerTransformerEstimator
; corresponding toDummyClassifier
,SVC
,Pipeline
, andStandardScaler
from scikit-learn. Feel free to add more as it's likely just little code.SklearnTrainer
: train a model that uses aSklearnEstimator
.
Optional:
SklearnModel
: a simple class that contains aSklearnEstimator
. You can choose to implement your own if it doesn't satisfy your needs.SklearnBatchSampler
: a convenient batch sampler that grabs all items from the dataset together, so there's only one big batch.