k

K-Means中K值的选取 K-Means中K值的选择(1)拍脑袋法(2)肘部法则(Elbow Method)(3)间隔统计量(Gap Statistic)(4)轮廓系数(Silhouette Coefficient)(5)Canopy算法 K-Means是一个很简单的聚类方法,说它简单,主要原因是使用它时只需设置一个K值(设置需要将数据聚成几类)。但问题是,有时候我们拿到的数据根本不知道要分为几类,对于二维的数据,我们还能... 阅读详情



CATransition is an Objective-C wrapper for creating view transitions. As of 3.1.2, there are 11 types of transitions. 4 of them are SDK-compatible, but are the most boring ones. The following shows all 11 types of transition from picture "A" to "B" at 40%. The subtypes, if any, is "fromLeft".

subtype and filter

Many transitions have are further divided into several discrete subtypes. They often control the movement direction of the animation.

Some transitions accept addition arguments through the filter property, for example, you can set the location of suckEffect using

复制代码
...
CAFilter* filter = [CAFilter filterWithName:@"suckEffect"];
[filter setValue:[NSValue valueWithCGPoint:CGPointMake(160, 240)] forKey:@"inputPosition"];
transition.filter = filter;
...
复制代码
Transition Subtypes Accepted parameters
moveIn
push
reveal
fromLeft, fromRight, fromBottom, fromTop -
pageCurl, pageUnCurl fromLeft, fromRight, fromTop, fromBottom float inputColor[];
cube
alignedCube
fromLeft, fromRight, fromTop, fromBottom float inputAmount; (perspective)
flip
alignedFlip
oglFlip
fromLeft, fromRight, fromTop, fromBottom float inputAmount;
cameraIris - CGPoint inputPosition;
rippleEffect - -
rotate 90cw, 90ccw, 180cw, 180ccw -
suckEffect - CGPoint inputPosition;

Availability

The following shows the availability of different CATransitions starting from 2.0

CATransition Availability
fade
moveIn
push
reveal
(Public API) 2.0–
flip
alignedFlip
oglFlip
2.0–
cube
alignedCube
2.0–
pageCurl
pageUnCurl
2.0–
rippleEffect 2.0–
suckEffect 2.0–
cameraIris
cameraIrisHollowOpen
cameraIrisHollowClose
2.0–
rotate 4.0–
spewEffect
genieEffect
unGenieEffect
twist
swirl
charminUltra
reflection
zoomyIn
zoomyOut 
mapCurl
mapUnCurl
oglApplicationSuspend
cameraIrisHollow
2.0–2.2

References

 

UIViewAnimation动画与Core Animation的CATransition类动画

1.使用UIView类函数实现:

//UIViewAnimationTransitionFlipFromLeft, 向左转动
//UIViewAnimationTransitionFlipFromRight, 向右转动
//UIViewAnimationTransitionCurlUp, 向上翻动
//UIViewAnimationTransitionCurlDown, 向下翻动

 

[UIView beginAnimations:@"animationID" context:nil];
[UIView setAnimationDuration:0.5f]; //动画时长
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; //给视图添加过渡效果
//在这里写你的代码.
[UIView commitAnimations]; //提交动画

 

2.使用CATransition对象来实现:

CATransition比较强大,一般可以使用CATransition模拟UIView的动画。

    /* 过渡效果
fade     //交叉淡化过渡(不支持过渡方向)
push     //新视图把旧视图推出去
moveIn   //新视图移到旧视图上面
reveal   //将旧视图移开,显示下面的新视图
cube     //立方体翻滚效果
oglFlip  //上下左右翻转效果
suckEffect   //收缩效果,如一块布被抽走(不支持过渡方向)
rippleEffect //滴水效果(不支持过渡方向)
pageCurl     //向上翻页效果
pageUnCurl   //向下翻页效果
cameraIrisHollowOpen  //相机镜头打开效果(不支持过渡方向)
cameraIrisHollowClose //相机镜头关上效果(不支持过渡方向)
*/

 

/* 过渡方向
fromRight;
fromLeft;
fromTop;
fromBottom;
*/
CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = 0.5f; //动画时长
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.fillMode = kCAFillModeForwards;
animation.type = @”cube”; //过度效果
animation.subtype = @”formLeft”; //过渡方向
animation.startProgress = 0.0 //动画开始起点(在整体动画的百分比)
animation.endProgress = 1.0;  //动画停止终点(在整体动画的百分比)
animation.removedOnCompletion = NO;
[self.view.layer addAnimation:animation forKey:@"animation"];

 

转自:http://www.cnblogs.com/project/archive/2011/09/27/2193556.html

 

实现iPhone漂亮的动画效果主要有两种方法:

  一种是UIView层面的,

  一种是使用CATransition进行更低层次的控制,

  第一种是UIView,UIView方式可能在低层也是使用CATransition进行了封装,它只能用于一些简单的、常用的效果展现,这里写一个常用的示例代码,供大家参考。

  Cpp代码

  [UIView beginAnimations:@"Curl"context:nil];//动画开始

  [UIView setAnimationDuration:0.75];

  [UIView setAnimationDelegate:self];

  [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:myview cache:YES];

  [myview removeFromSuperview];

  [UIView commitAnimations];

  第二种方式相对复杂一些,但如果更好的进行控制,还是使用这种方法吧,

  基本使用方法可以看一下如下例子:

  Cpp代码

  CATransition *animation = [CATransition animation];

  [animation setDuration:1.25f];

  [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];

  [animation setType:kCATransitionReveal];

  [animation setSubtype: kCATransitionFromBottom];

  [self.view.layer addAnimation:animation forKey:@"Reveal"];

  这里使用了setType与setSubtype组合,这使用个比较保险,因为他的参数就是官方API里定义的,他们的参数说明可以参考如下:

  [animation setType:@"suckEffect"];

  这里的suckEffect就是效果名称,可以用的效果主要有:

  Cpp代码

  pageCurl 向上翻一页

  pageUnCurl 向下翻一页

  rippleEffect 滴水效果

  suckEffect 收缩效果,如一块布被抽走

  cube 立方体效果

  oglFlip 上下翻转效果

 

 

 

iphone中CABasicAnimation和UIView动画的区别[转]

关于UIView动画:

  1. [UIView beginAnimations :@ "zoom out" context :nil ] ;
  2. [UIView setAnimationDuration : 1. f ] ;
  3. [UIView setAnimationCurve :UIViewAnimationCurveEaseOut ] ;
  4. cover. transform  = CGAffineTransformMakeScale ( 9.25, 7.05 ) ;
  5. cover. center  = CGPointMake ( 430,  512 ) ;
  6. [UIView commitAnimations ]

UIView动画是应用在一个view上面的。

关于CABasicAnimation动画:

  1. -  (CAAnimation  * )animationMove : (CGPoint )rootCenter
  2. {
  3.     CABasicAnimation  *animationMove
  4.      =  [CABasicAnimation animationWithKeyPath :@ "position" ] ;
  5.     animationMove. duration  =  1 ;
  6.     animationMove. autoreverses  = NO ;
  7. //    animationMove.delegate = self;
  8.     animationMove. removedOnCompletion  = NO ;
  9.     animationMove. fillMode  = kCAFillModeForwards ;
  10.     animationMove. fromValue  =  [NSValue valueWithCGPoint :self. oldCoverCenter ] ;
  11.     animationMove. toValue  = [NSValue valueWithCGPoint :rootCenter ] ;
  12.  
  13.      return animationMove ;
  14. }

CABasicAnimation动画是应用在一个layer上面的。

注:
1,把一个image放在一个view的layer上来放大的时候,如果用UIView来做,图片不会太多的失真和闪烁的效果,但是用CABasicAnimation来做失真和闪烁现象会很严重,效果很不好。
2,做 动画的叠加效果 很简单,只要把各自的动画放在一起就可以了。请看这个效果:一本书边移动到屏幕中间,边放大,边打开封面的效果。

  1. [imageLayer addAnimation : [self animationOpen ] forKey :@ "Open" ] ;
  2. [UIView beginAnimations :@ "zoom out" context :nil ] ;
  3. [UIView setAnimationDuration : 1. f ] ;
  4. [UIView setAnimationCurve :UIViewAnimationCurveEaseOut ] ;
  5. cover. transform  = CGAffineTransformMakeScale ( 5.5, 5.5 ) ;
  6. cover. center  = CGPointMake ( 629,  384 ) ;
  7. [UIView commitAnimations ] ;
  8.  
  9. -  (CAAnimation  * )animationOpen
  10. {
  11.     CABasicAnimation  *animationOpen
  12.      =  [CABasicAnimation animationWithKeyPath :@ "transform.rotation.y" ] ;
  13.     animationOpen. duration  =  1 ;
  14.     animationOpen. autoreverses  = NO ;
  15.     animationOpen. delegate  = self ;   //然后执行真正地打开书的内容
  16.     animationOpen. removedOnCompletion  = NO ;
  17.     animationOpen. fillMode  = kCAFillModeForwards ;
  18.     animationOpen. fromValue  =  [NSNumber numberWithFloat :-M_PI / 5 ] ;
  19.     animationOpen. toValue  =  [NSNumber numberWithFloat :-M_PI / 1.5 ] ;
  20.  
  21.      return animationOpen ;
  22. }
 
CATransition is an Objective-C wrapper for creating view transitions. As of 3.1.2, there are 11 types of transitions. 4 of them are SDK-compatible, but are the most boring ones. The following shows all 11 types of transition from picture "A" to "B" at 40%. The subtypes, if any, is "fromLeft".

subtype and filter

Many transitions have are further divided into several discrete subtypes. They often control the movement direction of the animation.

Some transitions accept addition arguments through the filter property, for example, you can set the location of suckEffect using

复制代码
...
CAFilter* filter = [CAFilter filterWithName:@"suckEffect"];
[filter setValue:[NSValue valueWithCGPoint:CGPointMake(160, 240)] forKey:@"inputPosition"];
transition.filter = filter;
...
复制代码
Transition Subtypes Accepted parameters
moveIn
push
reveal
fromLeft, fromRight, fromBottom, fromTop -
pageCurl, pageUnCurl fromLeft, fromRight, fromTop, fromBottom float inputColor[];
cube
alignedCube
fromLeft, fromRight, fromTop, fromBottom float inputAmount; (perspective)
flip
alignedFlip
oglFlip
fromLeft, fromRight, fromTop, fromBottom float inputAmount;
cameraIris - CGPoint inputPosition;
rippleEffect - -
rotate 90cw, 90ccw, 180cw, 180ccw -
suckEffect - CGPoint inputPosition;

Availability

The following shows the availability of different CATransitions starting from 2.0

CATransition Availability
fade
moveIn
push
reveal
(Public API) 2.0–
flip
alignedFlip
oglFlip
2.0–
cube
alignedCube
2.0–
pageCurl
pageUnCurl
2.0–
rippleEffect 2.0–
suckEffect 2.0–
cameraIris
cameraIrisHollowOpen
cameraIrisHollowClose
2.0–
rotate 4.0–
spewEffect
genieEffect
unGenieEffect
twist
swirl
charminUltra
reflection
zoomyIn
zoomyOut 
mapCurl
mapUnCurl
oglApplicationSuspend
cameraIrisHollow
2.0–2.2

References

 

UIViewAnimation动画与Core Animation的CATransition类动画

1.使用UIView类函数实现:

//UIViewAnimationTransitionFlipFromLeft, 向左转动
//UIViewAnimationTransitionFlipFromRight, 向右转动
//UIViewAnimationTransitionCurlUp, 向上翻动
//UIViewAnimationTransitionCurlDown, 向下翻动

 

[UIView beginAnimations:@"animationID" context:nil];
[UIView setAnimationDuration:0.5f]; //动画时长
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; //给视图添加过渡效果
//在这里写你的代码.
[UIView commitAnimations]; //提交动画

 

2.使用CATransition对象来实现:

CATransition比较强大,一般可以使用CATransition模拟UIView的动画。

    /* 过渡效果
fade     //交叉淡化过渡(不支持过渡方向)
push     //新视图把旧视图推出去
moveIn   //新视图移到旧视图上面
reveal   //将旧视图移开,显示下面的新视图
cube     //立方体翻滚效果
oglFlip  //上下左右翻转效果
suckEffect   //收缩效果,如一块布被抽走(不支持过渡方向)
rippleEffect //滴水效果(不支持过渡方向)
pageCurl     //向上翻页效果
pageUnCurl   //向下翻页效果
cameraIrisHollowOpen  //相机镜头打开效果(不支持过渡方向)
cameraIrisHollowClose //相机镜头关上效果(不支持过渡方向)
*/

 

/* 过渡方向
fromRight;
fromLeft;
fromTop;
fromBottom;
*/
CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = 0.5f; //动画时长
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.fillMode = kCAFillModeForwards;
animation.type = @”cube”; //过度效果
animation.subtype = @”formLeft”; //过渡方向
animation.startProgress = 0.0 //动画开始起点(在整体动画的百分比)
animation.endProgress = 1.0;  //动画停止终点(在整体动画的百分比)
animation.removedOnCompletion = NO;
[self.view.layer addAnimation:animation forKey:@"animation"];

 

转自:http://www.cnblogs.com/project/archive/2011/09/27/2193556.html

 

实现iPhone漂亮的动画效果主要有两种方法:

  一种是UIView层面的,

  一种是使用CATransition进行更低层次的控制,

  第一种是UIView,UIView方式可能在低层也是使用CATransition进行了封装,它只能用于一些简单的、常用的效果展现,这里写一个常用的示例代码,供大家参考。

  Cpp代码

  [UIView beginAnimations:@"Curl"context:nil];//动画开始

  [UIView setAnimationDuration:0.75];

  [UIView setAnimationDelegate:self];

  [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:myview cache:YES];

  [myview removeFromSuperview];

  [UIView commitAnimations];

  第二种方式相对复杂一些,但如果更好的进行控制,还是使用这种方法吧,

  基本使用方法可以看一下如下例子:

  Cpp代码

  CATransition *animation = [CATransition animation];

  [animation setDuration:1.25f];

  [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];

  [animation setType:kCATransitionReveal];

  [animation setSubtype: kCATransitionFromBottom];

  [self.view.layer addAnimation:animation forKey:@"Reveal"];

  这里使用了setType与setSubtype组合,这使用个比较保险,因为他的参数就是官方API里定义的,他们的参数说明可以参考如下:

  [animation setType:@"suckEffect"];

  这里的suckEffect就是效果名称,可以用的效果主要有:

  Cpp代码

  pageCurl 向上翻一页

  pageUnCurl 向下翻一页

  rippleEffect 滴水效果

  suckEffect 收缩效果,如一块布被抽走

  cube 立方体效果

  oglFlip 上下翻转效果

 

 

 

iphone中CABasicAnimation和UIView动画的区别[转]

关于UIView动画:

  1. [UIView beginAnimations :@ "zoom out" context :nil ] ;
  2. [UIView setAnimationDuration : 1. f ] ;
  3. [UIView setAnimationCurve :UIViewAnimationCurveEaseOut ] ;
  4. cover. transform  = CGAffineTransformMakeScale ( 9.25, 7.05 ) ;
  5. cover. center  = CGPointMake ( 430,  512 ) ;
  6. [UIView commitAnimations ]

UIView动画是应用在一个view上面的。

关于CABasicAnimation动画:

  1. -  (CAAnimation  * )animationMove : (CGPoint )rootCenter
  2. {
  3.     CABasicAnimation  *animationMove
  4.      =  [CABasicAnimation animationWithKeyPath :@ "position" ] ;
  5.     animationMove. duration  =  1 ;
  6.     animationMove. autoreverses  = NO ;
  7. //    animationMove.delegate = self;
  8.     animationMove. removedOnCompletion  = NO ;
  9.     animationMove. fillMode  = kCAFillModeForwards ;
  10.     animationMove. fromValue  =  [NSValue valueWithCGPoint :self. oldCoverCenter ] ;
  11.     animationMove. toValue  = [NSValue valueWithCGPoint :rootCenter ] ;
  12.  
  13.      return animationMove ;
  14. }

CABasicAnimation动画是应用在一个layer上面的。

注:
1,把一个image放在一个view的layer上来放大的时候,如果用UIView来做,图片不会太多的失真和闪烁的效果,但是用CABasicAnimation来做失真和闪烁现象会很严重,效果很不好。
2,做 动画的叠加效果 很简单,只要把各自的动画放在一起就可以了。请看这个效果:一本书边移动到屏幕中间,边放大,边打开封面的效果。

  1. [imageLayer addAnimation : [self animationOpen ] forKey :@ "Open" ] ;
  2. [UIView beginAnimations :@ "zoom out" context :nil ] ;
  3. [UIView setAnimationDuration : 1. f ] ;
  4. [UIView setAnimationCurve :UIViewAnimationCurveEaseOut ] ;
  5. cover. transform  = CGAffineTransformMakeScale ( 5.5, 5.5 ) ;
  6. cover. center  = CGPointMake ( 629,  384 ) ;
  7. [UIView commitAnimations ] ;
  8.  
  9. -  (CAAnimation  * )animationOpen
  10. {
  11.     CABasicAnimation  *animationOpen
  12.      =  [CABasicAnimation animationWithKeyPath :@ "transform.rotation.y" ] ;
  13.     animationOpen. duration  =  1 ;
  14.     animationOpen. autoreverses  = NO ;
  15.     animationOpen. delegate  = self ;   //然后执行真正地打开书的内容
  16.     animationOpen. removedOnCompletion  = NO ;
  17.     animationOpen. fillMode  = kCAFillModeForwards ;
  18.     animationOpen. fromValue  =  [NSNumber numberWithFloat :-M_PI / 5 ] ;
  19.     animationOpen. toValue  =  [NSNumber numberWithFloat :-M_PI / 1.5 ] ;
  20.  
  21.      return animationOpen ;
  22. }
 
聚类方法:K-means、K-modes和K-prototypes 首先:得对数据进行标准化 min-max标准化(离差标准化):对原始数据进行线性变换,是结果落到【0,1】区间,转换方法为 X'=(X-min)/(max-min),其中max为样本数据最大值,min为样本数据最小值。 from sklearn import preprocessing X = preprocessing.MinMaxScaler().fit_transform(X) 一... 阅读详情

相关推荐

K-means、K-means ++、K-modes和K-prototype聚类算法简述 附Python代码

K-means K-means属于聚类算法中最简单的一种,也是一种无监督学习的算法。 步骤: 按上图所示,具体步骤如下: 1. 设定初始簇的个数,上图为2 2. 使用欧式距离对簇进行分类,与最近的簇为一类,如上图所示,分为红蓝两类 3. 对已分类的所有数据区均值,取X/Y坐标的平均值,设为新的中心点,如上图c-d的操作 4. 重新对簇进行分类(如步骤2),如上

新手村 1万+

机器学习之K均值(K-Means)算法

1.K-Means简介 K均值(K-Means)算法是无监督的聚类方法,实现起来比较简单,聚类效果也比较好,因此应用很广泛。K-Means算法针对不同应用场景,有不同方面的改进。我们从最传统的K-Means算法讲起,然后在此基础上介绍初始化质心优化K-Means++算法,距离计算优化Elkan K-Means算法和大样本情况下Mini Batch K-Means算法。 K-Means算法的思想...

谓之小一 9810

K-Means(K-均值)、k-median聚类算法机器学习

聚类 聚类,简单来说,就是将一个庞杂数据集中具有相似特征的数据自动归类到一起,称为一个簇,簇内的对象越相似,聚类的效果越好。它是一种无监督的学习(Unsupervised Learning)方法,不需要预先标注好的训练集。聚类与分类最大的区别就是分类的目标事先已知,例如猫狗识别,你在分类之前已经预先知道要将它分为猫、狗两个种类;而在你聚类之前,你对你的目标是未知的,同样以动物为例,对于一个动物集来说,你并不清楚这个数据集内部有多少种类的动物,你能做的只是利用聚类方法将它自动按照特征分为多类,然后人为给出这个

Tc、zyh的博客 6955

NR - k0, k1, k2

今天介绍协议中的k0,k1,k2。 它们的物理含义都比较简单,k0是指下行调度DCI与其调度的PDSCH之间的Slot间隔,k1指PDSCH与其HARQ-ACK反馈的Slot间隔,k2指上行调度DCI与其调度的PUSCH之间的Slot间隔。 一.k0 对于SI-RNTI/RA-RNTI/TC-RNTI/P-RNTI,遵循的基本原则都是一样的...

3万+

K-WL,K-FWL,set k-WL的区别:

参考:这里有介绍 K-WL和 K-FWLWeisfeiler-Lehman Test - 馒头and花卷 - 博客园 (cnblogs.com)

qq_45770988的博客 1430

K线入门之初识K线

K线图

Shiner 2万+

K-Means聚类最优k值的选取

最近做一个文本分类的项目,在最开始的时候会用到K-means的聚类方法,因此需要在文本上找到最佳的聚类数。 1. 手肘法 1.1 理论 手肘法的评价K值好坏的标准是SSE(sum of the squared errors) SSE=∑p∈Ci|p−mi|2SSE=∑p∈Ci|p−mi|2SSE= \sum_{p\in C_i}|p-m_i|^2 其中 CiCiC_i代表第iii...

harry的博客 2万+

【面试集锦】k=k++到底有没有执行自增操作

人生三大境界,见山是山,见山不是山,见山还是山!​ 学了好多年Java,你知道你写的java代码到底是什么样子的吗?k=k++,这样一个简单的代码,就足够考验考验Java程序员的斤两。​ 类似这样的非人类代码的面试题,其实不在少数。这一类面试题,想要考验的,从来不仅仅是程序员的代码理解能力,而是对语言底层逻辑的熟悉程度。​ 如果你是一个刚入门的Java新手,那么,对于这一类问题,只要能够推断出执行的结果就行了。

roykingw的专栏 1248

K-Means及K-Means++算法Python源码实现

K-Means及K-Means++算法Python源码实现

全性保真,不以物累形。 8374

使用 k3d 在Windows上安装 k3s

记述了windowns 下使用k3d安装 k3s 的方法,以便学习

小子宝丁的博客 3918

CISSP/CCSP证书到手后别松懈!保姆级维持攻略:CPE积分怎么攒?年费怎么交?

本文为CISSP/CCSP持证者提供详细的维持认证攻略,重点介绍如何高效积累CPE积分和避免年费缴纳中的常见问题。通过免费与付费资源结合的策略,帮助持证者轻松完成年度认证要求,同时利用认证创造职业价值。

weixin_30859423的博客 416

k近邻和k-means

k近邻和k-means,听名称很相似,很容易张冠李戴。其实它们的全名为K近邻分类算法(k-Neighbour,KNN)和K均值聚类算法(K-means clustering algorithm)。 k紧邻是一中基本的分类与回归算法,是监督学习算法,没有明显的训练学习过程。 k-means是聚类算法,是无监督学习算法,有训练步骤。 k近邻 k近邻(k-neareast neighbor)的直观理解就是:给定一个训练数据集T={(xi,yi),⋯ ,(xn,yn)}T = \left \{ \left (

陶将的博客 1万+

从零到精通:ROS2 MoveIt2与MPC机械臂轨迹规划的完整配置流程

本文详细介绍了ROS2 MoveIt2与MPC机械臂轨迹规划的完整配置流程,从环境准备到高级功能扩展,帮助开发者实现精准控制。通过集成模型预测控制(MPC),机械臂能够优化复杂轨迹规划,处理动态避障,提升工业自动化效率。

juice的博客 706

K均值聚类算法以及模糊K均值算法研究,matlab

一.K-均值聚类(K-means)概述 1.聚类 “类”指的是具有相似形得几何。聚类是值将数据集划分为若干类,是的类内之间得数据最为相似,各类之间的数据相似度差别尽可能大。聚类分析就是以相似性为基础,对数据集进行聚类划分,属于无监督学习。 2.无监督学习和监督学习 K-均值聚类属于无监督学习。监督学习知道从对象(数据)中学习什么,而无监督学习无需知道所要搜寻的目标,它根据算法得到数据的共同特征。比...

kangjielearning的博客 1万+

SAR ADC设计——SAR Logic原理

SAR ADC设计——SAR Logic原理 参考:集成电路设计实践 SAR ADC 清华大学 李福乐 文章目录SAR ADC设计——SAR Logic原理一. Overview二. TSPC(True Single Phase Clock)三. SC_Gen(Sequential Control Generator)四. LATCH_Dynamic五. 时序控制逻辑总结六. SW产生七. DO产生八. GT产生九. SAR Logic模块总结 一. Overview 输入:CKC,CompB,SAMPL

夏风喃喃的博客 1万+

全在这了!全国分省90米、30米、12.5米、5米DEM高程模型数据下载方式汇总

全在这了!全国分省90米、30米、12.5米、5米DEM高程模型数据下载方式汇总 SRTM15(450米)免费下载 https://pan.baidu.com/s/1eO0U6wfzs7YSe2EQdxRJ2Q提取码:o7am GMTED(250米)免费下载 https://pan.baidu.com/share/init?surl=nrbbdbhyNVQV46XwqzqLlg 提取码:V7X9 SRTM3 (90米)免费下载 https://pan.baidu.com/share/..

TuxinyunGIS的博客 1万+

数据结构:设线性表中每个元素有两个数据项k1和k2,现对线性表按一下规则进行排序:先看数据项k1,k1值小的元素在前,大的在后;在k1值相同的情况下,再看k2,k2值小的在前,大的在后。满足这种要求的

题目: 设线性表中每个元素有两个数据项k1和k2,现对线性表按一下规则进行排序:先看数据项k1,k1值小的元素在前,大的在后;在k1值相同的情况下,再看k2,k2值小的在前,大的在后。满足这种要求的排序方法是( ) A.先按k1进行直接插入排序,再按k2进行简单选择排序 B.先按k2进行直接插入排序,再按k1进行简单选择排序 C.先按k1进行简单选择排序,再按k2进行直接插入排序 D.先按k2进行简单选择排序,再按k1进行直接插入排序 答题思路: 首先我们要明确题意,这一题的排序是针对k1和k2全体进

我想喝可乐的博客 8125

Vue3 - 详解实现网站接入微信扫码登录功能,微信授权生成登录二维码用户用手机扫描二维码登陆,微信扫描二维码登录详细流程及示例代码,支持弹框式、浏览器单独新开页显示,最新vue集成微信扫码授权登录!

vue3,nuxt3,PC网站,网页,微信扫码登录,微信登陆,vue3微信扫码登录,获取个人信息,扫码登录后如何获取用户手机号,微信扫码授权登录,vue3详细实现微信扫一扫登陆,pc网页微信登录,vue3集成微信扫码登录,详细流程和示例源码,第三方扫码登录,vue3微信扫码登录怎么新开一页,跳页显示二维码,内嵌登录二维码,iframe,iframe新页面弹出,弹出一个小窗口显示登录二维码,登录报错,微信扫码没反应,解决手机点登录报错没反应,官方文档,手机扫描微信二维码登录网站,最好用的插件,vue-wxlo

🏆 前端领域优质创作者 1万+

k-means聚类个数k的确定

参考文献;以及参考网站: tslearn’s documentation — tslearn 0.1.18.3 documentation 链接:http://tslearn.readthedocs.io/en/latest/index.html Silhouette (clustering) - Wikipedia 链接:https://en.wikipedia.org/wiki/Silhoue...

JiangLongShen的博客 4537

Sigrity Power DC Package Multi-Resistor Compact ET Model Extraction模式提取封装基板电热阻模型

DIE(定义DIE的参数):material设置为silicon(硅),Attach material(贴片的材料,设置为Die Attach),Attach thickness(贴片的材料的厚度,厚度设置为0.001mm,点击ok。Cap为覆盖材料,Material定义材料类型,thickness定义厚度,length和width定义长宽,Adhesive Material为胶的材料,Adhesive Material为胶的厚度,本例不定义,跳过即可。

weixin_54787054的博客 438

FPGA设计-Vivado的Off-Chip Termination设置问题

经常遇到在FPGA设计时,很多人很迷惑这些关于硬件的终端匹配怎么设置,Vivado的Off-Chip Termination设置问题,这里就详细说一下这个问题。

whm128的博客 2727

研发侧利器!k3d+k3s,轻松管理本地k3s集群!

前 言 前面的文章,我们都是围绕在k3s本身或是其关键的应用场景边缘计算中,阐述着相关内容。除了我们常提起的边缘计算领域,k3s还可以在研发侧提供便捷的k8s基础设施,在这个领域k3s的社区玩家们创造了一个小工具,它对于我们搭建本地k3s环境提供了非常大的便利,这个工具就是k3d。 Github链接:https://github.com/rancher/k3d k3d使用 k3d的下载是非常方便...

k3s中文社区 5149

42、多媒体与虚拟现实在艺术和影视领域的创新应用

本文探讨了多媒体与虚拟现实在艺术和影视领域的创新应用,涵盖三个典型案例:影视与人类学融合项目通过协作模式模糊作者与观众界限,推动文化文献的发展;交互式数字短片《分手》利用基于对象的广播技术探索个性化影视体验;威尼斯双年展瑞士馆4D项目则通过虚拟现实技术实现文化遗产的数字化展示。这些案例展示了技术在叙事、用户体验及文化保护中的深度应用,并展望了未来技术融合、个性化深化与文化遗产传承的发展趋势。

kappa的博客 114

聚类算法之K-Means,K-Means++,elkan K-Means和MiniBatch K-Means算法流程

聚类问题是机器学习中无监督学习的典型代表,在数据分析、模式识别的很多实际问题中得到了应用。我们知道,分类问题是机器学习中最常见的一类问题,它的目标是确定一个物体所属的类别。分类问题和聚类问题一个最重要的区别在于分类问题有标签,学习过程实际就是程序不断学习各个标签特点的过程,而聚类问题是一种无监督学习问题,我们事先并不知道这些事物一共多少个类,每个事物的所属类别,我们需要让程序基于一定的规则,自动地...

Jerry_Chang31的博客 1800

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

聚类算法 - K-Means、二分K-Means、K-Means 、K-Means||、Canopy、Mini Batch K-Means算法

K-Means 系列:K-Means,二分K-Means,K-Means++,K-Meansll,canopy算法,MiniBatchK-Means算法。 K-Means系列聚类算法原理:https://www.cnblogs.com/pinard/p/6164214.html 用scikit-learn学习K-Means聚类:https://www.cnblogs.com/pinar...

qfikh的博客 3646

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

上一篇: Core Animation 动画
下一篇: 关于UIView的autoresizingMask属性的研究
Ruansf
博客等级 码龄14年 1粉丝 12原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值