MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / data_handling

Function data_handling

machine_learning/xgboost_regressor.py:9–17  ·  view source on GitHub ↗

>>> data_handling(( ... {'data':'[ 8.3252 41. 6.9841269 1.02380952 322. 2.55555556 37.88 -122.23 ]' ... ,'target':([4.526])})) ('[ 8.3252 41. 6.9841269 1.02380952 322. 2.55555556 37.88 -122.23 ]', [4.526])

(data: dict)

Source from the content-addressed store, hash-verified

7
8
9def data_handling(data: dict) -> tuple:
10 # Split dataset into features and target. Data is features.
11 """
12 >>> data_handling((
13 ... {'data':'[ 8.3252 41. 6.9841269 1.02380952 322. 2.55555556 37.88 -122.23 ]'
14 ... ,'target':([4.526])}))
15 ('[ 8.3252 41. 6.9841269 1.02380952 322. 2.55555556 37.88 -122.23 ]', [4.526])
16 """
17 return (data["data"], data["target"])
18
19
20def xgboost(

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected