cost: Calculate the cost generate by adding the edge = (start, end)...

View source: R/mrtree.R

costR Documentation

Calculate the cost generate by adding the edge = (start, end) and removing all the other conflicting edge

Description

Calculate the cost generate by adding the edge = (start, end) and removing all the other conflicting edge

Usage

cost(node.start, node.end, paths, labelmat, labelmat.in.paths, sample_weights)

Arguments

node.start

start node of the edge (out-vertex)

node.end

end node of the edge (in-vertex)

paths

viable path

labelmat

label matrix of the samples

labelmat.in.paths

assigned labels of data points to the optimimum paths

sample_weights

weights per sample (clustering) used in loss function (all ones by default)

Value

a scalar representing the cost


pengminshi/MRtree documentation built on March 6, 2023, 4:20 p.m.