|
CrossValidationTModel, TLearner, TInput, TOutputLearn Method
|
Learns a model that can map the given inputs to the given outputs.
Namespace:
Accord.MachineLearning.Performance
Assembly:
Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax public override CrossValidationResult<TModel, TInput, TOutput> Learn(
TInput[] x,
TOutput[] y,
double[] weights = null
)
Public Overrides Function Learn (
x As TInput(),
y As TOutput(),
Optional weights As Double() = Nothing
) As CrossValidationResult(Of TModel, TInput, TOutput)
Request Example
View SourceParameters
- x
- Type: TInput
The model inputs. - y
- Type: TOutput
The desired outputs associated with each x. - weights (Optional)
- Type: SystemDouble
The weight of importance for each input-output pair (if supported by the learning algorithm).
Return Value
Type:
CrossValidationResultTModel,
TInput,
TOutputA model that has learned how to produce
y given
x.
Implements
ISupervisedLearningTModel, TInput, TOutputLearn(TInput, TOutput, Double)Exceptions Exception | Condition |
---|
InvalidOperationException |
Please set the Learner property before calling the Learn(x, y) method.
or
Please set the Learner property before calling the Learn(x, y) method.
or
The number of folds can not exceed the total number of samples in the data set.
|
See Also