Skip to Content
移动端AI与ML应用开发:基于iOS和Android
book

移动端AI与ML应用开发:基于iOS和Android

by Laurence Moroney
January 2023
Intermediate to advanced
288 pages
6h 6m
Chinese
China Machine Press
Content preview from 移动端AI与ML应用开发:基于iOS和Android
为简单的
iOS
应用程序创建
ML
Core ML
|
243
你可以在图 13-13 中看到该应用程序及其对玫瑰图的推理。
13-13
Core ML
对玫瑰图的推理
接下来,我们将探索一个自然语言处理(NLP)示例,从使用 Create ML 创建模型开始。
13.2
使用
Create ML
构建文本分类器
Create ML 允许你导入 CSV 文件进行分类,但你的文本必须在名为“ text ”的列中,因
此如果你一直在关注本书并使用情感数据集,你需要稍微修改一下,或者使用我在本章
存储库中提供的那个。唯一的修改是将第一列(包含文本)命名为“text ”。
此时,你可以使用前面描述的步骤创建一个新的 Create ML 文档,但在这种情况下,请
选择文本分类器模板。和以前一样,你可以将数据放到数据字段中,你会看到有两个类
(在本例中为正面情绪和负面情绪),有超过 35 000 项。你应该像以前一样将验证数据与
训练数据分开。
在参数部分,有许多算法的选项。我发现我可以通过选择迁移学习来获得出色的结
果,然后对于特征提取器选择动态嵌入。这会很慢,因为所有的嵌入都是从头开始学
习的,但可以给出非常好的结果。使用这些设置进行训练会很慢
对我来说,在 M1
Mac Mini 上大约需要一个小时,但是当它完成后,经过 75 次迭代,训练准确率达到了
89.2%
正文.indd 243正文.indd 243 2023-4-30 9:10:242023-4-30 9:10:24
244
|
13
预览选项卡允许你输入一个句子,它会自动分类 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能驱动的商业智能

人工智能驱动的商业智能

Tobias Zwingmann
Lua游戏AI开发指南

Lua游戏AI开发指南

Posts & Telecom Press, David Young
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9787111713081