MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / _error

Function _error

machine_learning/gradient_descent.py:16–22  ·  view source on GitHub ↗

:param data_set: train data or test data :param example_no: example number whose error has to be checked :return: error in example pointed by example number.

(example_no, data_set='train')

Source from the content-addressed store, hash-verified

14
15
16def _error(example_no, data_set='train'):
17 """
18 :param data_set: train data or test data
19 :param example_no: example number whose error has to be checked
20 :return: error in example pointed by example number.
21 """
22 return calculate_hypothesis_value(example_no, data_set) - output(example_no, data_set)
23
24
25def _hypothesis_value(data_input_tuple):

Callers 1

Calls 2

outputFunction · 0.85

Tested by

no test coverage detected