MCPcopy Index your code
hub / github.com/subbarayudu-j/TheAlgorithms-Python / main

Function main

machine_learning/linear_regression.py:92–104  ·  view source on GitHub ↗

Driver function

()

Source from the content-addressed store, hash-verified

90
91
92def main():
93 """ Driver function """
94 data = collect_dataset()
95
96 len_data = data.shape[0]
97 data_x = np.c_[np.ones(len_data), data[:, :-1]].astype(float)
98 data_y = data[:, -1].astype(float)
99
100 theta = run_linear_regression(data_x, data_y)
101 len_result = theta.shape[1]
102 print('Resultant Feature vector : ')
103 for i in range(0, len_result):
104 print('%.5f' % (theta[0, i]))
105
106
107if __name__ == '__main__':

Callers 1

Calls 2

collect_datasetFunction · 0.85
run_linear_regressionFunction · 0.85

Tested by

no test coverage detected