MCPcopy
hub / github.com/TheAlgorithms/Python / collect_dataset

Function collect_dataset

machine_learning/linear_regression.py:23–40  ·  view source on GitHub ↗

Collect dataset of CSGO The dataset contains ADR vs Rating of a Player :return : dataset obtained from the link, as matrix

()

Source from the content-addressed store, hash-verified

21
22
23def collect_dataset():
24 """Collect dataset of CSGO
25 The dataset contains ADR vs Rating of a Player
26 :return : dataset obtained from the link, as matrix
27 """
28 response = httpx.get(
29 "https://raw.githubusercontent.com/yashLadha/The_Math_of_Intelligence/"
30 "master/Week1/ADRvsRating.csv",
31 timeout=10,
32 )
33 lines = response.text.splitlines()
34 data = []
35 for item in lines:
36 item = item.split(",")
37 data.append(item)
38 data.pop(0) # This is for removing the labels from the list
39 dataset = np.matrix(data)
40 return dataset
41
42
43def run_steep_gradient_descent(data_x, data_y, len_data, alpha, theta):

Callers 1

mainFunction · 0.70

Calls 4

splitMethod · 0.80
getMethod · 0.45
appendMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected