Driver function
()
| 90 | |
| 91 | |
| 92 | def 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 | |
| 107 | if __name__ == '__main__': |
no test coverage detected