多元概率密度_利用多元论把握事件概率

多元概率密度

Humans have plenty of cognitive strengths, but one area that most of us struggle with is estimating, explaining and preparing for improbable events. This theme underpins two of Nassim Taleb’s major works: Fooled by Randomness and The Black Swan: The Impact of the Highly Improbable. In the latter work, Taleb defines a black swan events as having three characteristics: the event is a surprise (to the observer), it has a major effect, and people incorrectly try to rationalize it in hindsight (emphasis mine).

人类具有大量的认知能力,但是我们大多数人都在努力的领域之一是估计,解释和为不可能的事件做准备。 这个主题奠定了纳西姆·塔莱布 ( Nassim Taleb )的两部主要作品的基础: 愚弄随机和《黑天鹅:高度不可能的影响》 。 在后者的工作中,塔莱布将黑天鹅事件定义为具有三个特征:(对观察者而言)该事件是一个意外事件,具有重大影响,并且人们事后错误地尝试将其合理化 (强调我的观点 )。

Taleb focuses on black swan events on the world stage, such as the creation of the internet, World War I, and the dissolution of the Soviet Union. I believe that humans behave similarly, and to their detriment, with less unlikely events predicted by statistical models as long as they’re important. We’ve seen this recently in the results of the 2016 presidential election results. Models published by The Huffington Post, The New York Times, and 538 all had Hillary Clinton at a 71–98% chance of winning. After she lost the election, a common reaction was whether we could trust polls [and the models that rely on their data] again, which I was surprise to see even from statistically minded friends. Why is our gut reaction to scrutinize the model that said Trump had a 29% chance of winning? We wouldn’t question the fairness of a coin that comes up tails twice (25% chance) or a 1 of a rolled die (17% chance); both of which are lower than the odds given to Trump winning the 2016 election.

塔莱布(Taleb)专注于世界舞台上的黑天鹅事件,例如互联网的创建,第一次世界大战和苏联解体。 我相信人类的行为类似,并且对他们有害,只要它们很重要,统计模型就可以预测不太可能发生的事件。 我们最近在2016年总统选举结果中看到了这一点。 《赫芬顿邮报》 , 《纽约时报》和538发表的模型都以希拉里·克林顿的获胜机率达71–98%。 在她失去选举后,一个普遍的React是我们是否可以再次信任民意测验(以及依赖于他们数据的模型),即使是从统计学角度看的朋友,我也感到惊讶。 为什么我们的直觉会仔细审查表示特朗普有29%获胜机会的模型? 我们不会质疑两次出现尾巴的硬币的公平性(25%的机率)或一枚掷骰子的硬币的公平性(17%的机率); 两者都低于特朗普赢得2016年大选的机会。

I posit that this reaction, which is a form of rationalization by hindsight, is due to the lack of a mental framework to grapple with real world event probabilities, and that not having this framework can result in irrational decision-making. In order to illustrate this, let’s move away from the world of election modeling to a more common situation encountered in the business world.

我认为,这种React是事后回想的一种合理化形式,是由于缺乏解决现实世界事件概率的心理框架,而没有这个框架会导致非理性的决策。 为了说明这一点,让我们从选举建模的世界转移到商业世界中遇到的更常见的情况。

最黑暗的时间表 (The darkest timeline)

Imagine you’re a data scientist who models the probability of closing sales with potential clients at a business-to-business tech company. Your company is in the process of courting a particularly large client, Megacorp, and so the CEO checks your model every day to track the odds of closing the sale.

想象一下,您是一位数据科学家,他对企业对企业技术公司与潜在客户达成销售的可能性进行建模。 您的公司正在寻求一个特别大的客户Megacorp,因此CEO每天都要检查您的模型以跟踪完成交易的几率。

Thursday: 98% of closing sale

星期四 :收盘价的98%

Incredible news! Whatever your teammates are doing looks like it’s working.

令人难以置信的消息! 无论您的队友在做什么,都看起来很正常。

Friday: 99% of closing sale

星期五 :成交价的99%

Even better! The CEO starts planning the changes he’ll need to make to your business after the anticipated windfall. Hire more employees? Acquire a competitor? Buy a superbowl ad?

更好! 首席执行官开始计划在预期的意外收获后需要对您的业务进行的更改。 雇用更多员工? 收购竞争对手? 购买超级碗广告?

Monday: 0% of closing sale

星期一 :收盘价的0%

What happened?! You learn that the prospective client chose to go with a competitor at the last minute. This is a huge blow to everybody’s morale, and the time and energy the CEO spent dreaming about expansion after the sale he thought was practically guaranteed was wasted.

发生了什么?! 您了解到,潜在客户在最后一刻选择了与竞争对手同行。 这对每个人的士气都造成了巨大的打击,而CEO认为梦想中的扩张实际上浪费了很多时间和精力。

What’s a common reaction to this fiasco? “The model must be wrong!” the CEO declares during the postmortem meeting he calls with you. “We should have known that this wasn’t as likely as you said it was. I don’t want to hear from you until it’s fixed.”

对这场惨败的普遍React是什么? “模型一定是错误的!” CEO在事后会议上宣布与您通话。 “我们应该知道,这种可能性不如您所说的那样大。 在解决问题之前,我不希望收到您的来信。”

产生问题 (Creating a problem)

It’s possible that the CEO is correct. Your model could have predicted a lower chance of closing the sale that your company didn’t end up getting. However, it’s also possible that the model is fine. Your company had a very high chance of closing that sale, but the unlikely happened, and you just didn’t get it.

CEO可能是正确的。 您的模型可能会预测完成您的公司最终没有获得的销售的机会较低。 但是,该模型也可能很好。 贵公司有很高的机会完成那笔交易,但是发生的可能性很小,而您却没有得到。

You are now in an uncomfortable position. It’s possible that the only way of “improving” the model, is to produce one that estimates lower odds of closing the Megacorp sale at the expense of modeling future sales accurately. This is called overfitting. By complying with your CEO’s request in order to stay in his good graces, you’re doing damage to your model — and the company — by distorting predictions of future sales.

您现在处于不舒服的位置。 “改善”模型的唯一方法可能是产生一种估计Megacorp销售的较低赔率的方法,而以准确建模未来销售为代价 。 这称为过拟合 。 通过遵守CEO的要求以保持他的良好风度,您正在歪曲对未来销售的预测,从而损害了您的模型以及整个公司。

回归本源 (Back to basics)

Before we get to my proposed mental framework that can help folks better understand complex, real world event probabilities, let’s start with a simple example. Imagine you have a fair six sided die. You roll the die over and over and start recording results. After many rolls, you observe what you’d expect: around the same number of rolls come up with each number, one through six.

在我们提出可以帮助人们更好地理解复杂的,现实世界中的事件概率的心理框架之前,让我们从一个简单的示例开始。 想象您有一个公平的六面模。 您将骰子一遍又一遍地滚动并开始记录结果。 经过多次掷骰后,您会观察到期望的结果:每个号码都会出现相同数目的掷骰,从一到六。

After a few hundred rolls, you get an unlikely, and unlucky (in most games) streak. A 1, followed by another 1, followed by another 1! The odds of this happening are 1/216 = ~0.5%. This is an unlikely event. Are you surprised? Do you doubt the fairness of the die? Do you tell the die it better fix itself before you roll it again?

经过几百次掷骰后,您会获得不太可能的,不幸的(在大多数游戏中)连胜纪录。 一个1,然后是另一个1,然后是另一个1! 发生这种情况的几率是1/216 =〜0.5%。 这是不太可能发生的事件。 你惊喜吗? 您是否怀疑死亡的公平性? 您是否告诉模子在再次滚动之前更好地自我修复?

Most people, even those without any statistical training, would say no. What happened was unlikely, but the die was behaving as expected otherwise. Additionally, if we think hard enough about it, we can explain the mechanism behind the randomness of the die rolls. Once the die leaves your hand, it is subject to the laws of physics, and is entirely predictable. The reason die throws are random is that slight changes in the velocity and orientation immediately after release result in different outcomes. Nobody has the fine motor skills necessary to cheat at die rolling, which would allow them to let some numbers appear more frequently than others.

大多数人,甚至没有经过统计学培训的人也会拒绝。 发生的事情不太可能发生,但是死亡的行为与预期相反。 此外,如果我们认真考虑一下,就可以解释模头辊随机性背后的机理。 一旦模具离开您的手,它就受物理定律的约束,并且完全可以预测。 掷骰子是随机的,原因是释放后立即改变速度和方向会导致不同的结果。 没有人具有在压铸时作弊的必要的高级运动技能,这会使他们让某些数字比其他数字更频繁地出现。

We can use the idea of statistical populations, which are “a set of similar items or events which is of interest for some question or experiment” (Wikipedia). In this case, the items of interest are die rolls. As velocity and orientation vary, we get different outcomes.

我们可以使用统计种群的概念,即“一些问题或实验都感兴趣的一组相似的项目或事件”( 维基百科 )。 在这种情况下,感兴趣的项目是模具卷。 随着速度和方向的变化,我们得到不同的结果。

When we roll the die, what we’re doing is sampling from this population. The population of all possible throws (even the ones where the die drops out of your hand or is hurled out of an open window) contains equal shares of each outcome. If we think of this in terms of area, as is shown in the diagram above, we can imagine that the population has equal areas for each outcome, one through six.

当我们掷骰子时,我们正在做的是从这个总体中采样。 所有可能的掷出的总数(甚至是骰子掉落到您手中或被掷出一个打开的窗口的那些掷出)所包含的每个结果的份额相等。 如上图所示,如果我们以面积为单位来考虑这一点,我们可以想象每个结果中的人口具有相等的面积,从1到6。

A diagram with velocity on the y-axis and orientation on the x-axis showing die roll outcomes as areas.
Image Courtesy of Author
图片由作者提供

Before we add some complexity, I want to reinforce the idea that although there are only six equally likely die roll outcomes, there are infinite combinations of velocity and orientation, which when obeying the unchanging laws of physics, result in those outcomes. We can imagine doing two distinct types of work with this strong understanding of die rolling:

在我们增加一些复杂性之前,我想强调一下这样的观点:尽管只有六个同样可能的掷骰结果,但速度和方向有无限的组合,当遵循物理不变的定律时,会导致这些结果。 我们可以想象在对压铸有深入了解的情况下进行两种截然不同的工作:

  1. We can use our understanding of the equally weighted population outcomes to come up with optimal strategies in different areas such as games, gambling, and business.

    我们可以使用对加权平均结果的理解来提出不同领域(例如游戏,赌博和商业)的最佳策略。

  2. We could try to use our understanding of the mechanism driving the equal probabilities, namely that the velocity and orientation of the die after release can perfectly predict its outcome, to try to get certain outcomes to happen more frequently. A human couldn’t do this, but perhaps we could create a robot that can throw a die that results in 6s every time.

    我们可以尝试使用对驱动相等概率的机制的理解,即释放后模具的速度和方向可以完美地预测其结果,从而尝试使某些结果更频繁地发生。 人类无法做到这一点,但是也许我们可以创造一个可以掷出骰子的机器人,每次导致6s的死亡。

增加复杂性 (Adding back complexity)

What’s the statistical population in our sales example? Most folks would answer that it’s all possible sales clients. I’ve always found something frustrating with this definition: we can’t use it to explain why our model returns a 99% chance of landing the sale that we didn’t get without admitting that it must be model error. If that’s the case, our CEO — who is not an expert in probability and statistics— feels justified in his request.

我们的销售示例中的统计人口是多少? 大多数人会回答这是所有可能的销售客户。 我总是对这个定义感到沮丧:我们不能用它来解释为什么我们的模型在没有承认一定是模型错误的情况下获得了99%的机会获得了我们没有得到的销售。 如果是这样,我们的首席执行官(不是概率和统计专家)会觉得有道理。

Diagram of statistical population showing three companies and the predicted probabilities of sale.
Diagram Courtesy of Author
图由作者提供

One way we could address this is to group predictions together in accuracy buckets (e.g. 0–10%, 10–20%, … 90–100%) and chart their accuracies jointly. A well performing model will show that these predictions behave around what’s observed in aggregate.

我们可以解决这个问题的一种方法是将预测合并到准确度组中(例如0–10%,10–20%,…90–100%),并共同绘制其准确性。 表现良好的模型将表明,这些预测与总体观察到的结果一致。

This still doesn’t satisfy my need to understand that predicted 99%. Imagine that in aggregate, we predict 96% of the sales in the 90–100% predicted bucket to be closed, but only 95% are. One could still argue that by fixing the model, and bringing down our predicted 99%, we still improve this aggregate accuracy.

这仍然不能满足我对99%预测值的理解。 想象一下,总体而言,我们预计90-100%的预测存储段中的96%的销售将关闭,但只有95%的交易将关闭。 仍然可以说,通过修复模型并降低我们的预测99%,我们仍然可以提高这一总体准确性。

Chart showing aggregated predictions vs. actuals. The bars are not identical, which means there is model error.
Image Courtesy of Author
图片由作者提供

Unlike in the die rolling example, we can’t easily resample from the population. We can’t relive history, pitching Megacorp 100 times in 100 slightly different ways and land that sale 99 out of those 100 times. But we can imagine doing so with multiverse theory! In multiverse theory, specifically Level III: The Many-Worlds Interpretation, all possible outcomes of probabilistic events happen in some universe and do so in proportion to their probabilities. I’d like to define a multiverse population as the statistical populations (in this example: all potential clients) in all possible universes. Expanding upon the statistical population example above, we can turn every dot, which represented each potential client, into a circle which represents that potential client’s outcomes in all universes. The higher the likelihood of winning that client’s business, the greater the proportion of universes in which their business is won, and therefore the larger the area in the client circle. Note that if I shaded in the entire multiverse population, it would resemble the die rolling diagram I shared earlier.

与模版滚动示例不同,我们无法轻松地从总体中重新采样。 我们无法重温历史,以100种略有不同的方式向Megacorp推销100次,并在这100次中售出99次。 但是我们可以想象用多元宇宙理论来做到这一点! 在多元宇宙理论中 ,特别是在第III层级:“多世界解释”中 ,概率事件的所有可能结果都发生在某个宇宙中,并且与它们的概率成比例地发生。 我想将多宇宙人口定义为所有可能宇宙中的统计人口(在本例中为所有潜在客户) 扩展上面的统计总体示例,我们可以将代表每个潜在客户的每个点变成一个圆圈,该圆圈代表所有宇宙中该潜在客户的结果。 赢得该客户的业务的可能性越高,赢得其业务的Universe的比例就越大,因此客户圈子的面积越大。 请注意,如果我在整个多宇宙总体中进行阴影处理,则它将类似于我之前共享的模具滚动图。

Diagram showing multiverse Megacorp, with 99% chance of sale within multiverse population.
Diagram Courtesy of Author
图由作者提供

拥有多元宇宙心理框架的好处 (Benefits of having a multiverse mental framework)

Astute readers have noticed that we cannot use this multiverse approach to probabilities to prove that our model is correct. We can’t hop from universe to universe, tabulating the proportion in which we win the Megacorp sale to show our CEO that our model is working as intended. In fact, it’s impossible to show that any model perfectly explains the world. The best we can do is to know that a model reasonably predicts samples from our population of interest, often by contrasting it with other, less accurate models. Even then, we still rely on assumptions to do so, one of the most important of which is that the systems does not undergo unanticipated structural changes. All of our predictions will be off if such a change happens. In our example, a strong competitor entering or leaving the market would represent such a change.

精明的读者已经注意到,我们不能使用这种多元方法来证明我们的模型是正确的。 我们无法在宇宙之间跳来跳去,列出赢得Megacorp交易的比例以向我们的CEO展示我们的模型正在按预期工作。 实际上,不可能显示出任何模型都能完美地解释世界。 我们能做的最好的事情就是知道一个模型可以合理地从我们感兴趣的人群中预测样本,通常是将其与其他不太准确的模型进行对比。 即使到那时,我们仍然要依靠假设来做到这一点,其中最重要的一项是系统不会发生意外的结构变化。 如果发生这种变化,我们所有的预测都将失效。 在我们的示例中,强大的竞争者进入或退出市场将代表这种变化。

In my experience, many data scientists ignore or even dismiss non-empiric ideas such as this multiverse theory approach to grappling with probabilities, but they are doing so at their own peril. The first benefit of using the theory is that it is an accessible way of explaining probabilities to those who don’t have a strong background in them, like the CEO in our example. It’s possible that explaining your model outputs using multiverse theory helps consumers of your models become more comfortable with how to interpret them. It can be done on its own or addition to a short explanation on overfitting to persuade our hypothetical CEO to drop his (potentially) irrational demand to tweak your model until it brings down the Megacorp sale probability.

以我的经验,许多数据科学家会忽略甚至忽略非经验性的想法,例如这种采用多元理论来解决概率问题的方法,但这样做的后果自负。 使用该理论的第一个好处是,它是一种向那些没有较深背景的人(例如我们的示例中的CEO)解释概率的一种可访问的方法。 使用多元宇宙理论解释模型的输出可能会帮助模型的使用者对如何解释它们感到更自在。 它可以单独完成,也可以在简短说明中补充说服力,以说服我们假设的首席执行官放弃(可能)不合理的需求来调整您的模型,直到降低Megacorp的销售概率。

The second benefit is that the multiverse theory approach to interpreting probabilities is that it gives us a useful structure for what-if analyses. Remember the mechanism for randomness in our die rolling example? I shared that the reason a fair die comes up with each outcome in the same proportion is because small changes — smaller than we can control with our fine motor skills — result in different outcomes. We can show that using a little more force or a different orientation turns a throw that would result in a 1 into one that results in a 2. Unfortunately, business outcomes cannot be predicted perfectly by a system as consistent as classical mechanics. However, we can try to imagine what we could have done differently to increase our chances of closing the Megacorp sale and use it to help with future ones. People do this all the time when they do what-if analyses: one can imagine the CEO thinking “if only I had answered Megacorp’s questions about our service personally” or “I wonder what would have happened if we gave them a discount because they’d be an impressive client to have.” We need to understand that neither of these actions guarantees the sale, but they can increase its odds, and applying the multiverse theory we can imagine flipping universes in which the sale is not made to ones in which it is. In the below diagram, I demonstrate what this would look like for the Normalcorp client, which originally has a 50% chance of sale, as increases from 50% are easier to see.

第二个好处是,用于解释概率的多元宇宙理论方法为我们提供了一种假设分析的有用结构。 还记得我们的掷骰示例中的随机性机制吗? 我分享了每个结果以相同比例出现的原因是因为微小的变化(小于我们可以用自己的精细运动技能控制的变化)导致不同的结果。 我们可以证明,使用更多的力或使用不同的方向可以将导致1的掷变成2的掷。不幸的是,系统无法像传统力学一样完美地预测业务结果。 但是,我们可以尝试想象我们可以做些什么来增加我们完成Megacorp交易的机会,并用它来帮助将来的交易。 人们总是在做假设分析时一直这样做:人们可以想象CEO在思考“如果只有我亲自回答了Megacorp关于我们服务的问题”或“我想知道如果我们给他们折扣,会发生什么,因为他们成为令人印象深刻的客户。” 我们需要了解的是,这些行为都不能保证销售,但是它们可以增加销售的几率,而运用多元宇宙理论,我们可以想象将没有进行销售的宇宙翻转为进行销售的宇宙。 在下图中,我演示了Normalcorp客户的情况,该客户最初有50%的销售机会,因为从50%的增长很容易看到。

Diagram showing odds of selling to Normalcorp if our CEO responds to them personally or we offer them a discount.
Diagram Courtesy of Author
图由作者提供

I hope that viewing event probabilities using multiverse theory helps close the gap between understanding simple probabilities often used in stats courses (e.g. flipping coins, rolling dice, or pulling cards out a deck) and complex ones in the real world (e.g. probability of closing a sale, likelihood of converting a user to a paid subscription plan). For some fun explorations of thinking about probabilities through multiverses, I’d recommend the Remedial Chaos Theory episode (and subsequent ones that reference it) of Community, in which a die roll creates multiple timelines, and all of Rick and Morty. Try it out for yourself, share and discuss the idea with others — including me, I’ll do my best to respond to comments here or on Twitter, and see if it helps makes sense of complex real world phenomena and enables more rational decision-making.

我希望使用多元宇宙论来查看事件概率有助于缩小理解统计课程中经常使用的简单概率(例如,掷硬币,掷骰子或从牌组中抽出卡)与现实世界中复杂的概率(例如,关闭概率)之间的差距。销售,将用户转换为付费订阅计划的可能性)。 对于通过多元宇宙思考概率的一些有趣的探索,我建议使用“社区的补救混沌理论”一集(以及随后的参考书集) ,其中掷骰创建多个时间轴,以及所有Rick和Morty 。 亲自尝试一下,与他人分享并讨论这个想法-包括我在内,我将尽力在此处或在Twitter上回应评论,看看它是否有助于理解现实世界中的复杂现象并做出更合理的决策-制造。

翻译自: https://towardsdatascience.com/grappling-with-event-probabilities-using-multiverse-theory-26b46067da14

多元概率密度

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/392301.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

nginx php访问日志配置,nginx php-fpm 输出php错误日志的配置方法

由于nginx仅是一个web服务器,因此nginx的access日志只有对访问页面的记录,不会有php 的 error log信息。nginx把对php的请求发给php-fpm fastcgi进程来处理,默认的php-fpm只会输出php-fpm的错误信息,在php-fpm的errors log里也看不…

SMSSMS垃圾邮件检测器的专业攻击

Note: The methodology behind the approach discussed in this post stems from a collaborative publication between myself and Irene Anthi.注意: 本文讨论的方法背后的方法来自 我本人和 Irene Anthi 之间 的 合作出版物 。 介绍 (INTRODUCTION) Spam SMS te…

Nagios学习实践系列

其实上篇Nagios学习实践系列——基本安装篇只是安装了Nagios基本组件,虽然能够打开主页,但是如果不配置相关配置文件文件,那么左边菜单很多页面都打不开,相当于只是一个空壳子。接下来,我们来学习研究一下Nagios的配置…

kvm vnc的使用,鼠标漂移等

1.宿主机的vnc(virtual Network Computing)配置 安装rpm包 yum install tigervnc-server -y 为了防止干扰直接关闭防火墙和selinux /etc/init.d/iptables stop setenforce 0 配置vnc密码和启动vncserver服务 vncpasswd vncserver 2.客户机的vnc 在qemu…

php深浅拷贝,JavaScript 中的深浅拷贝

工作中经常会遇到需要复制 JavaScript 数据的时候,遇到 bug 时实在令人头疼;面试中也经常会被问到如何实现一个数据的深浅拷贝,但是你对其中的原理清晰吗?一起来看一下吧!一、为什么会有深浅拷贝想要更加透彻的理解为什…

使用Python进行地理编码和反向地理编码

Geocoding is the process of taking input text, such as an address or the name of a place, and returning a latitude/longitude location. To put it simply, Geocoding is converting physical address to latitude and longitude.地理编码是获取输入文本(例如地址或地点…

[Object-C语言随笔之三] 类的创建和实例化以及函数的添加和调用!

上一小节的随笔写了常用的打印以及很基础的数据类型的定义方式,今天就来一起学习下如何创建类与函数的一些随笔; 首先类的创建:在Xcode下,菜单File-New File,然后出现选择class模板,如下图&…

2024-AI人工智能学习-安装了pip install pydot但是还是报错

2024-AI人工智能学习-安装了pip install pydot但是还是报错 出现这样子的错误: /usr/local/bin/python3.11 /Users/wangyang/PycharmProjects/studyPython/tf_model.py 2023-12-24 22:59:02.238366: I tensorflow/core/platform/cpu_feature_guard.cc:182] This …

带彩色字体的man pages(debian centos)

1234567891011121314151617181920212223242526272829303132333435363738我的博客已迁移到xdoujiang.com请去那边和我交流简介most is a paging program that displays,one windowful at a time,the contents of a file on a terminal. It pauses after each windowful and prin…

Zabbix 3.0 从入门到精通(zabbix使用详解)

第1章 zabbix监控 1.1 为什么要监控 在需要的时刻,提前提醒我们服务器出问题了 当出问题之后,可以找到问题的根源 网站/服务器 的可用性 1.1.1 网站可用性 在软件系统的高可靠性(也称为可用性,英文描述为HA,High Avail…

Maven基础。

---恢复内容开始--- Maven: 1、概念。 * maven 是一个项目管理工具。 * maven的作用。 1、jar包。依赖管理。将jar包放在jar包仓库(pom.xml),不需要每个项目都添加jar包。 2、测试。 3、项目发布。 2、使用。 * 下载解压即可。 * 环境变量配置…

Dinosaur Run - Dinosaur world Games

转载于:https://www.cnblogs.com/hotmanapp/p/7092669.html

Go_ go mod 命令解决墙的问题

简介 由于众所周知的原因,在下载一些库的时候会下载不了,比如 golang.org/x/... 相关的库。为此,网上出现了很多解决方案。 从 Go1.11 开始,Go 引入了 module,对包进行管理,通过 go mod 命令来进行相关操作…

用导函数的图像判断原函数的单调性

前言 典例剖析 例1(给定\(f(x)\)的图像,确定\(f(x)\)的单调性,最简单层次) 题目暂略。 例2(用图像确定\(f(x)\)的正负,确定\(f(x)\)的单调性,2017聊城模拟) 已知函数\(yxf(x)\)的图像如图所示(其中\(f(x)\)是函数\(f(x)\)的导函数…

朴素贝叶斯 半朴素贝叶斯_使用朴素贝叶斯和N-Gram的Twitter情绪分析

朴素贝叶斯 半朴素贝叶斯In this article, we’ll show you how to classify a tweet into either positive or negative, using two famous machine learning algorithms: Naive Bayes and N-Gram.在本文中,我们将向您展示如何使用两种著名的机器学习算法&#xff…

python3:面向对象(多态和继承、方法重载及模块)

1、多态 同一个方法在不同的类中最终呈现出不同的效果,即为多态。 class Triangle:def __init__(self,width,height):self.width widthself.height heightdef getArea(self):areaself.width* self.height / 2return areaclass Square:def __init__(self,size):sel…

深入单例模式 java,深入单例模式四

Java代码 privatestaticClass getClass(String classname)throwsClassNotFoundException {ClassLoader classLoader Thread.currentThread().getContextClassLoader();if(classLoader null)classLoader Singleton.class.getClassLoader();return(classLoader.loadClass(class…

linux下配置SS5(SOCK5)代理服务

SOCK5代理服务器 官网: http://ss5.sourceforge.net/ yum -y install gcc gcc-c automake make pam-devel openldap-devel cyrus-sasl-devel 一、安装 # tar xvf ss5-3.8.9-5.tar.gz # cd ss5-3.8.9-5 # ./configure && make && make install 二、修改配置文…

去除list集合中重复项的几种方法

因为用到list&#xff0c;要去除重复数据&#xff0c;尝试了几种方法。记录于此。。。 测试数据&#xff1a; List<string> li1 new List<string> { "8", "8", "9", "9" ,"0","9"};List<string&g…

Crystal Reports第一张报表

新建一个网站项目&#xff0c;1. 设置数据库 从服务器资源管理器中&#xff0c;数据连接中添加新连接&#xff0c;用Microsoft Access数据库文件作为数据提供程序&#xff0c;连接上Crystal Reports的用例的数据库Xtreme2. 创建新Crystal Reports报表 在工程项目中添加一个…