Error plotting SVM classification graph

I'm using the support vector machine from the e1071 package to classify my data and want to visualize how the machine actually does the classification. However, when using the plot.svm function, I get an error that I can't resolve. Script: library("e1071") data <-read.table("2010223_11042_complete") names(data) <- c("Class","V1", "V2") model <- svm(Class~.,data, type = "C-c

绘制SVM分类图时出现错误

我正在使用e1071软件包中的支持向量机对我的数据进行分类,并希望可视化机器实际进行分类的方式。 但是,使用plot.svm函数时,出现无法解析的错误。 脚本: library("e1071") data <-read.table("2010223_11042_complete") names(data) <- c("Class","V1", "V2") model <- svm(Class~.,data, type = "C-classification", kernel = "linear") plot(model,data,fill=TRUE, grid=200, svSymbol=4, dataSymbol=1, colo

Check differences of various DATE inside one variables R

I want to split the line when the variable contain different YEAR , also split the col : "Price" with evenly divided by the numbers of date appear --> count (" ; ") +1 There is a table with the variable that is not yet be splitted. # Dataset call df Price Date 500 2016-01-01 400 2016-01-03;2016-01-09 1000 2016-01-04;2017-09-01;2017-08-10;2018-01-01 25

检查一个变量R内的各种DATE的差异

当变量包含不同的YEAR时 ,我想分割这一行,也可以拆分col:“Price”,除以出现的日期数 - > count(“;”)+1 有一个表格中尚未拆分的变量。 # Dataset call df Price Date 500 2016-01-01 400 2016-01-03;2016-01-09 1000 2016-01-04;2017-09-01;2017-08-10;2018-01-01 25 2016-01-04;2017-09-01 304 2015-01-02 238 2018-01-02;2018-02-02 欲望展望 # Targeted df Price Date 500 20

sf using facet wrap and scales free

First, I am aware of this answer : Mapping different states in R using facet wrap But I work with object of library sf . It seems that facet_wrap(scales = "free") is not available for objects plotted with geom_sf in ggplot2. I get this message: Erreur : Free scales are only supported with coord_cartesian() and coord_flip() Is there any option I have missed ? Anyone has solve

sf使用小面包和秤自由

首先,我知道这个答案:使用facet wrap在R中映射不同的状态 但我与库sf对象工作。 看起来facet_wrap(scales = "free")不适用于在ggplot2中用geom_sf绘制的对象。 我收到这条消息: Erreur:只有coord_cartesian()和coord_flip()支持自由尺度 有没有我错过的选择? 任何人都可以解决问题,而不必被迫使用cowplot (或任何其他gridarrange)? 的确,这是一个例子。 我想在各个方面分别展示不同的法国地区

Understanding the scalability of RShiny apps hosted on ShinyServer

I am building a series of interactive shiny web apps for a project that I am considering turning into a Company. My background is in data science and I don't have a lot of experience on the web app / server side of things, but these are important aspects for me to consider with my project. I currently have an Amazon Linux AMI EC2 instance with ShinyServer (free, open-source) installed, and

了解ShinyServer上托管的RShiny应用程序的可伸缩性

我正在为一个项目构建一系列互动闪亮的网络应用程序,我正在考虑将其转变为一家公司。 我的背景是数据科学,在网络应用/服务器方面我没有太多的经验,但这些对我来说是重要的方面,需要考虑我的项目。 我目前已经安装了Amazon Linux AMI EC2实例,并安装了ShinyServer(免费,开放源代码),并且目前我正在托管我的Web应用程序的早期版本。 到目前为止,一切正常,但我还没有公布这些链接。 我的第一个问题是,是否有人知道

Using R to make Amazon MWS API calls

I'm using R to make a call to the Amazon MWS API and get the following error: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. This post helped me a lot with the Product Advertising API. However, I cannot seem to make it work on the MWS side. Here is my co

使用R进行亚马逊MWS API调用

我正在使用R来拨打亚马逊MWS API并获取以下错误: 我们计算的请求签名与您提供的签名不匹配。 检查您的AWS秘密访问密钥和签名方法。 详细信息请参阅服务文档。 这篇文章帮助我了解了产品广告API。 但是,我似乎无法让它在MWS方面发挥作用。 这是我的代码: library(digest) library(RCurl) base.html.string <- "https://mws.amazonservices.com/Products/2011-10-01?" SellerID <- 'A2UZXXXXXXXXXX' MWSAuthTo

Amazon Product API with R

I would like to use R to send requests to the Amazon Product API service. Is there a way to authenticate and query the Amazon Product API with R without getting the following error: "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details." Try this This shou

亚马逊产品API与R

我想使用R将请求发送到Amazon产品API服务。 有没有一种方法来验证和查询亚马逊产品API与R没有得到以下错误: “我们计算的请求签名与您提供的签名不匹配,请检查您的AWS秘密访问密钥和签名方法,详情请参阅服务文档。 尝试这个 这应该使用产品广告API执行搜索,我认为您的意思是。 您需要提供AWSAccessKeyId和AWSsecretkey, 可以通过以下网址获取:http://docs.amazonwebservices.com/AWSECommerceService/2011-08-0

Define what makes a code section in rstudio

Rstudio changed how a code section is defined. In version 0.99.902 code sections had to have some text behind the hash symbol. But now in version 1.0.136 if there are 5 hashes in a row it will define a new section. Is there anyway to make it go back to the old way of defining sections? It isn't a big deal except I would mark my sections with hashes above and below the name and now it is

定义rstudio中代码段的含义

Rstudio改变了代码段的定义。 在版本0.99.902中,代码段必须在散列符号后面有一些文本。 但是现在在版本1.0.136中,如果连续有5个哈希值,它将定义一个新的部分。 无论如何要让它回到定义节的旧方式吗? 这不是什么大不了的事情,除非我会用名字上下的哈希标记我的部分,现在它创建了3倍的部分。 旧版: 新版本: 我不知道是否有办法恢复旧的行为,但您可以使用+代替。 另外,你可以把它放在代码片段中(如果你还没

Caret Training Issues in R

I started playing with caret package recently and I'm trying to understand the training arguments. Below I used the Sonar dataset and created three imputs and the output. library(caret) library(mlbench) data(Sonar) set.seed(107) SonarImput1<-Sonar[,1:60] SonarImput2<-Sonar[,1:2] SonarImput3<-Sonar[,1] SonarOutCome<-Sonar[,61] mlp <- caret::train(SonarImput1,SonarOutC

Caret培训问题R

我最近开始使用caret套件,并且试图理解训练论点。 下面我使用了Sonar数据集并创建了三个输入和输出。 library(caret) library(mlbench) data(Sonar) set.seed(107) SonarImput1<-Sonar[,1:60] SonarImput2<-Sonar[,1:2] SonarImput3<-Sonar[,1] SonarOutCome<-Sonar[,61] mlp <- caret::train(SonarImput1,SonarOutCome, method = "mlp", preProc = c("center", "scale")) mlp2 <- caret::train(S

How to reproduce $resample and $result of 'train' object in caret?

I'm new to the amazing caret package and try to reproduce some of the objects from the train() output from a lm model with resampling method = 'timeslice'. Why does the $result$RMSE and $result$Rsquared in my example differ from the output from the function defaultSummary($pred$pred, $pred$obs)? What data is used to calculate RMSE, Rsquared, MAE in $resample? require(caret) requi

如何在插入符中再现$ train和'train'对象的$ resample和$ result?

我是新来的惊人的脱字符包,并尝试从lm模型的train()输出中重新采样方法='timeslice'中的一些对象。 为什么我的示例中的$ result $ RMSE和$ result $ Rsquared与函数defaultSummary($ pred $ pred,$ pred $ obs)的输出不同? 用什么数据来计算$ resample中的RMSE,Rsquared,MAE? require(caret) require(doParallel) no_cores <- detectCores() - 1 cls = makeCluster(no_cores) registerDoParallel(cl

caret saving minimum size model

In caret how to save minimum size model. In this example the gbmFit1 contains gbmFit1$trainingData . Saving gbmFit1 saves all such variables. As my training data is big, I want to get rid off all such extra variables and want to save the model with minimum size. library(mlbench) library(caret) data(Sonar) x <- Sonar[, colnames(Sonar)!="Class"] y <- Sonar$Class gbmFit1 <-

插入符号保存最小尺寸模型

在caret中如何保存最小尺寸的模型。 在这个例子中, gbmFit1包含gbmFit1$trainingData 。 保存gbmFit1保存所有这些变量。 由于我的训练数据很大,我想摆脱所有这些额外的变量,并希望以最小的尺寸保存模型。 library(mlbench) library(caret) data(Sonar) x <- Sonar[, colnames(Sonar)!="Class"] y <- Sonar$Class gbmFit1 <- train(x,y, method = "gbm", verbose = FALSE) predict(gbmFit1, x[1:10,