forked from kedro-org/kedro-viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node_task.mock.json
21 lines (21 loc) · 1.11 KB
/
node_task.mock.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"code": "def split_data(data: pd.DataFrame, parameters: Dict) -> Tuple:\n \"\"\"Splits data into features and targets training and test sets.\n\n Args:\n data: Data containing features and target.\n parameters: Parameters defined in parameters.yml.\n Returns:\n Split data.\n \"\"\"\n X = data[parameters[\"features\"]]\n y = data[\"price\"]\n X_train, X_test, y_train, y_test = train_test_split(\n X, y, test_size=parameters[\"test_size\"], random_state=parameters[\"random_state\"]\n )\n return X_train, X_test, y_train, y_test\n",
"filepath": "spaceflights-0175/src/spaceflights_0175/pipelines/data_science/nodes.py",
"parameters": {
"test_size": 0.2,
"random_state": 3,
"features": [
"engines",
"passenger_capacity",
"crew",
"d_check_complete",
"moon_clearance_complete",
"iata_approved",
"company_rating",
"review_scores_rating"
]
},
"inputs": ["Model Input Table", "Parameters"],
"outputs": ["X Train", "X Test", "Y Train", "Y Test"],
"run_command": "kedro run --to-nodes=split_data_node"
}