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

Function output

machine_learning/gradient_descent.py:41–50  ·  view source on GitHub ↗

:param data_set: test data or train data :param example_no: example whose output is to be fetched :return: output for that example

(example_no, data_set)

Source from the content-addressed store, hash-verified

39
40
41def output(example_no, data_set):
42 """
43 :param data_set: test data or train data
44 :param example_no: example whose output is to be fetched
45 :return: output for that example
46 """
47 if data_set == 'train':
48 return train_data[example_no][1]
49 elif data_set == 'test':
50 return test_data[example_no][1]
51
52
53def calculate_hypothesis_value(example_no, data_set):

Callers 2

_errorFunction · 0.85
test_gradient_descentFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_gradient_descentFunction · 0.68