三分钟搞懂机器学习和深度学习的区别

本文探讨了深度学习与机器学习的区别,深度学习依赖于多层神经网络,通过逐层特征提取实现复杂问题解决。文章强调了深度学习在处理无结构化数据时的优势,并指出虽然单层神经网络理论上可以近似任何函数,但在实际应用中,多层网络往往能提供更好的概括能力。最后,作者推荐了一个Python学习交流群。
摘要由CSDN通过智能技术生成

图片

 

深度学习是机器学习算法的子类,其特殊性是有更高的复杂度。因此,深度学习属于机器学习,但它们绝对不是相反的概念。我们将浅层学习称为不是深层的那些机器学习技术。

让我们开始将它们放到我们的世界中:

图片

这种高度复杂性基于什么?

在实践中,深度学习由神经网络中的多个隐藏层组成。我们在《从神经元到网络》一文中解释了神经网络的基础知识,然后我们已经将深度学习介绍为一种特殊的超级网络:

层数的增加和网络的复杂性被称为深度学习,类似于类固醇(steroids)上的常规网络。

为什么这种复杂性是一个优势?

知识在各个层间流动。就像人类学习,一个逐步学习的过程。第一层专注于学习更具体的概念,而更深的层将使用已经学习的信息来吸收得出更多抽象的概念。这种构造数据表示的过程称为特征提取。

它们的复杂体系结构为深度神经网络提供了自动执行特征提取的能力。相反,在常规的机器学习或浅层学习中,此任务是在算法阶段之外执行的。由人员,数据科学家团队(而非机器)负责分析原始数据并将其更改为有价值的功能。

图片

深度学习的根本优势在于,可以在无结构化数据上训练这些算法࿰

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
好的,@Mapper注解是Mybatis框架中用于标识数据访问层接口的注解,用于告诉Spring容器将该接口类实例化并注入到其他Bean中。其使用步骤如下: 1. 在Spring Boot项目中引入Mybatis和Mybatis-Spring的依赖 2. 在配置文件中配置数据源和Mybatis的相关属性 3. 创建一个数据访问层接口,使用@Mapper注解标识该接口 4. 在该数据访问层接口中定义需要操作的数据库方法 5. 在Service或Controller中注入该数据访问层接口的实例,并调用其中的方法 下面是一个示例: 1. 在pom.xml中添加Mybatis和Mybatis-Spring的依赖: ```xml <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.6</version> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.1</version> </dependency> ``` 2. 在application.properties中配置数据源和Mybatis的相关属性: ```properties spring.datasource.url=jdbc:mysql://localhost:3306/test spring.datasource.username=root spring.datasource.password=123456 mybatis.type-aliases-package=com.example.demo.entity mybatis.mapper-locations=classpath:mapper/*.xml ``` 3. 创建一个数据访问层接口UserMapper,使用@Mapper注解标识该接口: ```java @Mapper public interface UserMapper { User selectByPrimaryKey(Integer id); int insert(User record); int updateByPrimaryKey(User record); int deleteByPrimaryKey(Integer id); } ``` 4. 在mapper目录下创建UserMapper.xml,定义需要操作的数据库方法: ```xml <mapper namespace="com.example.demo.mapper.UserMapper"> <resultMap id="BaseResultMap" type="com.example.demo.entity.User"> <id column="id" property="id" jdbcType="INTEGER"/> <result column="username" property="username" jdbcType="VARCHAR"/> <result column="password" property="password" jdbcType="VARCHAR"/> </resultMap> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"> select * from user where id = #{id,jdbcType=INTEGER} </select> <insert id="insert" parameterType="com.example.demo.entity.User" useGeneratedKeys="true" keyProperty="id"> insert into user (username, password) values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}) </insert> <update id="updateByPrimaryKey" parameterType="com.example.demo.entity.User"> update user set username = #{username,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} </update> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> delete from user where id = #{id,jdbcType=INTEGER} </delete> </mapper> ``` 5. 在Service或Controller中注入UserMapper的实例,并调用其中的方法: ```java @Service public class UserServiceImpl implements UserService { @Autowired private UserMapper userMapper; @Override public User selectByPrimaryKey(Integer id) { return userMapper.selectByPrimaryKey(id); } @Override public int insert(User user) { return userMapper.insert(user); } @Override public int updateByPrimaryKey(User user) { return userMapper.updateByPrimaryKey(user); } @Override public int deleteByPrimaryKey(Integer id) { return userMapper.deleteByPrimaryKey(id); } } ``` 这就是使用@Mapper注解的基本步骤,希望对你有所帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

平静愉悦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值