2変数関数の極小値・極大値・鞍点の求め方
はじめに
先日話題になっていた下記の記事を読んで、大学1年次に勉強した極小値・極大値・鞍点の求め方を復習しようと思った。
qiita.com
解説
下記の書籍の「6.3.2 2変数関数の極値問題」から抜粋。
テイラーの公式をまで展開し、以下を導く(ただしははヘッセ行列、は剰余項)。
ここで、候補の組をヘッセ行列に代入した際に常にであれば、(剰余項を無視すると)常にであるため、その組は極小値である。同様に常にであれば、その組は極大値である。どちらとも言えなければ、鞍点である。
剰余項を考慮した場合の議論は上の書籍参照。
PDF無料公開の「マーケティング×(経済理論&機械学習)」書籍 "Introduction to Algorithmic Marketing"
Twitterで見かけて良さげだったので、自分で土日に読み込むためのまとめ。
まじで無料でいいかよ、有り難い(全文読んでないけど) https://t.co/oqfXG1XeRZ
— ☔️⚡️ (@nardtree) February 14, 2018
自分が6年弱のデータ分析業界で手掛けたり体験したり見聞してきたものをまとめた実務データ分析大全みたいな本を書こうかと思っていたら、ほぼそれに近い凄い本が海の向こうではもう出ていた。分析手法解説の本ではなく問題解決方法のヒント集として読むと凄く有益だと思う https://t.co/yFMHWAeatl
— TJO (@TJO_datasci) February 14, 2018
書籍概要
公式ページ
Introduction to Algorithmic Marketing is a comprehensive guide to advanced marketing automation for marketing strategists, data scientists, product managers, and software engineers. It summarizes various techniques tested by major technology, advertising, and retail companies, and it glues these methods together with economic theory and machine learning. The book covers the main areas of marketing that require micro-decisioning – targeted promotions and advertisements, eCommerce search, recommendations, pricing, and assortment optimization.
目次
1 introduction 1
1.1 The Subject of Algorithmic Marketing . . . . . . . . . . . 2
1.2 The Definition of Algorithmic Marketing . . . . . . . . . . 4
1.3 Historical Backgrounds and Context . . . . . . . . . . . . 5
1.3.1 Online Advertising: Services and Exchanges . . . . . 5
1.3.2 Airlines: Revenue Management . . . . . . . . . . . . . 7
1.3.3 Marketing Science . . . . . . . . . . . . . . . . . . . . . 10
1.4 Programmatic Services . . . . . . . . . . . . . . . . . . . . 11
1.5 Who Should Read This Book? . . . . . . . . . . . . . . . . 15
1.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2 review of predictive modeling 19
2.1 Descriptive, Predictive, and Prescriptive Analytics . . . . 19
2.2 Economic Optimization . . . . . . . . . . . . . . . . . . . . 20
2.3 Machine Learning . . . . . . . . . . . . . . . . . . . . . . . 23
2.4 Supervised Learning . . . . . . . . . . . . . . . . . . . . . . 25
2.4.1 Parametric and Nonparametric Models . . . . . . . . 26
2.4.2 Maximum Likelihood Estimation . . . . . . . . . . . . 27
2.4.3 Linear Models . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.3.1 Linear Regression . . . . . . . . . . . . . . . . . . 30
2.4.3.2 Logistic Regression and Binary Classification . . 31
2.4.3.3 Logistic Regression and Multinomial Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.4.3.4 Naive Bayes Classifier . . . . . . . . . . . . . . . . 34
2.4.4 Nonlinear Models . . . . . . . . . . . . . . . . . . . . . 36
2.4.4.1 Feature Mapping and Kernel Methods . . . . . . 36
2.4.4.2 Adaptive Basis and Decision Trees . . . . . . . . 40
2.5 Representation Learning . . . . . . . . . . . . . . . . . . . 41
2.5.1 Principal Component Analysis . . . . . . . . . . . . . 42
2.5.1.1 Decorrelation . . . . . . . . . . . . . . . . . . . . . 42
2.5.1.2 Dimensionality Reduction . . . . . . . . . . . . . 46
2.5.2 Clustering . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.6 More Specialized Models . . . . . . . . . . . . . . . . . . . 52
2.6.1 Consumer Choice Theory . . . . . . . . . . . . . . . . 52
2.6.1.1 Multinomial Logit Model . . . . . . . . . . . . . . 54
2.6.1.2 Estimation of the Multinomial Logit Model . . . 57
2.6.2 Survival Analysis . . . . . . . . . . . . . . . . . . . . . 58
2.6.2.1 Survival Function . . . . . . . . . . . . . . . . . . 60
2.6.2.2 Hazard Function . . . . . . . . . . . . . . . . . . . 62
2.6.2.3 Survival Analysis Regression . . . . . . . . . . . . 64
2.6.3 Auction Theory . . . . . . . . . . . . . . . . . . . . . . 68
2.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3 promotions and advertisements 75
3.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.2 Business Objectives . . . . . . . . . . . . . . . . . . . . . . 80
3.2.1 Manufacturers and Retailers . . . . . . . . . . . . . . . 80
3.2.2 Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.2.3 Gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.3 Targeting Pipeline . . . . . . . . . . . . . . . . . . . . . . . 85
3.4 Response Modeling and Measurement . . . . . . . . . . . 88
3.4.1 Response Modeling Framework . . . . . . . . . . . . . 89
3.4.2 Response Measurement . . . . . . . . . . . . . . . . . 93
3.5 Building Blocks: Targeting and LTV Models . . . . . . . . 94
3.5.1 Data Collection . . . . . . . . . . . . . . . . . . . . . . 95
3.5.2 Tiered Modeling . . . . . . . . . . . . . . . . . . . . . . 96
3.5.3 RFM Modeling . . . . . . . . . . . . . . . . . . . . . . 98
3.5.4 Propensity Modeling . . . . . . . . . . . . . . . . . . . 99
3.5.4.1 Look-alike Modeling . . . . . . . . . . . . . . . . 100
3.5.4.2 Response and Uplift Modeling . . . . . . . . . . . 104
3.5.5 Segmentation and Persona-based Modeling . . . . . . 107
3.5.6 Targeting by using Survival Analysis . . . . . . . . . . 109
3.5.7 Lifetime Value Modeling . . . . . . . . . . . . . . . . . 113
3.5.7.1 Descriptive Analysis . . . . . . . . . . . . . . . . . 113
3.5.7.2 Markov Chain Models . . . . . . . . . . . . . . . . 116
3.5.7.3 Regression Models . . . . . . . . . . . . . . . . . . 119
3.6 Designing and Running Campaigns . . . . . . . . . . . . . 120
3.6.1 Customer Journeys . . . . . . . . . . . . . . . . . . . . 121
3.6.2 Product Promotion Campaigns . . . . . . . . . . . . . 123
3.6.2.1 Targeting Process . . . . . . . . . . . . . . . . . . 123
3.6.2.2 Budgeting and Capping . . . . . . . . . . . . . . . 126
3.6.3 Multistage Promotion Campaigns . . . . . . . . . . . 131
3.6.4 Retention Campaigns . . . . . . . . . . . . . . . . . . . 133
3.6.5 Replenishment Campaigns . . . . . . . . . . . . . . . 136
3.7 Resource Allocation . . . . . . . . . . . . . . . . . . . . . . 137
3.7.1 Allocation by Channel . . . . . . . . . . . . . . . . . . 138
3.7.2 Allocation by Objective . . . . . . . . . . . . . . . . . . 142
3.8 Online Advertisements . . . . . . . . . . . . . . . . . . . . 144
3.8.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . 144
3.8.2 Objectives and Attribution . . . . . . . . . . . . . . . . 146
3.8.3 Targeting for the CPA-LT Model . . . . . . . . . . . . 149
3.8.3.1 Brand Proximity . . . . . . . . . . . . . . . . . . . 151
3.8.3.2 Ad Response Modeling . . . . . . . . . . . . . . . 152
3.8.3.3 Inventory Quality and Bidding . . . . . . . . . . 152
3.8.4 Multi-Touch Attribution . . . . . . . . . . . . . . . . . 154
3.9 Measuring the Effectiveness . . . . . . . . . . . . . . . . . 157
3.9.1 Randomized Experiments . . . . . . . . . . . . . . . . 157
3.9.1.1 Conversion Rate . . . . . . . . . . . . . . . . . . . 157
3.9.1.2 Uplift . . . . . . . . . . . . . . . . . . . . . . . . . 160
3.9.2 Observational Studies . . . . . . . . . . . . . . . . . . 163
3.9.2.1 Model Specification . . . . . . . . . . . . . . . . . 166
3.9.2.2 Simulation . . . . . . . . . . . . . . . . . . . . . . 169
3.10 Architecture of Targeting Systems . . . . . . . . . . . . . . 172
3.10.1 Targeting Server . . . . . . . . . . . . . . . . . . . . . . 172
3.10.2 Data Management Platform . . . . . . . . . . . . . . . 174
3.10.3 Analytics Platform . . . . . . . . . . . . . . . . . . . . 174
3.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
4 search 179
4.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 180
4.2 Business Objectives . . . . . . . . . . . . . . . . . . . . . . 183
4.2.1 Relevance Metrics . . . . . . . . . . . . . . . . . . . . . 185
4.2.2 Merchandising Controls . . . . . . . . . . . . . . . . . 190
4.2.3 Service Quality Metrics . . . . . . . . . . . . . . . . . . 191
4.3 Building Blocks: Matching and Ranking . . . . . . . . . . 193
4.3.1 Token Matching . . . . . . . . . . . . . . . . . . . . . . 194
4.3.2 Boolean Search and Phrase Search . . . . . . . . . . . 195
4.3.3 Normalization and Stemming . . . . . . . . . . . . . . 196
4.3.4 Ranking and the Vector Space Model . . . . . . . . . 198
4.3.5 TFIDF Scoring Model . . . . . . . . . . . . . . . . . . 201
4.3.6 Scoring with n-grams . . . . . . . . . . . . . . . . . . . 205
4.4 Mixing Relevance Signals . . . . . . . . . . . . . . . . . . . 206
4.4.1 Searching Multiple Fields . . . . . . . . . . . . . . . . 207
4.4.2 Signal Engineering and Equalization . . . . . . . . . . 209
4.4.2.1 One Strong Signal . . . . . . . . . . . . . . . . . . 209
4.4.2.2 Strong Average Signal . . . . . . . . . . . . . . . . 212
4.4.2.3 Fragmented Features and Signals . . . . . . . . . 213
4.4.3 Designing a Signal Mixing Pipeline . . . . . . . . . . 215
4.5 Semantic Analysis . . . . . . . . . . . . . . . . . . . . . . . 218
4.5.1 Synonyms and Hierarchies . . . . . . . . . . . . . . . 219
4.5.2 Word Embedding . . . . . . . . . . . . . . . . . . . . . 222
4.5.3 Latent Semantic Analysis . . . . . . . . . . . . . . . . 224
4.5.4 Probabilistic Topic Modeling . . . . . . . . . . . . . . 231
4.5.5 Probabilistic Latent Semantic Analysis . . . . . . . . . 232
4.5.5.1 Latent Variable Model . . . . . . . . . . . . . . . . 233
4.5.5.2 Matrix Factorization . . . . . . . . . . . . . . . . . 236
4.5.5.3 pLSA Properties . . . . . . . . . . . . . . . . . . . 237
4.5.6 Latent Dirichlet Allocation . . . . . . . . . . . . . . . . 237
4.5.7 Word2Vec Model . . . . . . . . . . . . . . . . . . . . . 240
4.6 Search Methods for Merchandising . . . . . . . . . . . . . 247
4.6.1 Combinatorial Phrase Search . . . . . . . . . . . . . . 249
4.6.2 Controlled Precision Reduction . . . . . . . . . . . . . 253
4.6.3 Nested Entities and Dynamic Grouping . . . . . . . . 255
4.7 Relevance Tuning . . . . . . . . . . . . . . . . . . . . . . . . 258
4.7.1 Learning to Rank . . . . . . . . . . . . . . . . . . . . . 260
4.7.2 Learning to Rank from Implicit Feedback . . . . . . . 265
4.8 Architecture of Merchandising Search Services . . . . . . 269
4.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
5 recommendations 273
5.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 275
5.1.1 Properties of Customer Ratings . . . . . . . . . . . . . 277
5.2 Business Objectives . . . . . . . . . . . . . . . . . . . . . . 279
5.3 Quality Evaluation . . . . . . . . . . . . . . . . . . . . . . . 280
5.3.1 Prediction Accuracy . . . . . . . . . . . . . . . . . . . 282
5.3.2 Ranking Accuracy . . . . . . . . . . . . . . . . . . . . . 284
5.3.3 Novelty . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
5.3.4 Serendipity . . . . . . . . . . . . . . . . . . . . . . . . . 286
5.3.5 Diversity . . . . . . . . . . . . . . . . . . . . . . . . . . 286
5.3.6 Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . 287
5.3.7 The Role of Experimentation . . . . . . . . . . . . . . 288
5.4 Overview of Recommendation Methods . . . . . . . . . . 288
5.5 Content-based Filtering . . . . . . . . . . . . . . . . . . . . 291
5.5.1 Nearest Neighbor Approach . . . . . . . . . . . . . . . 294
5.5.2 Naive Bayes Classifier . . . . . . . . . . . . . . . . . . 296
5.5.3 Feature Engineering for Content Filtering . . . . . . . 301
5.6 Introduction to Collaborative Filtering . . . . . . . . . . . 303
5.6.1 Baseline Estimates . . . . . . . . . . . . . . . . . . . . 305
5.7 Neighborhood-based Collaborative Filtering . . . . . . . . 309
5.7.1 User-based Collaborative Filtering . . . . . . . . . . . 310
5.7.2 Item-based Collaborative Filtering . . . . . . . . . . . 316
5.7.3 Comparison of User-based and Item-based Methods 317
5.7.4 Neighborhood Methods as a Regression Problem . . 318
5.7.4.1 Item-based Regression . . . . . . . . . . . . . . . 319
5.7.4.2 User-based Regression . . . . . . . . . . . . . . . 322
5.7.4.3 Fusing Item-based and User-based Models . . . 323
5.8 Model-based Collaborative Filtering . . . . . . . . . . . . . 324
5.8.1 Adapting Regression Models to Rating Prediction . . 325
5.8.2 Naive Bayes Collaborative Filtering . . . . . . . . . . . 327
5.8.3 Latent Factor Models . . . . . . . . . . . . . . . . . . . 331
5.8.3.1 Unconstrained Factorization . . . . . . . . . . . . 335
5.8.3.2 Constrained Factorization . . . . . . . . . . . . . 339
5.8.3.3 Advanced Latent Factor Models . . . . . . . . . . 342
5.9 Hybrid Methods . . . . . . . . . . . . . . . . . . . . . . . . 346
5.9.1 Switching . . . . . . . . . . . . . . . . . . . . . . . . . . 346
5.9.2 Blending . . . . . . . . . . . . . . . . . . . . . . . . . . 347
5.9.2.1 Blending with Incremental Model Training . . . 349
5.9.2.2 Blending with Residual Training . . . . . . . . . . 350
5.9.2.3 Feature-weighted Blending . . . . . . . . . . . . . 351
5.9.3 Feature Augmentation . . . . . . . . . . . . . . . . . . 354
5.9.4 Presentation Options for Hybrid Recommendations . 356
5.10 Contextual Recommendations . . . . . . . . . . . . . . . . 357
5.10.1 Multidimensional Framework . . . . . . . . . . . . . . 358
5.10.2 Context-Aware Recommendation Techniques . . . . . 360
5.10.3 Time-Aware Recommendation Models . . . . . . . . . 364
5.10.3.1 Baseline Estimates with Temporal Dynamics . . 364
5.10.3.2 Neighborhood Model with Time Decay . . . . . . 366
5.10.3.3 Latent Factor Model with Temporal Dynamics . 367
5.11 Non-Personalized Recommendations . . . . . . . . . . . . 368
5.11.1 Types of Non-Personalized Recommendations . . . . 368
5.11.2 Recommendations by Using Association Rules . . . . 370
5.12 Multiple Objective Optimization . . . . . . . . . . . . . . . 373
5.13 Architecture of Recommender Systems . . . . . . . . . . . 377
5.14 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
6 pricing and assortment 383
6.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 384
6.2 The Impact of Pricing . . . . . . . . . . . . . . . . . . . . . 386
6.3 Price and Value . . . . . . . . . . . . . . . . . . . . . . . . . 388
6.3.1 Price Boundaries . . . . . . . . . . . . . . . . . . . . . 388
6.3.2 Perceived Value . . . . . . . . . . . . . . . . . . . . . . 390
6.4 Price and Demand . . . . . . . . . . . . . . . . . . . . . . . 393
6.4.1 Linear Demand Curve . . . . . . . . . . . . . . . . . . 394
6.4.2 Constant-Elasticity Demand Curve . . . . . . . . . . . 395
6.4.3 Logit Demand Curve . . . . . . . . . . . . . . . . . . . 397
6.5 Basic Price Structures . . . . . . . . . . . . . . . . . . . . . 399
6.5.1 Unit Price . . . . . . . . . . . . . . . . . . . . . . . . . 399
6.5.2 Market Segmentation . . . . . . . . . . . . . . . . . . . 401
6.5.3 Multipart Pricing . . . . . . . . . . . . . . . . . . . . . 406
6.5.4 Bundling . . . . . . . . . . . . . . . . . . . . . . . . . . 410
6.6 Demand Prediction . . . . . . . . . . . . . . . . . . . . . . 414
6.6.1 Demand Model for Assortment Optimization . . . . 416
6.6.2 Demand Model for Seasonal Sales . . . . . . . . . . . 419
6.6.2.1 Demand Data Preparation . . . . . . . . . . . . . 419
6.6.2.2 Model Specification . . . . . . . . . . . . . . . . . 420
6.6.3 Demand Prediction with Stockouts . . . . . . . . . . . 421
6.7 Price Optimization . . . . . . . . . . . . . . . . . . . . . . . 424
6.7.1 Price Differentiation . . . . . . . . . . . . . . . . . . . 425
6.7.1.1 Differentiation with Demand Shifting . . . . . . . 428
6.7.1.2 Differentiation with Constrained Supply . . . . . 430
6.7.2 Dynamic Pricing . . . . . . . . . . . . . . . . . . . . . 433
6.7.2.1 Markdowns and Clearance Sales . . . . . . . . . . 436
6.7.2.2 Markdown Price Optimization . . . . . . . . . . . 439
6.7.2.3 Price Optimization for Competing Products . . . 441
6.7.3 Personalized Discounts . . . . . . . . . . . . . . . . . . 444
6.8 Resource Allocation . . . . . . . . . . . . . . . . . . . . . . 446
6.8.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . 447
6.8.2 Allocation with Two Classes . . . . . . . . . . . . . . . 450
6.8.3 Allocation with Multiple Classes . . . . . . . . . . . . 453
6.8.4 Heuristics for Multiple Classes . . . . . . . . . . . . . 455
6.8.4.1 EMSRa . . . . . . . . . . . . . . . . . . . . . . . . . 456
6.8.4.2 EMSRb . . . . . . . . . . . . . . . . . . . . . . . . 456
6.9 Assortment Optimization . . . . . . . . . . . . . . . . . . . 457
6.9.1 Store-Layout Optimization . . . . . . . . . . . . . . . . 458
6.9.2 Category Management . . . . . . . . . . . . . . . . . . 460
6.10 Architecture of Price Management Systems . . . . . . . . 466
6.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
a appendix: dirichlet distribution 471
index 475
bibliography 481
Googleの「CNNで糖尿病性網膜症を判定する」研究の論文紹介
所感
Googleの論文ではあるが、掲載誌が情報系ではなく米医師会による医学系のものであるため、数式が一つも出てこない。むしろ、Deep Learningアルゴリズムを医療適用する場合の「考察」が非常に興味深かった。
簡易的な実装
簡易的な実装もした。TensorFlowのチュートリアルにあったCNNのサンプルを少しいじっただけ。画像200枚で60%程度の精度なので、大規模な画像で殴ってハイパーパラメータを調整すれば、かなりの精度まで行くだろうなあという所感。
【論文メモ】Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy in Retinal Fundus Photographs
Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy in Retinal Fundus Photographs
- Varun Gulshan et al.
- JAMA. 2016;316(22):2402-2410. doi:10.1001/jama.2016.17216
- December 13, 2016
- https://jamanetwork.com/journals/jama/fullarticle/2588763
どんなもの?
眼底写真を用いた糖尿病性網膜症の診断を、deep learningアルゴリズムで自動化。2種類のデータセットでの実験を通じて、高精度で検知できると分かった。
先行研究と比べてどこがすごい?
(データセットが違うので単純な比較はできないが)sensitibityとspecificityが高い。
技術や手法のキモはどこ?
deep convolutional neural network - 糖尿病性網膜症の診断に用いられた眼底写真128175枚を訓練データに - 写真は3~7人の医師や研修医が診断し、多数決でラベル付け - 出力は0~1の値(糖尿病性網膜症でありそうな度合い)
どうやって有効だと検証した?
- 2種類のデータセットで、sensitibityとspecificityを調べた。両指標とも約90%以上の値が出た。
- 以下引用(https://en.wikipedia.org/wiki/Sensitivity_and_specificity)
Sensitivity and specificity are statistical measures of the performance of a binary classification test, also known in statistics as classification function: - Sensitivity (also called the true positive rate, the recall, or probability of detection[1] in some fields) measures the proportion of positives that are correctly identified as such (e.g. the percentage of sick people who are correctly identified as having the condition). - Specificity (also called the true negative rate) measures the proportion of negatives that are correctly identified as such (e.g. the percentage of healthy people who are correctly identified as not having the condition).
議論はある?
- 同システムの利点
- consistency of interpretation
- high sensitivity and specificity
- instantaneous reporting of results
- sensitivity and specificityを目的に応じて調整できる
- 今後の展望
- より豊富な訓練データ
- より多角的なシステム評価
- システムの限界
- 医師の判断に基づきラベル付けしているため医師が見つけられないものは見つけられない
- neural newworkのブラックボックス性
- "Hence, this algorithm is not a replacement for a comprehensive eye examination"
次に読むべき論文は?
NULL
Google Homeに「寝坊30分」って言ったら、職場に丁寧な遅刻連絡メールを打つ
皆さん、寝坊することありますか?
寝坊はしないのが一番ですが、してしまった時には迅速かつ冷静に適切なところに連絡するのが大切です。しかし寝坊して急いでいると文章を推敲している時間もなく、焦りから誤字脱字や連絡先のミスをして更に自身の評価を下げてしまうことも想定されます。
今回、Google Homeを使って手軽に職場のメーリスに遅刻連絡メールを打つ仕組みを実装してみました。
実装方法
Google HomeのIFTTTによる機能拡張で、簡単に設定できました。
設定項目
上記の”this”と"that"で、それぞれアプリケーションを指定し、さらに対応する文言などを設定します。
例えば、Google Homeに「ツイート ◯◯◯◯◯◯」と話し掛けた際に、Twitterに「◯◯◯◯◯◯」と投稿してほしい場合は、前者を”this”、後者を”that”に設定します。穴埋め方式になっており、英語が読めれば簡単です。
qiita.com
"this"の設定
次のように、Google Homeに「寝坊 (遅れる時間:例「30分」など)」と言った場合に動作するよう設定しました。$マークは、任意の言葉を指します。ここでの$マークの位置で取得した語を、"that"で使い回すことができます。
"that"の設定
メール側の設定をします。例としてToに部長、Ccに部署のメーリスのアドレスを登録します。
そして件名と内容も書いておきます。”TextField”には、$マークで取得した内容が埋め込まれます。つまり「遅刻 30分」と言えば、件名は「出社が30分遅れます」になります。
最後に「Create」ボタンを押せば設定完了です。
おわりに
この設定によって、布団に入っている状態からでも遅刻連絡を適切に打てるようになります。これで社会人としての心構えはバッチリですね(違う)。
Google HomeのIFTTT連携で、かなり多様な仕組みが実装できそうなので、いろいろやってみたいと思います。
セキュリティ関係で過去に読んだ3冊
コインチェックの件で、にわかにセキュリティ周りを復習する機運が高まってきたので、これまで読んだ本をまとめておく。
『暗号技術入門 第3版 秘密の国のアリス』
現代の暗号技術の基礎を、豊富な図と平易な文章で解説してくれる。暗号技術同士がそれぞれ独立して存在しているのではなく、どのように結び付いているかをザックリと理解できる。
話は逸れるが、著者の結城浩さんが書いた『数学文章作法』(基礎編・推敲編)は、(書名に「数学」とあるが)理系文系問わずオススメ。抽象的な「良い文章」という概念を、具体的な作法にまで落とし込んで説明している。
(こういう本は解説の粒度とか網羅性とか難しいだろうなあ)
『TCP/IPの絵本』
我々が日常的に使うインターネットは「TCP/IP」というプロトコル(手続きのルールのようなもの)を基盤にして構築されている。「絵本」の名の通り、豊富な図でインターネットの裏側の仕組みを具体的に理解できる。
『おうちで学べるセキュリティのきほん』
その名の通り、自分で(Windows OSの)パソコンを動かす実習が記載されている。具体的なコマンド・プロンプト操作を通じて、セキュリティ技術が実世界にどこに相当するのかを実感できる。実習以外の解説部分にも、過去の実世界のセキュリティ実例を含めて書かれており、上記2冊で(一般的な視点で)蓄えた知識の理解が深まると思う。