Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hyunji
/
CapstoneDesign2021-1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Hyunji
2021-06-21 18:59:47 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
46308284ee29fd8c9fbccd641590c8f2a0e12c86
46308284
1 parent
140b3b59
Delete split_to_test_validation.py
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
split_to_test_validation.py
split_to_test_validation.py
deleted
100644 → 0
View file @
140b3b5
# -*- coding: utf-8 -*-
"""split_to_test_validation.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/16Rn0IDJTE6vJMOZtafDAI19AvGD9eK4C
"""
import
pandas
as
pd
from
sklearn.model_selection
import
train_test_split
dataset_url
=
'/content/drive/MyDrive/2d-slice-set-networks-for-brain-age-master/data/test0609.csv'
data
=
pd
.
read_csv
(
dataset_url
)
print
(
data
.
head
())
y
=
data
.
age_at_scan
X
=
data
X_train
,
X_test
,
y_train
,
y_test
=
train_test_split
(
X
,
y
,
test_size
=
0.3333
)
print
(
"
\n
X_train:
\n
"
)
print
(
X_train
.
head
())
print
(
X_train
.
shape
)
X_train
.
to_csv
(
'/content/drive/MyDrive/2d-slice-set-networks-for-brain-age-master/data/test0609.csv'
,
index
=
False
)
print
(
"
\n
X_test:
\n
"
)
print
(
X_test
.
head
())
print
(
X_test
.
shape
)
X_test
.
to_csv
(
'/content/drive/MyDrive/2d-slice-set-networks-for-brain-age-master/data/valid0609.csv'
,
index
=
False
)
\ No newline at end of file
Please
register
or
login
to post a comment