MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / get_cost_derivative

Function get_cost_derivative

machine_learning/gradient_descent.py:94–102  ·  view source on GitHub ↗

:param index: index of the parameter vector wrt to derivative is to be calculated :return: derivative wrt to that index Note: If index is -1, this means we are calculating summation wrt to biased parameter.

(index)

Source from the content-addressed store, hash-verified

92
93
94def get_cost_derivative(index):
95 """
96 :param index: index of the parameter vector wrt to derivative is to be calculated
97 :return: derivative wrt to that index
98 Note: If index is -1, this means we are calculating summation wrt to biased
99 parameter.
100 """
101 cost_derivative_value = summation_of_cost_derivative(index, m) / m
102 return cost_derivative_value
103
104
105def run_gradient_descent():

Callers 1

run_gradient_descentFunction · 0.85

Calls 1

Tested by

no test coverage detected