djc_prep
来自「数据挖掘中的一算法 ines算法 c下实现的。适合初学习数据挖掘者借鉴」· 代码 · 共 56 行
TXT
56 行
#!/bin/sh#-----------------------------------------------------------------------# File : djc_prep# Contents: preparation of Danish Jersey Cattle data# Author : Christian Borgelt# History : ??.??.1999 file created#-----------------------------------------------------------------------gawk 'BEGIN { # printf "parental_error " printf "dam_correct sire_correct " printf "true_dam_pg1 true_dam_pg2 true_sire_pg1 true_sire_pg2 " printf "stated_dam_pg1 stated_dam_pg2 stated_sire_pg1 stated_sire_pg2 " printf "offspring_pg1 offspring_pg2 " printf "offspring_genotype " printf "factor_40 factor_41 factor_42 factor_43 " printf "lysis_40 lysis_41 lysis_42 lysis_43\n"}{ # --- parental error, dam error, sire error # printf "%s ", $16 if ($16 == "n") printf "y y " else printf "* * " # --- phenogroups of true dam printf "%s %s ", $12, $13 # --- phenogroups of true sire printf "%s %s ", $14, $15 # --- phenogroups of stated dam printf "%s %s ", $5, $6 # --- phenogroups of stated sire printf "%s %s ", $7, $8 # --- phenogroups of offspring printf "%s %s ", $10, $11 # --- genotype of offspring printf "%s ", $9 # --- factors 40,...,43 if ($9 == "f1f1") printf "y y n n " else if ($9 == "f1v1") printf "y y y y " else if ($9 == "f1v2") printf "y y n y " else if ($9 == "v1v1") printf "n n y y " else if ($9 == "v1v2") printf "n y y y " else if ($9 == "v2v2") printf "n y n y " else printf "* * * * " # --- lysis 40,...,43 printf "%s %s %s %s\n", $1, $2, $3, $4}' djc.raw > djc.tab
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?