Trait rusty_machine::learning::toolkit::cost_fn::CostFunc [] [src]

pub trait CostFunc<T> {
    fn cost(outputs: &T, targets: &T) -> f64;
    fn grad_cost(outputs: &T, targets: &T) -> T;
}

Trait for cost functions in models.

Required Methods

The cost function.

The gradient of the cost function.

Implementors