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

Function output

machine_learning/gradient_descent.py:49–59  ·  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

47
48
49def output(example_no, data_set):
50 """
51 :param data_set: test data or train data
52 :param example_no: example whose output is to be fetched
53 :return: output for that example
54 """
55 if data_set == "train":
56 return train_data[example_no][1]
57 elif data_set == "test":
58 return test_data[example_no][1]
59 return None
60
61
62def 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