コンテンツへスキップ

機械学習

国際バカロレア · IB Diploma · Computer Science · SL トピック 4 3:03 英語ナレーション・英語+中文字幕 burning-in

スペース再生・←/→ 5秒・j/l 10秒・f フルスクリーン・,/. スピード

章

Transcript
A spam filter is not given a list of rules. Instead it is shown thousands of e-mails labelled spam or not spam, and finds the patterns itself. 垃圾邮件过滤器并没有被写入一串规则,而是看了成千上万封标好“垃圾”或“非垃圾”的邮件,自己找出规律。
When spammers change their wording, it is retrained on new examples. 垃圾邮件换了措辞,就用新例子重新训练。
That is machine learning: patterns from data, not rules from a programmer. 这就是机器学习:从数据中找规律,而不是由程序员写规则。
Artificial intelligence is the wide field of making computers do tasks that seem to need human intelligence. 人工智能是一个广阔的领域,研究让计算机完成看似需要人类智能的任务。
Machine learning is one part of it: learning from data. 机器学习是其中一部分:从数据中学习。
Deep learning is a kind of machine learning that uses neural networks with many layers. 深度学习是机器学习的一种,使用多层的神经网络。
Supervised learning uses labelled data, inputs with the right answers. 监督学习使用带标签的数据,也就是带正确答案的输入。
It classifies, like spam or not, or predicts a number, like a house price. 它可以分类,比如是否垃圾邮件,也可以预测数值,比如房价。
Unsupervised learning finds groups in unlabelled data, like shoppers with similar habits. 无监督学习在无标签数据中找分组,比如习惯相似的顾客。
Reinforcement learning learns actions from rewards and penalties, like a robot learning to walk. 强化学习通过奖励和惩罚学会行动,比如学走路的机器人。
Collect and label the data, then split it. 收集数据并加标签,然后拆分。
Most is used to train the model; the rest is held back as test data. 大部分用来训练模型,其余留作测试数据。
Testing on unseen data shows whether the model learned the general pattern. 用没见过的数据测试,才能看出模型是否学到了一般规律。
A model that memorises its training data but fails on new data is overfitting. 记住训练数据却在新数据上失败的模型就是过拟合。
Accuracy is the share of correct predictions. 准确率是预测正确的比例。
But a disease affects ten per cent of patients. 但某种疾病只影响百分之十的病人。
A model that always answers healthy is right ninety times in a hundred, so it scores ninety per cent, and finds no one who is ill. 一个永远回答“健康”的模型,一百次里对九十次,准确率百分之九十,却一个病人也找不出来。
With unbalanced classes, check each class, not just the total. 类别不平衡时,要看每一类的表现,而不只是总数。
Training repeats the same arithmetic on huge amounts of data, so it runs on GPUs and special chips with thousands of cores in parallel, often rented in the cloud. 训练要对海量数据反复做同样的运算,所以用 GPU 和专用芯片,成千上万个核心并行工作,常常在云端租用。
Using a trained model, called inference, needs far less power and can run on a phone. 使用训练好的模型,叫做推理,需要的算力少得多,在手机上就能运行。
If training data under-represents a group, the model works worse for them, as with face recognition on darker skin. 如果训练数据中某个群体太少,模型对他们就效果更差,比如人脸识别对深肤色的人。
If no one can explain a decision, a loan may be refused with no reason. 如果没人能解释决定,贷款可能被拒却没有理由。
It can be unclear who is responsible for harm. 造成伤害时,可能说不清该由谁负责。
And personal data may be used without consent. 个人数据也可能未经同意被使用。
Harm can be reduced. 伤害是可以减少的。
Train on data that represents everyone the model affects, and test accuracy separately for each group. 用能代表所有受影响者的数据训练,并分别测试每个群体的准确率。
Keep a human in the loop for serious decisions. 重大决定要有人参与。
Collect data with consent, and explain decisions to the people affected. 收集数据要征得同意,并向受影响的人解释决定。
Try these. Explain why test data is kept separate. Say why ninety-eight per cent accuracy can be useless. Then predict a score from the line, and work out precision and recall. 试试这些:解释为什么要单独保留测试数据;说明百分之九十八的准确率为什么可能没用;再用直线预测分数,并算出精确率和召回率。
In the exam, name the type of learning from the data. 考试时,根据数据说出学习类型。
Say why test data is kept separate. 说明为什么要单独保留测试数据。
Do not trust accuracy alone when the classes are unbalanced. 类别不平衡时不要只看准确率。
In ethics answers, name the issue, explain the harm in the scenario, and give a specific fix. 伦理题要说出问题,结合情境解释危害,再给出具体的改进办法。

ログインまたはアカウント作成

IGCSE, A-Level & AP