科学网

 找回密码
  注册

tag 标签: Forest

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

关于森林破碎化工具的使用
Guchangjun 2020-4-6 11:15
工具下载链接: https://clear.uconn.edu/tools/lft/lft2/data.htm 相关论文: https://www.peertechz.com/articles/JCEES-2-110.php 原理:非森林类型在森林区出现是造成森林破碎化的原因,该工具将破碎化分为以下四种类型:块(patch) 、边缘(edge)、穿孔(perforated)和核心(core) Vogt et al. (2007) developed an improved method for classifying forest fragmentation. The Landscape Fragmentation Tool v2.0 uses an equivalent procedure that takes advantage of the capabilities of ArcGIS. As a result, the LFT v2.0 is able to perform the fragmentation analysis in an efficient and intuitive manner and yet generate identical results to the procedure used by Vogt et al. (2007). Although originally intended for forest fragmentation analysis, the LFT v2.0 is also applicable to any land cover type of interest. Below, we describe the procedure used by the LFT v2.0. LFT v2.0 classifies a land cover type of interest into 4 main categories - patch, edge, perforated, and core. The core category is further divided into small core, medium core, and large core based on the area of the core tract. The main categories are defined based on an edge width parameter. Many studies have documented the degradation of forests or grasslands along the edges of disturbances. The edge width indicates the distance over which a fragmenting land cover (i.e. urban) can degrade the land cover of interest (i.e. forest). The width of 'edge effects' varies with the species or issue being studied and can range from 25 meters to several hundred meters. An edge width of 100 meters is often used for general purpose analyses. The sub-classification of core pixels is based on studies of forest ecology. These studies have found that the area of a forest tract impacts its viability in terms of supporting wildlife. Larger forest patches are more likely to support greater numbers of interior forest species. The core subdivisions used in LFT v2.0 are based on a summary of the relevant scientific literature done by Natural Resources Canada . Assuming 1) an edge width of 100 meters, 2) forest is the land cover type of interest, and 3) urban is the fragmenting land cover... core pixels are any forest pixels that are more than 100 meters from the nearest urban pixel small core patches have an area of less than 250 acres medium core patches have an area between 250 and 500 acres large core patches have an area greater than 500 acres patch pixels are within a small forest fragment that does not contain any core forest pixels perforated and edge forests are with 100 meters of urban pixels but are part of a tract containing core pixels: edge pixels are along the outside edge of the forest tract perforated pixels are along the edge of small forest gaps See Parent and Hurd (2008) for a detailed description of the procedures used by LFT v2.0 使用方法: 这个工具提供了两个版本,一个是需要开启空间分析功能的,一个是不需要的,我选择了需要空间分析功能的(在arcgis使用时,需要打开spatial analyst工具条)。 1 加载工具箱:右键arcgis工具箱,添加工具,找到工具箱,添加 2 打开工具箱,找到要分析的数据。这里的数据格式应为tif格式,属性字段为1(非森林),2(森林),这个必须要改,可以重分类(reclassify)实现。要实在不想改,就去工具箱里把那个py文件里面,读取栅格属性的1和2,改成0和1或者其他你想代表的非森林和森立的数值。 3 主要就一个参数,就是那个edge width,一般设置为100m就够了, 注意事项: (1)都是用英文路径,包括数据存放地址、工作空间以及输出位置 (2)使用.mdb或者.gdb作为输出存放的位置 (3)打开py文件你会发现它的临时文件存放在C盘FragData文件夹下面,这是默认的,我的C空间不够(我的区域大,临时文件最大有80G+),我在py文件里改到了D盘 (4)注意运行工具时,在环境(environment)里面把工作路径和临时文件存放路径都设置一致
3332 次阅读|1 个评论
[转载]First High-resolution National Carbon Map—Panama
hongyuhuang2011 2013-7-24 13:55
http://carnegiescience.edu/news/first_highresolution_national_carbon_map%E2%80%94panama First High-resolution National Carbon Map—Panama Monday, July 22, 2013 Watch the Carnegie Airborne Observatory make the world's highest resolution carbon map of a country (Panama) in less than one minute http://www.youtube.com/watch?v=_fQwv4coRR8 Washington, DC—A team of researchers has for the first time mapped the above ground carbon density of an entire country in high fidelity. They integrated field data with satellite imagery and high-resolution airborne Light Detection and Ranging (LiDAR) data to map the vegetation and to quantify carbon stocks throughout the Republic of Panama. The results are the first maps that report carbon stocks locally in areas as small as a hectare (2.5 acres) and yet cover millions of hectares in a short time. The system has the lowest demonstrated uncertainty of any carbon-counting approach yet—a carbon estimation uncertainty of about 10% in each hectareoverflown with LiDAR as compared to field-based estimates. Importantly, it can be used across a wide range of vegetation types worldwide. The new system, described in Carbon Balance and Management, will greatly boost conservation and efforts to mitigate climate change through carbon sequestration. It will also inform our understanding of how carbon storage can be used to assess other fundamental ecosystem characteristics such as hydrology, habitat quality, and biodiversity. The approach provides much-needed technical support for carbon-based economic activities such as the United Nations Reducing Emissions from Deforestation and Forest Degradation (REDD) program* in developing countries. Panama has complex landscapes, with variable topography, and diverse ecosystems (ranging from grasslands and mangroves to shrublands and dense forests). As a result, Panama is an ideal laboratory to develop and test a method for quantifying aboveground carbon. Lead author Greg Asner commented: “Three things make this national-scale study unique. First, Panama is an outstanding place for testing carbon mapping approaches due in part to the long-term forest studies that have been undertaken by our partners at the Smithsonian Tropical Research Institute (STRI). Second, we have applied the very latest techniques using high-performance instrumentation, resulting in demonstrably high accuracy at fine spatial resolution. And third the partnership permitted us to estimate our errors in a novel way, and we did so over every point on Panamanian soil.” In addition to Carnegie and STRI researchers, scientists from McGill University and UC-Berkeley combined measurement methods—an extensive and essential network of ground-based plot sampling, satellite imagery, and LiDAR measurements from the Carnegie Airborne Observatory—to achieve the unprecedented accuracy. LiDAR uses reflected laser light to image vegetation canopy structure in 3-D. The scientists calibrated the LiDAR measurements, taken at one-meter resolution throughout nearly one million acres (390,000 hectares), to the carbon density in 228 regional field plots, established and sampled by the collaborating scientists. They used 91 other plots to validate the LiDAR’s aboveground carbon density estimates. “Rarely has such a large number of field plots been available to validate LiDAR calibration independently,” remarked Asner. “Our collaboration with STRI and its partners was vital to assess the accuracy of what we achieved from the air.” Traditional carbon monitoring has relied upon on-the-ground sampling of field plots, but this approach usually represents just small areas of land and is time-consuming. “There has been growing interest in using satellite imagery to cover larger areas, but it is low resolution both spatially and in terms of the structural information about the vegetation,” described Carnegie author Joseph Mascaro. “In some parts of Panama, different global methods disagree by more than 100% at square-kilometer scale.” That’s where the airborne LiDAR comes in. It directly probes the ecosystem’s physical structure, which Carnegie scientists have repeatedly proven to be tightly linked to tropical carbon stocks. These measurements are the bedrock for mapping and estimating the amount of carbon locked up in plants from dense forests to shrublands. The researchers then were able to scale up the plot and LiDAR data with freely available satellite data on topography, rainfall and vegetation to model carbon stocks at the national level. The LiDAR and satellite combination were able to account for variations in the carbon pattern from differences in elevation, slope, climate, and fractional canopy cover over the entire country. For instance, the scientists found that highest carbon levels are in humid forests on the Caribbean side of Panama, often exceeding 110 tons of carbon per hectare (2.5 acres). In contrast, large regions were deforested to very low carbon levels, such as in the developed regions outside the protected watershed of the Panama Canal. Human activity is the overwhelming driver of carbon stock patterns in Panama. “Panama is one of the first UN REDD partner countries, and these new maps put the country at the forefront of high-resolution ecosystem management.” said co-author and STRI’s director Eldredge Bermingham, “The new carbon mapping approach could be the model for other tropical nations.” --------------------- *The objective of UN-REDD+ is to create a financial incentive for developing countries to protect their forest resources in order to offset increasing carbon emissions. By creating financial value for the carbon stored in trees, the aim is to make forests more valuable standing than they would be harvested or destroyed. The Carnegie Airborne Observatory is made possible by the Gordon and Betty Moore Foundation, the Andrew Mellon Foundation, the Grantham Foundation for the Protection of the Environment, Avatar Alliance Foundation, W. M. Keck Foundation, the Margaret A. Cargill Foundation, Mary Anne Nyburg Baker and G. Leonard Baker Jr., and William R. Hearst III. The Department of Global Ecology was established in 2002 to help build the scientific foundations for a sustainable future. The department is located on the campus of Stanford University, but is an independent research organization funded by the Carnegie Institution. Its scientists conduct basic research on a wide range of large-scale environmental issues, including climate change, ocean acidification, biological invasions, and changes in biodiversity. The research reported in this article was based on funding to the CAO described above, a Grantham Foundation for the Protection of the Environment grant to STRI, in addition to Grantham funding for the CAO, SIGEO/ForestGEO funds from the Smithsonian Institution and STRI, and support to the CAO Panama project from William R. Hearst III. The Smithsonian Tropical Research Institute, headquartered in Panama City, Panama, is a unit of the Smithsonian Institution. The institute furthers the understanding of tropical nature and its importance to human welfare, trains students to conduct research in the tropics, and promotes conservation by increasing public awareness of the beauty and importance of tropical ecosystems. See www.stri.si.edu
个人分类: LiDAR|1810 次阅读|0 个评论
[转载]WWF and Thailand government launch TREEMAPS
hongyuhuang2011 2013-6-17 06:20
WWF and Thailand government launch TREEMAPS, the first high-precision forest carbon mapping initiative in South-east Asia Bangkok, Thailand - The Department of National Parks, Wildlife and Plant Conservation (DNP) and WWF-Thailand formally launched on June 6th the joint project, TREEMAPS - Tracking Reductions in Carbon Emissions through Enhanced Monitoring and Project Support - which aims to establish Thailand’s first forest carbon basemap and monitoring system, as well as establishing a sub-national REDD+ project. Presiding over the launch ceremony at the Rama Gardens Hotel were Mr. Chote Trachu, Permanent Secretary of the Ministry of Natural Resources and Environment which oversees all of Thailand’s conservation agencies, Dr. Ingo Winkelmann, Minister and Deputy Head of Mission of the German Embassy in Bangkok who represented the project’s major donor – the German government, and Mr. Petch Manopawit, Manager of WWF’s Conservation programme in Thailand. TREEMAPS’ overriding objective is for Thailand to develop the capacity at the national level - and, in one region, at the sub-national level - to measure and monitor change in forest carbon and to take advantage of the full range of emerging forest carbon financing and benefit opportunities. Data will be collected from three sources: satellite imagery, on-the-ground surveys and through the use of groundbreaking LiDAR technology. “WWF is introducing cutting-edge LiDAR technology to help Thailand survey carbon levels in forests to establish its first carbon basemap with accurate data on carbon inventory and a reliable system of monitoring carbon level in forests,” said Mr. Justin Foster, Project Director of TREEMAPS with WWF-Thailand. LiDAR, which stands for Light Detection and Ranging, utilizes a highly sensitive airborne sensor that bounces laser beams off foliage in forests and ground below to measure ground topography, forest height and structure at the highest precision available today. LiDAR will be the key technology employed in developing Thailand’s first forest carbon basemap. LiDAR scanners will be fitted to aircraft conducting aerial surveys. The aerial surveys will collect data that will subsequently be processed to produce 3D (three dimensional) images of the surveyed forest. The data collected will provide highly accurate information, which will form the basis of a forest carbon basemap. The creation of the forest carbon basemap will allow for ongoing monitoring of changes in Thailand’s forests. Thailand is the first country in Southeast Asia to adopt and employ LiDAR technology for forest conservation through this WWF initiative. According to Dr. Songtham Suksawang, Director of the National Park Research Division, and an expert in forest and wildlife conservation, the TREEMAPS project does not solely focus on the collection of scientific data but attracts involvement of local stakeholders such as forest dependent communities in how the project is run. “Promoting the involvement of people to actively plant trees supports the creation of a carbon credit market,” said Dr. Songtham. “At the same time, other environmental services such as water resources management, tourism, wildlife conservation are also included in the project’s mission statement and this mutually benefits all aspects of conservation work simultaneously.” The TREEMAPS project will initiate a pilot initiative in the Dong Phayayen Khao Yai (DPKY) Forest Complex in the northeast of Thailand. The area, which includes several national parks, is a UNESCO World Heritage Site and host to globally important forest ecosystems and more than 800 species, including tigers, elephants and gibbons. But the forest area has suffered severe impacts from deforestation and encroachment. Over the past 20 years, Thailand lost 577,000 hectares of forest, at an average rate of 0.15% per year. Estimates of forest degradation are currently not available Prior to the TREEMAPS project, the available approaches for measuring forest carbon in Thailand were not capable of delivery the level of accuracy required by REDD+ or private sector voluntary carbon markets. REDD+ (Reducing Emissions from Deforestation and forest Degradation in Developing Countries) is an initiative of the United Nations (UN) to reduce emissions from deforestation and forest degradation, promote conservation and sustainable management of forests and enhancement of forest carbon stocks. TREEMAPS provides an opportunity for Thailand to receive funding support through REDD+ and various other payment for ecosystem services (PES). However, in order to benefit from the REDD+ programme and receive funding from these mechanism, Thailand must first establish a system to measure and monitor changes in forest carbon levels, that meets the highest level of accuracy (tier 3) of the Intergovernmental Panel on Climate Change (IPCC). TREEMAPS hopes to play a key role in conserving forests for Thai people to receive the full benefits of REDD+ initiatives, exchange knowledge, skills, experiences and lessons learned with other countries and regions. Additionally, various co-benefits and environmental services will be experienced, such as climate change mitigation as well as the creation of new opportunities for Thai people to maximize benefits from managing forests sustainably. WWF’s TREEMAPS project has received financial support from the Germany’s Federal Ministry for the Environment, Nature Conservation and Nuclear Safety (BMU) under the its International Climate Initiative (ICI) framework. 引自: http://wwf.panda.org/what_we_do/where_we_work/greatermekong/news/?208960goback=.gde_1317037_member_249792412
个人分类: LiDAR|1731 次阅读|0 个评论
随机森林的视觉应用-Regression Forests (2)
热度 1 yanghengcv 2013-5-19 23:24
我个人觉得具有时代意义的文章是 J. Gall 的Hough Forests,regression forests这个概念已经很多年,但是近几年在视觉中应用的regression forests本质是HF。Gall原来在 ETH Zürich Computer Vision Laboratory ,即Luc Van Gool那,去年去了 Max Planck Institute 。HF的主要思想是将Random Forests和Hough Transform结合起来了,这个思想从某种意义上是受到了ISM的影响,其区别在于ISM采用传统的构件codebook的方法,而HF的codebook是根据random forests来构建的。到底是怎么样构建这个codebook的呢?即上文中我们讲到的卫兵和算命先生(内部节点和叶子节点)。这是random forests的精华,我们先来回顾一下。作为一篇具有research性质的blog,似乎很难避免用点数学描述,在此文中,我们用到一些简单的信息论的知识:Information Gain 和Entropy。他们在进行树的构建的过程中起到了非常重要的作用。我们用最简单的object detection为例还说明这个过程,训练的数据集与其它的object detection的方法无异。在一个图像中,有object的bounding box,bouding box被视为目标,而bounding box外即为background。HF训练的方法是在图像中随机的选择固定大小size的patch,从foreground和background上都会选择一些,这些训练的patch就会有一下特征 Pa = (I,offset,class). I是图像的feature,注意这些feature与SIFT与HoG之类的对histogram有区别,而是在每个像素位置都对应一个vector的feature,简单的理解,每一个像素点都有一个灰度值,这是最简单的feature特征,在实际的运用中, 会将一些高级的feature进行一定的改装,比如在Gall的原文就将HoG就行了一定的改装使得每一个像素点位置都有一个vector的特征表达。offset是这个patch到object center的偏移量,HF将这个引进来是成功的关键,也为最近几年的新型regression forests提供了基础。然后class就是这个patch到底属于背景还是前景。从所有的训练图像中提取若干的这样的patch后,训练准备工作就结束了,然后就开始了训练。 现在树还是空的,开始建第一个root节点。如前所述,每个节点就是一个split function, 最简单的形式就是选择两个像素位置,然后进行对比。这样一来,有以下问题: 1) 选哪两个位置 2) 如果有多维特征,比较哪一个特征 3) 比较的时候的阈值怎么设定 这些问题的答案很简单:try! 这是random forests的基本思想,位置随机产生一些pair,特征也random的选择一些出来,然后在特征的最大差和最小差之间随机的产生一下阈值。这样,三个随机就组合成了一个大的candidate的集合,每一个candidate都可以将当前的这些patch分为两个小的集合L和R。我们就需要衡量一下哪一个candidate最好,这就需要用到information gain了。但是在decision tree中的所谓的information gain其实不是真正意义上的Kullback-Leribler divergence,而是其估计值,即mutual information。既然大家都这么用了,也不深究了,如果想深究的人,特别是对信息论本身功力深厚的人可以去研究一下,说不定能整出点东西来。 我们这只关心这个mutual information怎么计算。公式如下: (p.s. i have no idea how to input equations in this blog so they will appear in terms of image) 这个公示应该一看就可以明白是什么意思,H(*)是Entropy,当前节点的entropy减去由某个candidate分成的两个set的entropy的和。当前节点的entropy肯定已经是个定值了,所以在实际的计算中直接省去,因为我们关注的是一个相对大小。关于Entropy的计算,那最常用的分类问题来讲就是p*\log(p)这种naive entropy方式计算。对于regression的问题,相对复杂一点。首先我们要做一个假设,比如假设这些局部数据是服从高斯分布的,然后通过高斯分布的协方差矩阵来计算连续型变量的entropy。听起来很复杂,在上文所述的tutorial中,也有很详尽的讨论。而我的直观理解是这样的,既然是服从高斯分布,那么最好的split就是把集中的东西分到一起,然后统计一下这些点的集中性,这当然也就是协方差的来源。在HF的文章中,其实就是统计的某个patch到平均offset的距离。HF的另外一个创新点就是在树的构建过程中,有的节点是做classification,有的节点在做regression的事,区别就在于entropy的计算方式。这样一来,一棵树会努力的将前景和背景分开,同时会将离object中心相似距离的patch分到一起。这个思想很nice,笔者根据这个思想进行了一点点的扩充,在2013的FG上写了一篇关于facial feature detection的文章,有兴趣的可以去读读。为了更直观的说明information gain的作用,下面有一个toy example: (a)中的数据有四类,均匀分布,然后split1 和split2是两个不同的split candidate,都是最简单的线性分类器,根据其info gain的值就知道split2的分类方式比split1的好。 如果是信息论的人应该知道,在info gain计算的过程中,对于entropy的估计是一个很有意思的课题。naive entropy在random forests中用了这么些年,一直没有人去质疑他,直到2012年的一篇ICML文章: Sebastian Nowozin , Improved Information Gain Estimates for Decision Tree Induction, ( PDF , arXiv , video recording ), 29th International Conference on Machine Learning (ICML 2012) . 作者也是微软剑桥的,他一个人写的。Nowozin很nice,我都了这篇文章后跟他讨论过一些细节。他回邮件很神速,也有可能是因为我们没有时差吧,还很幽默的跟我来了个Ni hao,可能是从我的英语水平或者名字判断是我是Chinese,后来的通信中一直用很多bukeqi之类的,然后我查看了一下,原来他在上海交大做过交换生,老婆应该也是个中国人,估计是交换时候的最大收获,呵呵。最近几年他发的文章都非常的不错,有晋升大牛人行列的潜质!在以上的文章中,他做了大量的实验,对不同的entropy estimators进行了比较,然后得出一个结论,其实有比naive entropy estimator好很多的estimator,所以希望大家能用! 言归正传,HF通过以上的方式将建立好树过后,所有的patch都到了leaf node,每一个patch都包含一个与center之间的offset的信息。所以在进行test的时候,patch从y0出来而来,根据test function一路向下,走到leaf node,发现很多的patch在那,每一个都有一个offset,进行一下vote,y=y0+offset。这样vote完过后,在object center的地方就会有个高峰。当然在实际的操作中,如果要进行多个scale的vote,training的patch还需要包含scale的信息。然后在每个scale得到一个voting map。最后就成了一个mode detection的问题。简单的meanshift 一下就出来了。所以,通过这样,HF就random forest和Hough voting就结合在了一起,就靠这个,连续发了n篇paper。 有个问题就是,如果将所有的training patch都存储起来,一是浪费存储空间,使得模型很big;二是不准确,因为有的patch就是些outier,不应该要。所以在后来的regression中,就在每个leaf node存一个模型,目前就两种简单的方式,一是learn一个简单的Gaussian model,vote的中心是Gaussian的mean value,weight由covariance matrix决定。在前面提到human pose estimation based on depth image中的系列文章中,除了那篇cvpr的best paper,后来的leaf node 的模型都是由mean shift聚类得到的某些,选取最大的1到2个类的中心作为vote的中心,weight是这个聚类的相对size大小。 就这样,random forests的regression方法在视觉领域得到了很多的应用,其中比较经典的文章,仍然出自于Gall的门生和微软剑桥视觉研究组。简单的罗列如下: Fanelli G., Gall J., and van Gool L., Real Time 3D Head Pose Estimation: Recent Achievements and Future Challenges ( PDF , Images/Videos/Data/Code ), 5th International Symposium on Communications, Control and Signal Processing (ISCCSP'12), 2012. ©IEEE Dantone M., Gall J., Fanelli G., and van Gool L., Real-time Facial Feature Detection using Conditional Regression Forests ( PDF , Images/Videos/Data/Code ), IEEE Conference on Computer Vision and Pattern Recognition (CVPR'12), 2578-2585, 2012. ©IEEE Fanelli G., Dantone M., Gall J., Fossati A. and van Gool L., Random Forests for Real Time 3D Face Analysis ( PDF , Images/Videos/Data/Code ), International Journal of Computer Vision, Special Issue on Human Computer Interaction, Vol 101(3), 437-458, Springer, 2013. ©Springer-Verlag Ross Girshick, Jamie Shotton, Pushmeet Kohli, Antonio Criminisi, and Andrew Fitzgibbon, Efficient Regression of General-Activity Human Poses from Depth Images , in ICCV , IEEE, October 2011. 小弟也发了有两篇regression forests在facial feature detection方面的拙作: Heng Yang, Ioannis Patras, Face Parts Localization Using Structured-output Regression Forests, ACCV2012, Dajeon, Korea. Heng Yang, Ioannis Patras, Privileged information-based Conditional Regression Forests for Facial Feature Detection, IEEE International Conference on Automatic Face and Gesture Recognition (FG), 2013, Shanghai, China. 两篇文章的档次都在iccv和cvpr之下。当时是第一年,效率也低,觉得把regression forests用在facial feature detection上不错,就开始做,结果就在ACCV的前几周,发现CVPR出录取结果了,Gall的学生就做了这么一件事,幸好我们对regression forests都作了改进,并且属于两个不同方面的。总之呢,research的道路不简单,哪怕即使只是ACCV或者FG,如果做的问题是如我做的facial feature detection这样的几十年都老问题,要想有个paper,都得有所建树。 下一篇,我会将将2012年和2013年这两年中regression forests的一些改进,主要集中在三个方面:一是怎么加入结构信息,二是怎样进行更好的split,三是一些新的应用领域。
9590 次阅读|1 个评论
[转载]Different feature selection methods implemented in R
chuangma2006 2012-10-24 01:58
# ----------------------------------- # Feature Selection in R # # Houtao Deng hdeng3@asu.edu # ----------------------------------- library(RRF); library(FSelector) library(varSelRF) library(glmnet) library(RWeka) set.seed(1) #1: linear case; 2: nonlinear case; 3: XOR case flag=2 #data simulation #only the first and the 21th feature are needed nCol = 100 X=matrix(runif(400*nCol, min=-2, max=2), ncol=nCol) #linear case if(flag==1) {class = (X ) + (X ) ix=which(classquantile(class, 1/2)); class = class*0-1; class =1} #nonlinear case if(flag==2){ class = (X )^2 + 1*(X )^2 ix=which(classquantile(class, 6/10)); ix=c(ix,which(classquantile(class, 1/10))); class = class*0-1; class =1} #plot if(flag==1|flag==2){ ix = which(class==1) X11(); plot(X ,X ,col="blue",pch=1, xlim=c(-3,3),ylim=c(-3,3),xlab="Variable 1",ylab="Variable 2") ix = which(class==-1) points(X ,X ,pch=3,col="red") legend("topright",legend=c("class 1","class 2"), col=c("blue","red"), pch=c(1,3))} #XOR case if(flag==3){ bSample = sample(0:1,400*nCol,replace=TRUE) X=matrix(bSample,ncol=nCol) class = (xor(X ,X )) } #duplicate #X =X ;X =X ; data = data.frame(cbind(X,class));data =as.factor(data ) listFea = list() #Chisquare weights - chi.squared(class~., data) subset - cutoff.k(weights, 5) subset=c("Chi-Square Top 5",paste(subset)) listFea ]=subset #Information Gain weights=information.gain(class~., data) subset - cutoff.k(weights, 5) subset=c("Information Gain Top 5",paste(subset)) listFea ]=subset #CFS from FSelector subset - cfs(class~., data) subset=c("CFS-FSelector",paste(subset)) listFea ]=subset #--- CFS from RWeka nombi=make_Weka_filter("weka/filters/supervised/attribute/AttributeSelection") datbin - nombi(class ~., data=data, control =Weka_control( E="weka.attributeSelection.CfsSubsetEval ", S="weka.attributeSelection.BestFirst -D 1 -N 5" )) CFSRweka=colnames(datbin) CFSRweka=c("CFSRweka",paste(CFSRweka)) listFea ]=CFSRweka #LASSO cvob1=glmnet(X,as.factor(class),family="binomial",lambda=0.1,alpha=1) coef=coef(cvob1) coef=which(coef0.001)-1;coef=coef coef=c("LASSO",paste("V",coef,sep="")) listFea ]=coef #RF-RFE Ignore the warning here. RFE=varSelRF(X,as.factor(class), c.sd = 1, mtryFactor = ncol(X), ntree = 500, vars.drop.num = NULL, vars.drop.frac = 0.2, whole.range = TRUE, recompute.var.imp = FALSE, verbose = FALSE, returnFirstForest = TRUE, fitted.rf = NULL, keep.forest = FALSE) RFEFS=RFE$selected.vars; RFEFS=c("RF-RFE",RFEFS) listFea ]=RFEFS #----RRF--- #ordinary random forest. rf - RRF(X,as.factor(class), flagReg = 0,importance=TRUE) impRF=rf$importance impRF=impRF imp=impRF/(max(impRF))#normalize the importance score coefReg=0.9*0.7+0.1*imp #weighted average rrf - RRF(X,as.factor(class),coefReg=coefReg,mtry=ncol(X),importance=TRUE) imp=rrf$importance imp=imp FS_RRF = which(imp0) FS_RRF=c("RRF",paste("V",FS_RRF,sep="")) listFea ]=FS_RRF print(listFea)
个人分类: R|3947 次阅读|0 个评论
[转载]《友谊地久天长》(诗经版)
热度 1 caijj09 2012-1-8 00:43
问尔所之,是否如适。 Are you going to Scarborough Fair? 蕙兰芫荽,郁郁香芷。 Parsely sage rosemary and thyme. 彼方淑女,凭君寄辞。 Remember me to one who lives there. 伊人曾在,与我相知。 She once was a true love of mine. 嘱彼佳人,备我衣缁。 Tell her to make me a cambric shirt. 蕙兰芫荽,郁郁香芷。 Parsely sage rosemary and thyme. 勿用针砧,无隙无疵。 Without no seams nor needle work. 伊人何在,慰我相思。 Then she will be a true love of mine. 彼山之阴,深林荒址。 On the side of hill in the deep forest green, 冬寻毡毯,老雀燕子。 Tracing of sparrow on snow crested brown. 雪覆四野,高山迟滞。 Blankets and bed clothers the child of maintain 眠而不觉,寒笳清嘶。 Sleeps unawafe of the clarion call. 嘱彼佳人,营我家室。 Tell her to find me an acre of land. 蕙兰芫荽,郁郁香芷。 Parsely sage rosemary and thyme. 良田所修,大海之坻。 Between the salt water and the sea strand, 伊人应在,任我相视。 Then she will be a true love of mine. 彼山之阴,叶疏苔蚀。 On the side of hill a sprinkling of leaves 涤我孤冢,珠泪渐渍。 Washes the grave with slivery tears. 惜我长剑,日日拂拭。 A soldier cleans and polishes a gun. 寂而不觉,寒笳长嘶。 Sleeps unaware of the clarion call. 嘱彼佳人,收我秋实。 Tell her to reap it with a sickle of leather. 蕙兰芫荽,郁郁香芷。 Parsely sage rosemary and thyme. 敛之集之,勿弃勿失。 And gather it all in a bunch of heather. 伊人犹在,唯我相誓。Then she will be a ture love of mine. 烽火印啸,浴血之师。 War bellows blazing in scarlet battalions. 将帅有令,勤王之事。 Generals order their soldiers to kill and to fight for a cause. 争斗缘何,久忘其旨。 They have long ago forgoten. 痴而不觉,寒笳悲嘶。 Sleeps unaware of the clarion call. URL:http://zhidao.baidu.com/question/6389773.html
个人分类: 生活感悟|2821 次阅读|1 个评论
并非每个老年科学家的去世,都是科学界的巨大损失
benyang22 2011-7-31 01:05
最近读 Leo Breiman 的文章。他的文章 "Random forests" 是2001年写的,那年他73岁。这篇文章在发表后的十年里,根据 Google Scholar, 已经被引用4500次。Random forest 也成为最流行的机器学习的算法之一。时下风靡全球的微软游戏机 XBox 360 里的人体动作识别,就是用 random forest 算出来的。 写出这篇文章的四年之后,2005年,Breiman 因癌症去世。他的去世,可以说是统计界、机器学习界的巨大损失。如果他还能多活几年,没准会给世界贡献出新的算法。Breiman 可以说是越老越勇猛。他1993年从美国UC Berkeley 退休以后的科学成果,恐怕比他退休以前的还要大。他的另一篇雄文 "Bagging predictors"(被引用7100次)也是退休之后的1996年写的。 并非每个老年科学家的去世,都是科学界的巨大损失。很多科学家,尽管年轻时有过辉煌的时候,老去之后,或是不再从事研究,或是沉醉于各种官位和马屁,或是知识和方法的过时,或是脑袋的衰退和僵化,他们对科学不再有贡献,他们的作用在科学界里变得无关紧要。他们的去世,是他们的家人和友人的巨大损失,是科学历史的一个事件,但不是科学界的巨大损失。
个人分类: 科技世界|4370 次阅读|0 个评论
A picture is worth a thousand words (on forest)
热度 1 zuojun 2011-3-7 07:09
I will teach forests on Monday. I thought you may be interested in what a physical oceanographer has to say about world forests. Take a look at the three maps (= three thousand words?) in my lecture ppt. How do you feel as a Chinese? Forests_spr2011_4p.pdf
个人分类: Education|3063 次阅读|4 个评论
Petrified Forest National Park
zuojun 2011-1-4 08:52
The second stop of sightseeing during my one-way driving trip from San Diego to Fort Worth is the Petrified Forest National Park , AZ. The forecast predicted a severe weather of heavy snow, starting at noon on December 29 in the area, but we were determined to go to the park that morning. (The snow did come, and may be the biggest one of this winter for the area.) It turned out to be a quick visit, because the wind was strong and the air, bitter cold. It is a place that one should spend a day for some short hiking, so I hope to return but not in winter or summer. Petrified wood (from the Greek root petro meaning rock or stone; literally wood turned into stone) is the name given to a special type of fossilized remains of terrestrial vegetation. It is the result of a tree having turned completely into stone by the process of permineralization. All the organic materials have been replaced with minerals (most often a silicate , such as quartz ), while retaining the original structure of the wood. Unlike other types of fossils which are typically impressions or compressions, petrified wood is a three dimensional representation of the original organic material. The petrifaction process occurs underground, when wood becomes buried under sediment and is initially preserved due to a lack of oxygen which inhibits aerobic decomposition. Mineral-laden water flowing through the sediment deposits minerals in the plant's cells and as the plant's lignin and cellulose decay, a stone mould forms in its place. In general, wood takes fewer than 100 years to petrify. The organic matter needs to become petrified before it decomposes completely. A forest where the wood has petrified becomes known as a petrified forest . One of such places is the Petrified Forest National Park , AZ. If you plan to see the Grand Canyon South Rim, leave an extra day for the park and another half day for the Meteor Crater in between the two parks.
个人分类: From the U.S.|2871 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-11 19:58

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部