https://github.com/wwtg99/predict_height
Predict height by gender and genotypes using machine learning.
https://github.com/wwtg99/predict_height
genotype height machine-learning scikit-learn
Last synced: about 2 months ago
JSON representation
Predict height by gender and genotypes using machine learning.
- Host: GitHub
- URL: https://github.com/wwtg99/predict_height
- Owner: wwtg99
- Created: 2017-11-27T09:54:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T08:37:25.000Z (over 8 years ago)
- Last Synced: 2025-06-10T07:07:06.682Z (about 1 year ago)
- Topics: genotype, height, machine-learning, scikit-learn
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Predict Height
==============
Predict height by gender and genotypes.
# Usage
### Prepare data
#### Training datasets
Specimen file as below: 5 columns (label, name, gender, height, date of birth, age)
```
GW7S0140C01 张三 male 176 1954-03-05
GW7S0140C02 李四 female 170 1992-12-28 26
GW7S0140C03 王五 male 175 1957-10-01
```
Genotype file as below: 4 columns (label, rs, allele1, allele2)
```
GW7S0140C01 rs12688220 T T
GW7S0140C01 rs5912838 A C
GW7S0140C01 rs137852591 C C
GW7S0140C01 rs267606617 A A
GW7S0140C01 rs267606619 C C
```
Parse files
```
python parse_inputs.py -s -g -o -l
```
#### Predict datasets
Genotype file as below: 3 columns (rs, allele1, allele2)
```
rs12688220 T T
rs5912838 A C
rs137852591 C C
rs267606617 A A
rs267606619 C C
```
Parse file
```
python parse_inputs.py -g -o --gender=
```
### Train and save models
Use train datasets from parsed train datasets above, will train models and save model to models(default) directory.
```
python train.py
```
### Predict
Use target datasets from parsed predict datasets above, will output predicted height by model.
```
python predict.py
```