自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 python-klayout

python-klayoutcreate layoutly = db.Layout()ly.dbu = 0.001define layerAA = ly.layer(1, 1,“AA”)Create a cellBitCell_Unit= ly.create_cell(“BitCell_Unit”)setup CT060 instance and insert CT as instanceCT060 = ly.create_cell(“CT060”)width = CD_CT060he

2022-04-16 14:22:12 3975 5

原创 python版图

MOS的sample:import klayout.db as dbimport mathimport os#import pandas as pd# define working folderos.chdir('C:\\Users\\xxxxxx\\Documents\\Python_Klayout\\temp')# define crtical ruleExt_PO2AA=0.18Enc_AAtoCT=0.02Space_CT=0.10Space_Lpoly2AA=0.1

2022-04-01 19:58:16 1855 1

原创 安装brewhome

按照官网安装brew home不成功,换科大的镜像有惊喜/bin/bash -c “$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)”

2022-03-05 10:33:23 207

原创 excel数据导入的整理

数据格式:Excel中的格式:导入r后的格式:setwd(mypath)myfolder<-dir()mypattern<-"[:alpha:]*(\():alpha:)"i=1for (name_folder in myfolder) {myfile<-paste(mypath,“3-0.csv”,sep="/")#print(myfile)tmp<-read.csv(myfile) %>% select_if(~ !all(is.na(.)))tmp&

2022-01-01 16:16:32 334

原创 R删除含NA值得列

@mydata %>% select_if(~ !all(is.na(.)))mydata %>% select_if(~ !any(is.na(.)))

2021-12-29 21:28:15 245

翻译 2021-01-07

https://mlr3gallery.mlr-org.com/posts/2020-03-11-basics-german-credit/备查:mlr3计算features importance#classiftask = TaskClassif$new("GermanCredit", german, target = "credit_risk")train_set = sample(task$row_ids, 0.8 * task$nrow)test_set = setdif.

2021-01-07 14:40:18 122

翻译 2021-01-07

非常好的mlr3案例集合,原文来源于:https://mlr3gallery.mlr-org.com/posts/2020-05-04-moneyball/这里仅仅是把代码复制下来方便以后的查找和使用:library("mlr3")library("mlr3learners")library("mlr3pipelines")requireNamespace("mlr3measures")library("mlr3data")# 查看缺失数据skim(moneyball)#

2021-01-07 13:20:47 142 1

原创 ggplot2颜色手动设置

mycols<-c("red1","blue","purple","darkblue","darkgreen","orange","gold","brown","tomato","skyblue","turquoise","salmon")p <- ggplot(mtcars, aes(mpg, wt)) + geom_point(aes(colour = factor(cyl)))p + scale_colour_manual(values = mycols)[1] ...

2020-08-16 11:13:18 3527

原创 数据分利的利器

常用的数据分列函数是separate,相当好用,另外一函数是extract:library(tidyr)df<- data.frame(x=c("nlvt35","pulvt33"))pattern<- "([:alpha:]{1})([:alpha:]{1,6})([:digit:]{1,3})"df %>% extract(x,into=c("p","devicetype","vdd"),regex=pattern)result: p devicetyp..

2020-08-16 09:16:02 296

原创 按group计算fail rate

经常遇到计算fail rate的事情,案例如下:myfun<-function(x) (length(x[x>0.3])/length(x))iris.grouped %>% summarise_if(is.numeric, myfun)

2020-07-05 16:24:51 392

原创 数据变型----数据前三行表示测试点,按goup剔除outlier,并计算

有时候数据结构如下:前三行均表示某个测试点,需要对数据做长宽变化lot kt6666 kt6666 kt6666 kt6666 kt6666 kt6666 kt6666 kt6666 kt6666 wafer 6 6 6 6 6 6 6 6 6 site 1 2 3 4 5 6 7 8 9 vt1 0.098437 0.

2020-06-20 11:22:21 277

原创 ggplot途中添加target

ggplot()+geom_point(data=iris,aes(Sepal.Width,Sepal.Length,size=1.2,shape=Species,colour=Species))+scale_colour_manual(values=myp[1:3])+geom_point(data=tt,aes(Sepal.Width,Sepal.Length),color="black",size=3)不成功的做法,ggplot(iris,aes(Sepal.Width,Sepal.Lengt

2020-05-23 20:54:01 129

原创 ggplot2为boxplot添加注释

居然浪费我·一晚上的时间newdata<-ddply(mtcars,.(cyl),summarize,median=median(mpg))ggplot(mtcars,aes(cyl,mpg))+geom_boxplot()+geom_text(data=newdata,aes(cyl,median,label=median)max.mpg<-max(mtcars$mpg) ggplot(mtcars,aes(factor(cyl),mpg))+geom_boxplot()+geom

2020-05-17 09:22:56 1283

原创 pycharm安装

IDE用了PYCHARM,原以为只要在命令提示行里用Pip安装了第三方包就可以调用了,结果发现还需要在PYCHARM自带的解释器中再安装一遍才可以,而且PIP还也需要额外更新一下。如何在无网络环境下安装PYTHON和第三方包是个问题,待解。作为非专业的初学者,很多东西就只能慢慢试出来,真浪费时间。...

2020-05-08 16:06:58 120

原创 矢量图圆中添加方块以及文字

通常需要在圆上划分成若干的小方块,然后标注图形或者数字,这里是用R实现的代码:radius<-30.48a<-0b<-0angle<-0:360*(pi/180)x<-a+radius*cos(angle)/2y<-b+radius*sin(angle)/2plot(x,y,type="p",cex=0.5,col="black",asp=1)n...

2020-05-01 18:05:26 462

原创 推荐两个长宽数据互换函数pivot_longer和pivot_wider

长宽数据转换有reshape(真难用),reshape2,cast,melt,spread,gather后两项非常简单易用,pivot_longer和pivot_wider,更强劲,在数据重组过程中还完成了数据分列的动作,下面实例摘自tidyr的说明:who %>% pivot_longer( cols = new_sp_m014:newrel_f65, names_to ...

2020-04-24 22:57:27 8416

原创 plotly在R中

交互式包plotly在R完全和ggplot2兼容,只需ggplotly(p+…),即使用自带的plotly函数也很方便,语法规则和ggplot2很相似,仿照help文件轻松搞定。

2020-04-18 23:43:21 528

原创 无网络环境下的R包安装

R包的另类安装:把另外一台电脑装好的同版本的R下的lib文件夹压缩打包解压缩到当前电脑R下的lib文件夹,即可。另外在有网络的条件下,需要安装R包还是通过R自带的install package方便,比如装tidyverse,选中安装,所有辅助包一起安装。...

2020-04-13 22:53:57 792

原创 R剔除outlier点

多写函数,充分利用R中的循环语句tidyverse是功能包合集,强大fun.outlier可以更加简单的,应该利用boxplot.stats(x)$out来写fun.outlier<- function(x,time.iqr=1.5) { outlier.low<-quantile(x,probs=c(0.25))-IQR(x)*time.iqr outlier.high&l...

2020-04-13 00:06:07 3433

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除