Giter VIP home page Giter VIP logo

fcr_code's Introduction

天邦FIRE采食数据分析要点

耳号重复

耳号重复分为系谱耳号重复与FIRE采食数据耳号重复两种情况

  • 系谱里的大耳号重复现象非常明显,往往FIRE里的个体能够对应好几个个体,比如系谱中有4557个个体可以对应到FIRE中的个体,但是重复的有1181个,有的会重复多次
  • FIRE数据有重复,比如两个个体的大耳号一样,但是他们的采食情况是不一样的,这种情况出现的可能性不是很大,只有1头猪

FIRE中总共有3491个个体能对到系谱里,注意能对上4557个个体,所以必须要过滤,过滤流程如下:

  • 对于有重复个体的数据(2119个个体),把开测日龄大于10的过滤掉,剩下1074
  • 1072个个体里仍然有重复的,只能剔除,剩下1030
  • 没有重复的个体有2438个个体,把开测日龄大于10的过滤掉,还剩2190
  • 最终个体数为3220

开头与最后几天的数据质量

之后,我们怀疑个体刚进入测定站的头几天以及离开测定站的几天可能测定次数偏少,先看一下分布:

  • 首先是正数天数的平均测定次数

正数天数测定次数

可以看出来第一天和第二天的测定次数较低,可以考虑保留第三天开始的数据

  • 然后是倒数天数的平均测定次数

    倒数天数测定次数

    可以看到倒数第一天的测定次数明显少于其他测定日的测定次数,删除之。

最终,这一步将数据量从4003855删除到3873155,去除了130700条数据。

  • 在进行体重分层聚类的时候,要先将体重为0的数据点去除,否则GMM不好收敛

  • 最终使用的体重都是119与168日龄的预测数据

  • 有时候DFI可能没有119-168某几天的数据,我使用lm函数进行预测,predictor就是日龄

  • 使用random regression针对每天的数据进行计算不可行,原因如下

    1. 每天算一个FCR的生物学意义是什么?

    2. 模型不好收敛,而且收敛之后算出来的遗传力很古怪

      遗传力

  • 所以如果使用随机回归模型,应该将每一周的数据合并,但是这也又失去了利用随机回归本来的意义。因为即使仅仅利用平均表型我依然能够计算具体哪个时间段的FCR,比如119-145、150-160想算哪个算哪个。

fcr_code's People

Contributors

zhezhang-zz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.