Accuracy Accuracy
- class dffml.accuracy.accuracy.AccuracyConfig[source]
- no_enforce_immutable()
By default, all properties of a config object are immutable. If you would like to mutate immutable properties, you must explicitly call this method using it as a context manager.
Examples
>>> from dffml import config >>> >>> @config ... class MyConfig: ... C: int >>> >>> config = MyConfig(C=2) >>> with config.no_enforce_immutable(): ... config.C = 1
- class dffml.accuracy.accuracy.AccuracyContext(parent: Accuracy)[source]
- abstract async score(mctx: dffml.model.model.ModelContext, sources: dffml.source.source.SourcesContext, *args: dffml.feature.feature.Feature) float [source]
Abstract method to get the score
- Parameters
mctx (ModelContext) – The Model which needs to be used.
sources (SourcesContext) – The sources to use to get the accuracy
- Returns
The score value
- Return type
- class dffml.accuracy.accuracy.AccuracyScorer(config: Optional[Type[dffml.base.BaseConfig]])[source]
Abstract base class which should be derived from and implemented using various accuracy scorer.
- CONFIG
- CONTEXT