![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
R
文章平均质量分 60
艳艳儿
这个作者很懒,什么都没留下…
展开
-
[R] Expression in R graphics
expression1. expressionIf you want to write math symbol or expression in R plot, you can use function expression, which give you a formed latex style. And the expression can be included in plot ti原创 2016-01-16 00:41:09 · 1020 阅读 · 0 评论 -
[R] ADMM for lasso
This is a short code for studying admm for lasso.#--------------------------- functions to be used ----------------------## the main function f = g + hf <- function(x, A, b, lambda){ 1/2*norm(原创 2016-03-22 04:40:20 · 3660 阅读 · 0 评论 -
[R and Matlab] Add or delete multi-line comments
For R, use Ctrl+Shift+C to add and delete multi-line comments.For MATLAB, us Ctrl+R to add multi-line comments and Ctrl+T to delete multi-line comments.原创 2016-03-23 04:02:54 · 515 阅读 · 0 评论 -
[Getting and Cleaning data] Week 1
Week 1This course is following thatRaw data →\rightarrow Processing script →\rightarrow Tidy data →\rightarrow Data analysis →\rightarrow Data communicationRaw Data VS Processed Data:Raw DataThe ori原创 2016-03-13 23:18:40 · 1315 阅读 · 0 评论 -
[Getting and Cleaning data] Quiz 1
Quiz 1Question 1QUestion 2Question 3Question 4Question 5For more detail, you can download the html file here.Quiz 1Question 1The American Community Survey distributes downloadable data about Unit原创 2016-03-14 01:16:51 · 2347 阅读 · 0 评论 -
[R] How to install RMySQL package on Window
一 Installing RMySQL package under Window二 Playing with RMySQL一. Installing RMySQL package under WindowThis section is from the instruction given in the following website http://www.ahschulz.de/2013/转载 2016-03-09 04:13:10 · 925 阅读 · 0 评论 -
[Getting and Cleaning data] Week 2
[TOC] For more detail, see the html file here[http://download.csdn.net/detail/comeyan/9460707].Week 2Reading data from MySQLWhat is MySQL? SQL is short for Structured Query Language and MySQL is the w原创 2016-03-14 11:44:47 · 849 阅读 · 0 评论 -
[Getting and Cleaning data] Quiz 2
Question 1Question 2Question 3Question 4Question 5For more detail, see the html file here.Question 1Register an application with the Github API here github application. Access the API to get info原创 2016-03-14 11:52:43 · 4943 阅读 · 1 评论 -
[Putty] Running R and MATLAB in linux via putty
R command:nohup R CMD BATCH (your file) &MATLAB command:nohup matlab <file.m> file.out&原创 2016-03-29 02:04:31 · 636 阅读 · 0 评论 -
How to write Chinese report using R Markdown
Tell you how to write Chinese report using R markdown.原创 2016-06-16 03:35:55 · 1003 阅读 · 0 评论 -
Reshape Data Form in R
Convert long form data to wide or wide to long.原创 2016-06-16 04:48:28 · 599 阅读 · 0 评论 -
[Machine Learning] XGBoost
1. XGBoost介绍XGBoost模型即是一些“串联”树结构的组合,最终预测结果由多棵树共同决定。 模型公式:y=f(z)=∑Kk=1fk(z)y=f(z)=∑k=1Kfk(z)y=f(z)=\sum_{k=1}^K f_k(z) 模型预测:y^i=∑Kk=1f^k(xi)y^i=∑k=1Kf^k(xi)\hat y_i = \sum_{k=1}^K \hat f_k(x_i...原创 2018-03-20 17:03:21 · 336 阅读 · 0 评论 -
[R] Proximal Gradient Descend for Lasso
This is a short code for studying proximal gradient descent algorithm.#--------------------------- functions to be used ----------------------## the main function f = g + hf <- function(x, A, b, lambd原创 2016-03-21 22:50:42 · 2407 阅读 · 1 评论 -
[Exploratory Data Analysis] Project 1
Project summaryReview criteriaLoading the dataMaking PlotsCodeProject summaryThis assignment uses data from the UC Irvine Machine Learning Repository, a popular repository for machine learning dat原创 2016-04-01 06:21:31 · 6480 阅读 · 0 评论 -
[R] R package "benchmark"
Benchmark package consists of only one function benchmark, which is a simple wrapper of system.time to evaluate expression of R code.Usage: benchmark(...,columns = c("test", "replications", "elapsed",原创 2016-01-09 02:28:13 · 1061 阅读 · 0 评论 -
[R] Bind element of List of matrix or data.frame or list
Alternative solutions for list of matrix or dataframeAlternative solutions for list of list1. Alternative solutions for list of matrix or data.frameIf I have a list of matrix or data.frame, we can use原创 2016-01-09 01:59:59 · 799 阅读 · 0 评论 -
[R] foreach package
foreach packageExamples1. foreach packageThe foreach package provides a new looping construct for executing R code repeatedly. The main reason for using the foreach package is that it supports paralle原创 2016-01-22 01:19:46 · 1409 阅读 · 0 评论 -
[Getting and Cleaning data] Week 4
Week 4Editing text variablesRegular expressionsWorking with datesMore details could be found in the html file here Week 4Editing text variablesImportant points about text in data setNames of variab原创 2016-03-17 09:25:19 · 978 阅读 · 0 评论 -
[Getting and Cleaning data] Week 3
Week 3Subsetting and SortingSummarizing dataCreating new variablesReshaping dataManaging data frame with dplyr package IntroductionManaging data frames with dplyr package Basic toolsMerging da原创 2016-03-15 03:16:25 · 1149 阅读 · 0 评论 -
[R] R functions to deal with regular expression
Basic functionsComplex functions1. Basic functionsThe basic functions of R to deal with regular expression is nchar, tolower, toupper, chartr, paste.nchar gives the number of characters of each eleme原创 2016-01-12 03:23:20 · 367 阅读 · 0 评论 -
How to use optim in R
A friend of mine asked me the other day how she could use the function optim in R to fit data. Of course there are built in functions for fitting data in R and I wrote about this earlier. However, she转载 2016-03-03 04:55:44 · 1140 阅读 · 0 评论 -
[Getting and Cleaning data] Quiz 3
Question 1Question 2Question 3Question 4Question 5More details can be found in the html file here.Question 1The American Community Survey distributes downloadable data about United States communit原创 2016-03-17 23:21:17 · 1667 阅读 · 0 评论 -
[Getting and Cleaning data] Quiz 4
Question 1Question 2Question 3Question 4Question 5More details can be found in the html file here.Question 1The American Community Survey distributes downloadable data about United States communit原创 2016-03-17 23:23:36 · 3291 阅读 · 0 评论 -
[Getting and Cleaning data] Project
Project introductionProject codeMore details can be found here.Project introductionThe purpose of this project is to demonstrate your ability to collect, work with, and clean a data set.Review criter原创 2016-03-18 06:12:08 · 3338 阅读 · 0 评论 -
[Getting and Cleaning data] swirl
Manipulating Data with dplyr PackageGrouping and Chaining with dplyr packageTidying Data with tidyr packageType one column headers are values not variable namesType two multiple variables are stored原创 2016-03-17 23:41:21 · 2321 阅读 · 0 评论 -
[Exploratory Data Analysis] Week 1
Principles of analysis graphicsExploratory GraphicsPlottingBase Plotting SystemGraphics DeviesPrinciples of analysis graphicsPrinciple 1: Show corparisons Evidence for a pyhothesis is always rel原创 2016-04-01 06:20:19 · 1922 阅读 · 0 评论 -
[code] Chap 10 for ESL
Figure 10.2Firstly define the function to generate simulated data.# function for generating data for figure 10.2gen_eq_10_2_data &amp;amp;amp;lt;- function(N = 2000, p = 10){ X &amp;amp;amp;lt;- matrix( rnorm(N*p), ...原创 2018-12-13 22:25:40 · 343 阅读 · 0 评论