当前位置:网站首页>R language book learning 03 "in simple terms R language data analysis" - Chapter 12 support vector machine Chapter 13 neural network
R language book learning 03 "in simple terms R language data analysis" - Chapter 12 support vector machine Chapter 13 neural network
2022-06-11 21:52:00 【Deep bamboo breeze】
1 Support vector machine
1.1 summary
Support vector machine (Surpport Vector Machine, SVM) It is a supervised algorithm in machine learning , It can be used to solve classification and regression problems . Support vector machine maps data into points in space , This mapping should form a wide enough interval , Separate the data .
About support vector machines , Be sure to understand the concept of hyperplane , The other is nuclear technology .
1.2 Code implementation
The data in the book is very good , Here we quote (melbench In bag Glass Data sets , These include 6 The chemical element content of three kinds of glass materials )
library(mlbench)
data(Glass)
smp.size = floor(0.8*nrow(Glass))
set.seed(1)
train.ind = sample(seq_len(nrow(Glass)), smp.size)
train = Glass[train.ind, ] # 80% Training set of
test = Glass[-train.ind, ] # 20% Test set of
library(e1071)
model = svm(formula = Type ~ .,data = train)
summary(model)Use caret In bag confusionMatrix() Function calculation index . about e1071 Parameter ,cost Parameters determine the soft boundary of support vector machine , Used to punish the wrong samples ,epsilon Parameters mainly affect SVR, Create a tolerance zone , The larger the tolerance range , More data will be ignored .gamma Is a parameter related to the kernel function , Mainly polynomial, radial asis as well as sigmoid.
2 neural network
2.1 summary
In machine learning and cognitive science , Artificial neural network is a statistical model inspired by biology , Used to estimate or approximate a function .
Including the input 、 Hide and output three levels .
Neuron is the basic unit of information processing , Will receive input , To produce output . The output of the neural network generates the output through the weighted sum of the neuron input by the activation function , Different activation functions have different functions . stay R In language nnet\RSNNS\neuralnet Isochronal neural network packet .
2.2 R Language implementation
Use neuralnet Build a neural network model .
n <- names(shuttleTrain)
form <- as.formula(paste("use~", paste(n[!n %in% "use"], collapse = "+")))fit <- neuralnet(form,
data = shuttleTrain,
err.fct = "ce",
linear.output = FALSE
) Use scorecard In bag perf_eva() Function to draw ROC and KS curve .
3 Other chapters
Chapter 14 is text mining , Involving participle 、 Emotional analysis and LDA The content such as .
Chapter 15 is social network analysis , Including community discovery methods .
Chapter 16 introduces H20 And its learning platform .
Chapter 17 R Language crawler .
Not as the main content of this study .
The end of the book
边栏推荐
- The shortcomings of the "big model" and the strengths of the "knowledge map"
- 类与对象(3)
- 《物联网开发实战》18 场景联动:智能电灯如何感知光线?(上)(学习笔记)
- Why is rpa+ low code a powerful tool to accelerate the digital transformation of finance?
- Huawei equipment configuration hovpn
- Some error reporting assemblies of cann code
- JVM | virtual machine stack (local variable table; operand stack; dynamic link; method binding mechanism; method call; method return address)
- C语言实现八种排序(1)
- 實驗10 Bezier曲線生成-實驗提高-控制點生成B樣條曲線
- In the future, cloud expansion technology is expected to be selected as a specialized, special and new enterprise in Shanghai
猜你喜欢

R语言书籍学习03 《深入浅出R语言数据分析》-第十章 关联规则 第十一章 随机森林

Customer information management software

学习位段(1)

189. rotation array

联调这夜,我把同事打了...

Classes and objects (1)

How to use RPA robot to start the first step of digital transformation of freight forwarding industry?

R语言书籍学习03 《深入浅出R语言数据分析》-第七章 线性回归模型

The upcoming launch of the industry's first retail digital innovation white paper unlocks the secret of full link digital success

领先企业推进智慧财务的同款效率工具,赶快了解一下?
随机推荐
华为设备配置HoVPN
每日一题 - 罗马数字转整数
Leetcode-76- minimum covering substring
LeetCode-155-最小栈
华为设备配置H-VPN
Leetcode-155-minimum stack
238.除自身以外数组的乘积
Servlet get form data
Cdr2022 serial number coreldraw2022 green key
Sword finger offer 29 Print matrix clockwise
LabVIEW控制Arduino实现红外测距(进阶篇—6)
Example of using zypper command
Building a custom CNN model: identifying covid-19
In the post epidemic era, how can enterprise CIOs improve enterprise production efficiency through distance
Redis basic data type (set)
高考结束,人生才刚刚开始,10年职场老鸟给的建议
网络连接正常但百度网页打不开显示无法访问此网站解决方案
LabVIEW controls Arduino to realize infrared ranging (advanced chapter-6)
flutter系列之:flutter中常用的container layout详解
B. Phoenix and Beauty