zoukankan      html  css  js  c++  java
  • 技术的极限(9): 看见数学

    上一篇:技术的极限(8): 集成与分离

    目录

    ** 0x01 颜色空间
    ** 0x02 最好的机器学习书籍
    ** 0x03 如何阅读一篇科学研究的新闻
    ** 0x04 Why software projects take longer than you think – a statistical model
    ** 0x05 数据库基础
    ** 0x06 State-of-the-Art
    ** 0x07 Manager 
    ** 0x08 Founder's Guide to Building a Developer Tools Business

    0x01 颜色空间

    原文: color-spaces

    这篇文章通过页面内的交互操作和分节解说,只在RGB颜色模型内解释了颜色空间的概念,以及不同颜色空间之间的相互转换的概念。图文交互俱佳,推荐阅读原文。

    简略注记:

    一个RGB颜色空间,由RGB构成。RGB通过公式可以转换到强度,例如:

    • 线性强度:I = (intensity value) = (encoded value of R, G, B)
    • 非线形强度:I = (intensity value) = (encoded value of R, G, B )^2.0

    一个颜色空间的强度转换公式下,同一个颜色,例如灰色从亮到暗,人眼看到的差别是不同的。这种差别叫做tone response curve(TCR)。

    为什么要选择不同的强度转换公式呢?
    因为不同的强度转换公式形成的TCR不同。
    因此就会形成不同的颜色空间。

    为什么不直接使用线性转换呢?
    因为人眼对光线的感知是非线性的。
    选择不同的TCR可以获得不同舒适度的颜色感知。

    而不同的转换公式决定了不同的颜色空间。
    这些颜色空间之间可以相互转化。

    假设有颜色空间A,和颜色空间B。那么可以分别计算颜色空A里的R、G、B用颜色空间B的R、G、B如何表示:

    R(A) = w11* R(B) + w12 * G(B) + w13* B(B)
    G(A) = w21* R(B) + w22 * G(B) + w23* B(B)
    B(A) = w31* R(B) + w32 * G(B) + w33* B(B)
    

    从而,根据格拉斯曼原则:

    两个颜色空间中色光一样的颜色CA,CB。各自混合上另一个在两个颜色空间中色光一样的颜色CA’,CB’。得到的还是在两个色光一样的颜色。

    因此,就可以获得从颜色空间B到颜色空间A的转换矩阵W:

    w11 w12 w13
    w21 w22 w23
    w31 w32 w33
    

    反过来,要求从颜色空间A到颜色空间B的变换矩阵,只要求逆矩阵S即可:

    s11 s12 s13
    s21 s22 s23
    s31 s32 s33
    

    也就是说WxS=I

    颜色空间的R、G、B取值都在[0-255]时,颜色空间形成了一个正方体。
    从颜色空间A转换到颜色空间B,则可能A空间中的点到B里面就不在裁剪后到颜色空间正方体内。

    常见的RGB颜色空间有:

    • sRGB颜色空间
    • XYZ颜色空间

    常见的一种模型将亮度(光亮)和色度(颜色)分离开,它被称为 YCbCr,转换公式如下:

    Y = 0.299R + 0.587G + 0.114B
    Cb = 0.564(B - Y)
    Cr = 0.713(R - Y)
    

    反过来,从YCbCr转换到RGB:

    R = Y + 1.402Cr
    B = Y + 1.772Cb
    G = Y - 0.344Cb - 0.714Cr
    

    [1] pastel is a command-line tool to generate, analyze, convert and manipulate colors
    [2] 一份循序渐进的视频技术介绍

    0x02 最好的机器学习书籍

    原文best-deep-learning-books-updated-for-2019

    如果打算系统学习机器学习,两个路径,一个是从书籍入手。另一个是从工具链入手。从书籍入手又存在书籍茫茫多,如何选择的问题,这篇博文给出了TopN推荐。

    • Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville
    • Grokking Deep Learning by Andrew W. Trask
    • Deep Learning with Python by Francois Chollet
    • Hands-On Machine Learning with Scikit-Learn and TensorFlow by Aurélien Géron
    • The Hundred-Page Machine Learning Book by Andriy Burkov
    • Reinforcement Learning: An Introduction (2nd Edition) by Richard S. Sutton, Andrew G. Barto
    • Deep Reinforcement Learning Hands-On by Maxim Lapan
    • Learning From Data by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, Hsuan-Tien Lin.
    • The Book of Why by Judea Pearl, Dana Mackenzie.
    • Machine Learning Yearning by Andrew Ng.
    • Interpretable Machine Learning by Christoph Molnar.
    • Neural Networks and Deep Learning by Michael Nielsen.

    0x03 如何阅读一篇科学研究的新闻

    • Where did the story come from?
    • What kind of research was this?
    • What did the research involve?
    • What were the basic results?
    • How did the researchers interpret the results?
    • Conclusion

    [1] https://www.nhs.uk/news/cancer/drinking-very-hot-tea-linked-risk-1-type-oesophageal-cancer/

    0x04 Why software projects take longer than you think – a statistical model

    https://erikbern.com/2019/04/15/why-software-projects-take-longer-than-you-think-a-statistical-model.html

    从统计的角度看为什么估计总是比实际时间长,有一定道理。实际上在估计时间里面,我们连简单的列出耗时的单元做累加都十分困难。

    0x05 数据库基础

    http://webdam.inria.fr/Alice/

    人们总是忘记数据库给软件世界带来的巨大作用,计算机技术里面,数据库技术占有十分重要的一席,数据库技术背后是关系代数,虽然我们学会了SQL后,SQL本身就比关系代数更为直观。

    0x06 State-of-the-Art

    原文https://en.wikipedia.org/wiki/State_of_the_art

    术语State-of-the-Art表示一个领域研究的当前最高水平。

    State-of-the-art (sometimes cutting edge or leading edge) refers to the highest level of general development, as of a device, technique, or scientific field achieved at a particular time.

    0x07 Manager

    说一个计算机含义上的“manager”,manager一般发生在同一种对象有N个的情况下,如果代码里只有一个某种类型的对象,你是不需要对它做manager的,例如mysqlClient,这个client只会有一个,没什么好“manager”的。但是如果你有一些session,这些session就需要被manager,你会自然有一个SessionManager。但manager也有强、弱之分,如果只是持有session,简单的add/remove,做点批处理,就是弱manager。而如果你要对session做一堆策略调度,就稍微重型点,例如做garbage collection,超时清空,做LRU剔除之类,就稍微中度一点。Manager有不同的数据结构,不同的数据结构会带来不同的插入、搜索效率,没有经过设计的Manager结构是不加思考的,没有效率的,被Manager的单元总是会膨胀的,以及,即使只有区区3-4个单元,不经适当的结构设计,也是无法有适应复杂度的增长。在计算机中,我们需要耗费大量的智力在控制复杂度上。

    0x08 Founder's Guide to Building a Developer Tools Business

    1. Understanding the developer persona:
      • The most valuable features are the ones that automate the dull stuff and do what they say they do
    2. Offer multiple/tiered pricing models
      • They look at the pricing model of your product to see if you offer a free tier so that they can test your platform without investing anything
    3. Offer easy-to-navigate docs
      • Docs should be detailed, easy to read, and packed with examples
    4. Offer demos, previews, and trials
      • You can still offer demos, trials, or quick screencasts to showcase your product.
    5. Offer integrations and CLI tools
      • CLI tools and language libraries enhance your chances of success in developers’ circles
    6. Offer community support
      • Word spreads fast if users can get support and resolve their issues quickly, and your product becomes more and more popular

    这些道理说起来都懂,但是我们总是很难严格执行,以及把简单的6个步骤做到极致,我们很难看到对策略的彻底贯彻,以至于我们总是只能把东西做到普通的水平,也就是很难产出卓越的软件。普通水平的策略实行效率,让我们无法在软件制造上获得10x的成长,以至于我们自己都会失望。有很多种人们难以把握的力,其中之一就是执行力。

    --end--

  • 相关阅读:
    AC日记——[HNOI2008]GT考试 bzoj 1009
    AC日记——[SCOI2009]游戏 bzoj 1025
    AC日记——[HNOI2010]BOUNCE 弹飞绵羊 洛谷 P3203
    AC日记——旅游 bzoj 2157
    NOIP模拟2017.6.11解题报告
    AC日记——【模板】Link Cut Tree 洛谷 P3690
    AC日记——[SDOI2010]大陆争霸 洛谷 P3690
    [NOI2010]超级钢琴 倍增
    [HNOI2004]L语言 字典树 记忆化搜索
    对拍
  • 原文地址:https://www.cnblogs.com/math/p/tech-limit-09.html
Copyright © 2011-2022 走看看