摘要:
运行效果如下: 详细代码分析过程如下: (1)导入需要用到的python包或函数 (4)将dataset数据进行归一化处理,使用kmeans函数进行聚类,输入第一个参数是数据,第二个参数为聚类个数2,k-means最后输出的结果其实是两维的,第一维是聚类中心,第二维是损失distortion,新建一
阅读全文
posted @ 2019-07-12 20:04
吴裕雄
阅读(508)
推荐(0)
摘要:
最后运行效果如下: (5)显示上面的dataset分类结果,并且保存到一个文件里面。 (6)将上面保存的dataset图片读取进来,并且获得它第2通道图片特征,显示这个图片特征灰色图片如下图,结合上面dataset图片很明显,需要特别显示的大细胞和非细胞已经区分得很清晰了。 (7)现在直接把data
阅读全文
posted @ 2019-07-12 19:58
吴裕雄
阅读(388)
推荐(0)
posted @ 2019-07-12 19:54
吴裕雄
阅读(377)
推荐(0)
posted @ 2019-07-12 19:49
吴裕雄
阅读(365)
推荐(0)
摘要:
处理后得到的效果图如下: (6)新建一个数据集dataset,它的行数是:一张图片中我们感兴趣的点(一个小像素),也就是:一个图片对象只考虑I_seg.sum()这么多像素,一共有61张图片,所以dataset将保存所有的图片数据信息,这样dataset每一列就是一张图片,而每一行就是每张图片同一个
阅读全文
posted @ 2019-07-12 19:46
吴裕雄
阅读(394)
推荐(0)
摘要:
................................................... (13)按格式输出 for i in range(0,len(List_row)): if (i%2==0): st=List_row[i].strip().split(' ') print(in
阅读全文
posted @ 2019-07-12 19:41
吴裕雄
阅读(384)
推荐(0)
摘要:
实验过程与结果(可贴图) 解: 全部代码如下: 最终的部分运行结果输出如下: ............................................................................. .................................
阅读全文
posted @ 2019-07-12 19:38
吴裕雄
阅读(549)
推荐(0)
摘要:
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier,DecisionTreeRegre...
阅读全文
posted @ 2019-07-12 19:18
吴裕雄
阅读(521)
推荐(0)
摘要:
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from sklearn.model_selection import train_test_split from sklearn import datasets...
阅读全文
posted @ 2019-07-12 19:14
吴裕雄
阅读(565)
推荐(0)
摘要:
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from sklearn import datasets, linear_model from sklearn.model_selection import tr...
阅读全文
posted @ 2019-07-12 18:56
吴裕雄
阅读(501)
推荐(0)
摘要:
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from sklearn import datasets, linear_model from sklearn.model_selection import tr...
阅读全文
posted @ 2019-07-12 18:55
吴裕雄
阅读(473)
推荐(0)
摘要:
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets, linear_model from sklearn.model_selection import train_test_split def load_data(): diabetes = datasets.load_diab...
阅读全文
posted @ 2019-07-12 18:53
吴裕雄
阅读(721)
推荐(0)
摘要:
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets, linear_model from sklearn.model_selection import train_test_split def load_data(): diabetes = datasets.load_diab...
阅读全文
posted @ 2019-07-12 18:52
吴裕雄
阅读(494)
推荐(0)
摘要:
import numpy as np from sklearn import datasets,linear_model from sklearn.model_selection import train_test_split def load_data(): diabetes = datasets.load_diabetes() return train_test_spli...
阅读全文
posted @ 2019-07-12 18:51
吴裕雄
阅读(573)
推荐(0)
摘要:
运行的条件是一元逻辑向量(TRUE或FALSE)并且不能有缺失(NA)。else部分是可选的。如果 13 仅有一个语句,花括号也是可以省略的。 下面的代码片段是一个例子: if(interactive()){ 14 plot(x, y) } else { png("myplot.png") plot(x, y) dev.off() 15 }...
阅读全文
posted @ 2019-07-12 18:42
吴裕雄
阅读(330)
推荐(0)
摘要:
#----------------------------------------------------------# # R in Action (2nd ed): Chapter 19 # # Advanced graphics with ggplot2 #...
阅读全文
posted @ 2019-07-12 18:26
吴裕雄
阅读(266)
推荐(0)
摘要:
#----------------------------------------------------------# # R in Action (2nd ed): Chapter 19 # # Advanced graphics with ggplot2 #...
阅读全文
posted @ 2019-07-12 18:19
吴裕雄
阅读(269)
推荐(0)
摘要:
#----------------------------------------------------------# # R in Action (2nd ed): Chapter 19 # # Advanced graphics with ggplot2 ...
阅读全文
posted @ 2019-07-12 18:12
吴裕雄
阅读(549)
推荐(0)
摘要:
#-----------------------------------# # R in Action (2nd ed): Chapter 18 # # Advanced methods for missing data # # requires packages VIM, mice # # install.packages(c("VIM", mice)) # #---...
阅读全文
posted @ 2019-07-12 18:01
吴裕雄
阅读(301)
推荐(0)
摘要:
#-----------------------------------# # R in Action (2nd ed): Chapter 18 # # Advanced methods for missing data # # requires packages VIM, mice # # install.packa...
阅读全文
posted @ 2019-07-12 17:59
吴裕雄
阅读(412)
推荐(0)
摘要:
#-----------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 17 # # Classification ...
阅读全文
posted @ 2019-07-12 16:12
吴裕雄
阅读(328)
推荐(0)
摘要:
#-----------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 17 # # Classification ...
阅读全文
posted @ 2019-07-12 16:08
吴裕雄
阅读(272)
推荐(0)
摘要:
#-----------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 17 # # Classification ...
阅读全文
posted @ 2019-07-12 15:57
吴裕雄
阅读(203)
推荐(0)
摘要:
#-------------------------------------------------------# # R in Action (2nd ed): Chapter 16 # # Cluster analysis # # ...
阅读全文
posted @ 2019-07-12 15:45
吴裕雄
阅读(278)
推荐(0)
摘要:
#-------------------------------------------------------# # R in Action (2nd ed): Chapter 16 # # Cluster analysis # # requi...
阅读全文
posted @ 2019-07-12 15:38
吴裕雄
阅读(287)
推荐(0)
摘要:
#-----------------------------------------# # R in Action (2nd ed): Chapter 15 # # Time series # # requires forecast, tseries packages # # install.packages(...
阅读全文
posted @ 2019-07-12 15:30
吴裕雄
阅读(222)
推荐(0)
摘要:
#-----------------------------------------# # R in Action (2nd ed): Chapter 15 # # Time series # # requires forecast, tseries packages # # insta...
阅读全文
posted @ 2019-07-12 15:28
吴裕雄
阅读(240)
推荐(0)
摘要:
#-----------------------------------------# # R in Action (2nd ed): Chapter 15 # # Time series # # requires forecast, tseries packages # # inst...
阅读全文
posted @ 2019-07-12 15:20
吴裕雄
阅读(217)
推荐(0)
摘要:
#-----------------------------------------# # R in Action (2nd ed): Chapter 15 # # Time series # # requires forecast, tseries packages ...
阅读全文
posted @ 2019-07-12 15:15
吴裕雄
阅读(293)
推荐(0)
摘要:
#--------------------------------------------# # R in Action (2nd ed): Chapter 14 # # Principal components and factor analysis # # requires package psych ...
阅读全文
posted @ 2019-07-12 15:04
吴裕雄
阅读(345)
推荐(0)
摘要:
#--------------------------------------------# # R in Action (2nd ed): Chapter 14 # # Principal components and factor analysis # # requires package psych ...
阅读全文
posted @ 2019-07-12 14:59
吴裕雄
阅读(408)
推荐(0)
摘要:
#----------------------------------------------# # R in Action (2nd ed): Chapter 13 # # Generalized linear models # # requires packages AER, robust, gcc...
阅读全文
posted @ 2019-07-12 14:51
吴裕雄
阅读(346)
推荐(0)
摘要:
#----------------------------------------------# # R in Action (2nd ed): Chapter 13 # # Generalized linear models # # requires packages AER, robu...
阅读全文
posted @ 2019-07-12 14:46
吴裕雄
阅读(355)
推荐(0)
摘要:
#-------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 12 # # Resampling statisti...
阅读全文
posted @ 2019-07-12 14:38
吴裕雄
阅读(310)
推荐(0)
摘要:
#-------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 12 # # Resampling statistics and boo...
阅读全文
posted @ 2019-07-12 14:30
吴裕雄
阅读(397)
推荐(0)
摘要:
#------------------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 11 # # I...
阅读全文
posted @ 2019-07-12 14:24
吴裕雄
阅读(265)
推荐(0)
摘要:
#------------------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 11 # # In...
阅读全文
posted @ 2019-07-12 14:18
吴裕雄
阅读(260)
推荐(0)
摘要:
#------------------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 11 # # Int...
阅读全文
posted @ 2019-07-12 14:11
吴裕雄
阅读(322)
推荐(0)
摘要:
#----------------------------------------# # R in Action (2nd ed): Chapter 10 # # Power analysis # # requires packages pwr to be installed # # install.packages(...
阅读全文
posted @ 2019-07-12 14:04
吴裕雄
阅读(238)
推荐(0)
摘要:
#----------------------------------------# # R in Action (2nd ed): Chapter 10 # # Power analysis # # requires packages pwr to be installed # ...
阅读全文
posted @ 2019-07-12 14:02
吴裕雄
阅读(229)
推荐(0)
摘要:
#-------------------------------------------------------------------# # R in Action (2nd ed): Chapter 9 # # Analysis of variance ...
阅读全文
posted @ 2019-07-12 13:53
吴裕雄
阅读(270)
推荐(0)
摘要:
#-------------------------------------------------------------------# # R in Action (2nd ed): Chapter 9 # # Analysis of variance ...
阅读全文
posted @ 2019-07-12 13:49
吴裕雄
阅读(377)
推荐(0)
摘要:
#-------------------------------------------------------------------# # R in Action (2nd ed): Chapter 9 # # Analysis of variance ...
阅读全文
posted @ 2019-07-12 13:42
吴裕雄
阅读(422)
推荐(0)
摘要:
#------------------------------------------------------------# # R in Action (2nd ed): Chapter 8 # # Regression ...
阅读全文
posted @ 2019-07-12 13:31
吴裕雄
阅读(280)
推荐(0)
摘要:
#------------------------------------------------------------# # R in Action (2nd ed): Chapter 8 # # Regression ...
阅读全文
posted @ 2019-07-12 13:26
吴裕雄
阅读(292)
推荐(0)
摘要:
#------------------------------------------------------------# # R in Action (2nd ed): Chapter 8 # # Regression ...
阅读全文
posted @ 2019-07-12 13:13
吴裕雄
阅读(242)
推荐(0)
摘要:
#------------------------------------------------------------# # R in Action (2nd ed): Chapter 8 # # Regression ...
阅读全文
posted @ 2019-07-12 13:05
吴裕雄
阅读(314)
推荐(0)
摘要:
#------------------------------------------------------------# # R in Action (2nd ed): Chapter 8 # # Regression ...
阅读全文
posted @ 2019-07-12 13:00
吴裕雄
阅读(336)
推荐(0)
摘要:
#---------------------------------------------------------------------# # R in Action (2nd ed): Chapter 7 # # Basic statistics ...
阅读全文
posted @ 2019-07-12 12:54
吴裕雄
阅读(332)
推荐(0)
摘要:
#---------------------------------------------------------------------# # R in Action (2nd ed): Chapter 7 # # Basic statistics ...
阅读全文
posted @ 2019-07-12 12:49
吴裕雄
阅读(253)
推荐(0)
摘要:
#---------------------------------------------------------------------# # R in Action (2nd ed): Chapter 7 # # Basic statistics ...
阅读全文
posted @ 2019-07-12 12:44
吴裕雄
阅读(315)
推荐(0)
摘要:
#---------------------------------------------------------------------# # R in Action (2nd ed): Chapter 7 # # Basic statistics ...
阅读全文
posted @ 2019-07-12 12:38
吴裕雄
阅读(321)
推荐(0)
摘要:
#---------------------------------------------------------------# # R in Action (2nd ed): Chapter 6 # # Basic graphs ...
阅读全文
posted @ 2019-07-12 12:31
吴裕雄
阅读(254)
推荐(0)
摘要:
#---------------------------------------------------------------# # R in Action (2nd ed): Chapter 6 # # Basic graphs ...
阅读全文
posted @ 2019-07-12 12:27
吴裕雄
阅读(323)
推荐(0)
摘要:
#---------------------------------------------------------------# # R in Action (2nd ed): Chapter 6 # # Basic graphs ...
阅读全文
posted @ 2019-07-12 12:22
吴裕雄
阅读(282)
推荐(0)
摘要:
#---------------------------------------------------------------# # R in Action (2nd ed): Chapter 6 # # Basic graphs ...
阅读全文
posted @ 2019-07-12 12:17
吴裕雄
阅读(287)
推荐(0)
摘要:
#-----------------------------------# # R in Action (2nd ed): Chapter 5 # # Advanced data management # # requires that the reshape2 # # package has been installed # ...
阅读全文
posted @ 2019-07-12 12:11
吴裕雄
阅读(275)
推荐(0)
摘要:
#-----------------------------------# # R in Action (2nd ed): Chapter 5 # # Advanced data management # # requires that the reshape2 # # package has been installed # ...
阅读全文
posted @ 2019-07-12 12:06
吴裕雄
阅读(232)
推荐(0)
摘要:
#-----------------------------------# # R in Action (2nd ed): Chapter 5 # # Advanced data management # # requires that the reshape2 # # package has been installed ...
阅读全文
posted @ 2019-07-12 12:02
吴裕雄
阅读(204)
推荐(0)
摘要:
#-----------------------------------# # R in Action (2nd ed): Chapter 5 # # Advanced data management # # requires that the reshape2 # # package has been installed ...
阅读全文
posted @ 2019-07-12 11:54
吴裕雄
阅读(207)
推荐(0)
摘要:
#---------------------------------------------------------# # R in Action (2nd ed): Chapter 4 # # Basic data management # # require...
阅读全文
posted @ 2019-07-12 11:47
吴裕雄
阅读(248)
推荐(0)
摘要:
#---------------------------------------------------------# # R in Action (2nd ed): Chapter 4 # # Basic data management # # requi...
阅读全文
posted @ 2019-07-12 11:42
吴裕雄
阅读(185)
推荐(0)
摘要:
#---------------------------------------------------------# # R in Action (2nd ed): Chapter 4 # # Basic data management # #...
阅读全文
posted @ 2019-07-12 11:16
吴裕雄
阅读(231)
推荐(0)
摘要:
# ----------------------------------------------------# # R in Action (2nd ed): Chapter 3 # # Getting started with graphs # # requires that t...
阅读全文
posted @ 2019-07-12 11:07
吴裕雄
阅读(255)
推荐(0)
摘要:
# ----------------------------------------------------# # R in Action (2nd ed): Chapter 3 # # Getting started with graphs # # requi...
阅读全文
posted @ 2019-07-12 11:01
吴裕雄
阅读(241)
推荐(0)
摘要:
# ----------------------------------------------------# # R in Action (2nd ed): Chapter 3 # # Getting started with graphs # # req...
阅读全文
posted @ 2019-07-12 10:52
吴裕雄
阅读(261)
推荐(0)
摘要:
包都为对应的数据库提供了原生的数据库驱动,但可能不是在所有系统上都可用。详情请参阅 CRAN(http://cran.r-project.org)上的相应文档。
阅读全文
posted @ 2019-07-12 10:39
吴裕雄
阅读(755)
推荐(0)
posted @ 2019-07-12 10:11
吴裕雄
阅读(435)
推荐(0)
posted @ 2019-07-12 10:01
吴裕雄
阅读(788)
推荐(0)
posted @ 2019-07-12 09:50
吴裕雄
阅读(308)
推荐(0)
posted @ 2019-07-12 09:36
吴裕雄
阅读(904)
推荐(0)
posted @ 2019-07-12 09:20
吴裕雄
阅读(628)
推荐(0)
posted @ 2019-07-12 09:12
吴裕雄
阅读(691)
推荐(0)
posted @ 2019-07-12 08:57
吴裕雄
阅读(991)
推荐(0)