- All Known Implementing Classes:
AbstractDoubleFitter,AbstractMapReduceDoubleFitter,AbstractRecursiveDoubleFitter
- Enclosing interface:
FittedPredictor<F,L, E>
public static interface FittedPredictor.Fitter<F,L,E>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <G> FittedPredictor.Fitter<G, L, E> adaptFeature(Function<G, F> featureMapper) default <G> FittedPredictor.Fitter<G, L, E> adaptFeatureAsync(Function<G, reactor.core.publisher.Mono<F>> featureMapper) default <M> FittedPredictor.Fitter<F, M, E> adaptLabel(Function<M, L> fitMapper, Function<L, M> predictMapper) default <M> FittedPredictor.Fitter<F, M, E> adaptLabelAsync(Function<M, reactor.core.publisher.Mono<L>> fitMapper, Function<L, reactor.core.publisher.Mono<M>> predictMapper) default FittedPredictor.Fitter<F, L, E> compose(FittedPredictor.Fitter<F, L, E> other, BinaryOperator<L> add, BinaryOperator<L> subtract, FittedPredictor.ErrorComputer<F, L, E> errorComputer) Composes two predictors by fitting this one, then computing label difference between this predictor predictions and labels and fitting the next one with the difference.default <S> FittedPredictor<F, L, E> Creates a predictor by fitting a collection of samples.<S> reactor.core.publisher.Mono<FittedPredictor<F, L, E>> fitAsync(reactor.core.publisher.Flux<S> samples, Function<S, reactor.core.publisher.Mono<F>> featureMapper, Function<S, reactor.core.publisher.Mono<L>> labelMapper) Creates a predictor by fitting a flux of samples.
-
Method Details
-
fit
default <S> FittedPredictor<F,L, fitE> (Collection<S> samples, Function<S, F> featureMapper, Function<S, L> labelMapper) Creates a predictor by fitting a collection of samples.- Type Parameters:
S-- Parameters:
samples-featureMapper-labelMapper-- Returns:
-
fitAsync
<S> reactor.core.publisher.Mono<FittedPredictor<F,L, fitAsyncE>> (reactor.core.publisher.Flux<S> samples, Function<S, reactor.core.publisher.Mono<F>> featureMapper, Function<S, reactor.core.publisher.Mono<L>> labelMapper) Creates a predictor by fitting a flux of samples.- Type Parameters:
S-- Parameters:
samples-featureMapper-labelMapper-- Returns:
- A mono providing a predictor. The mono can publish a predictor before the flux is finished and update the predictor with new samples from the flux.
-
adaptFeature
-
adaptFeatureAsync
default <G> FittedPredictor.Fitter<G,L, adaptFeatureAsyncE> (Function<G, reactor.core.publisher.Mono<F>> featureMapper) -
adaptLabel
default <M> FittedPredictor.Fitter<F,M, adaptLabelE> (Function<M, L> fitMapper, Function<L, M> predictMapper) -
adaptLabelAsync
default <M> FittedPredictor.Fitter<F,M, adaptLabelAsyncE> (Function<M, reactor.core.publisher.Mono<L>> fitMapper, Function<L, reactor.core.publisher.Mono<M>> predictMapper) -
compose
default FittedPredictor.Fitter<F,L, composeE> (FittedPredictor.Fitter<F, L, E> other, BinaryOperator<L> add, BinaryOperator<L> subtract, FittedPredictor.ErrorComputer<F, L, E> errorComputer) Composes two predictors by fitting this one, then computing label difference between this predictor predictions and labels and fitting the next one with the difference. Prediction is done by computing prediction for this one, then the other and adding the two together.- Parameters:
other-add-subtract-- Returns:
-