由买买提看人间百态

topics

全部话题 - 话题: histogram
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
s***c
发帖数: 1664
1
来自主题: Statistics版 - 问个sas小问题: 赋值macro variable
变量age, 我想把它的最小值和最大值赋值给两个macro variable, 然后再做histogram
的时候调用他们.
proc means data=data max min ;
var age;
OUTPUT OUT=stats1 min(age)=min_age max(age)=max_age;
run;
data _NULL_;
set stats1;
call symputn("MIN_AGE", min_age);
call symputn("MAX_AGE", max_age);
run;
proc sgplot data=data;

histogram age / binstart=%symget('MIN_AGE') binwidth=('MAX_AGE'-'MIN
_AGE')/10;
run;
首先symputn不能用,那怎么把numeric值赋给macro variable呢? 然后在proc 里面
怎么resolve这两个macro variable, binstart是MIN_AGE, binwidth... 阅读全帖
s******e
发帖数: 114
2
来自主题: DataSciences版 - 问一道(大)数据 algorithm (转载)
1. keep estimate histogram in positive set util convergence
after scanning first 1000 records in positive, if lucky, k-s test shows no
difference with previous histogram,which is estimated for the first 900
records.
2.build a hash, key is stay days, value is count
3.keep scan negative set util find 100K record
u****u
发帖数: 2308
3
来自主题: _Xiyu版 - 天好奔三张
我的粗浅理解是(抄来的):If the luminosity histogram is clipped at the
right
end, you’ve lost information in the highlights.
Do you know any simple tool or add-on to see a picture's histogram?
p*****i
发帖数: 2019
4
来自主题: Military版 - 统计局称目前算不出空置率
是的
其实非常简单
可以用straitified的非参数的方法估计
具体而言,随机挑选北京1000户确定有人住的人家
这个就是H1
计算他们6个月的总用电量和总用水量
6个月累计可以减少误差
马上得出一个histogram,再把全市的房子用来比较
低于所有这1000户人家的,就有alpha<1/1000的信心认为它不是有人住,也就是空置房
把这个model套到全国各个城市就可以
B*V
发帖数: 3365
5
来自主题: Military版 - 中国人均gdp的histogram有没有?
看看tg是不是越高越查?
同期西方国家的呢?
R****a
发帖数: 6858
6
History of World GDP
by Barry Ritholtz - August 17th, 2010, 3:00pm

inShare
7
Email This Post
Print This Post
Via the Economist, we see this intriguing histogram of Global GDP (below)
The Economist notes:
“Data compiled by Angus Maddison, an economist who died earlier this year,
suggest that China and India were the biggest economies in the world for
almost all of the past 2000 years.”
But then asks a really silly question:
“Why they fell so far behind may be more of a mystery than why they are... 阅读全帖
w***u
发帖数: 17713
7
来自主题: Military版 - 这些人是怎么看红绿灯的
一个高中很好的朋友是红绿色盲,问他的感觉就是单独摆出来还说得清楚,混起来不容
易分清楚。下象棋,红绿色那种,也不是乱走,大概10步会走错一次。我现在猜想,他
们又不是全色盲,估计靠shade或者histogram,接近不一样颜色。像红绿灯这种有位置
区别的,不会搞混。

发帖数: 1
8
【 以下文字转载自 BetterStock 俱乐部 】
发信人: drugbull (药牛), 信区: BetterStock
标 题: VolumeWeighted-MACD的公式,编程,及应用,代替常规MACD
发信站: BBS 未名空间站 (Sun Jun 17 18:36:30 2018, 美东)
declare lower;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
def fastAvg = sum(data = (close * volume), length = fastLength)/sum(data = v
olume, length = fastLength);
def slowAvg = sum(data = (close * volume), length = slowLength)/sum(data = v
olume, length = slowLength);
plot Value = fastAvg - slowAvg;
plot Avg = ExpAver... 阅读全帖
B*V
发帖数: 3365
9
History of World GDP
by Barry Ritholtz - August 17th, 2010, 3:00pm
inShare
7
Email This Post
Print This Post
Via the Economist, we see this intriguing histogram of Global GDP (below)
http://www.ritholtz.com/blog/wp-content/uploads/2010/08/GDP-History.gif" onload="adjustimg(this)">
The Economist notes:
“Data compiled by Angus Maddison, an economist who died earlier this year,
suggest that China and India were the biggest economies in the world for
almost all of the past 2000 years.”
But... 阅读全帖
G***G
发帖数: 16778
10
histogram of the population is relatively stable.
u****q
发帖数: 24345
u****q
发帖数: 24345
S********t
发帖数: 3431
13
来自主题: Automobile版 - truecar.com的报价准不准?

yes
no
It's called before-TTL price. Google the term "TTL".
I think the "best local price" is not as useful as recent sales record (you
can see the histogram graph there).
g******u
发帖数: 250
14
来自主题: Automobile版 - 说说我的砍价体会
看了很多朋友的坎经,受益不少,而且直接帮助了我在砍价中的各个环节。
但是有一点,我不太认同。就是把dealer或是salesperson当成敌人,一开始就摆出一
副要跟人fight的架势。反过来,人家也会觉得咱们很mean。对咱老中的印象很
negative,不好。有些时候,人家直接拒绝deal,不一定是我们给的价他们做不下来,
而是情绪问题。最佳的局面是,大家想做成这件事,而且彼此印象也不错,剩下的就是
compromise了。实在不能达成共识,买卖不成仁义在。少废话,奉上坎经。
1,调研。我给出一个我所能在网上(mitbbs/truecar)找到的对低价。如果配置不同
,找最接近的,按照package的官价略微调整。再减200,这就是我的low ball
offering。
2,开坎。一开始我就说我很straightforward,不喜欢bargin。如果你能做到我的数字
,我不废话,直接做paperwork。sales当然还是他们那套,“这个价不可能”、“差太
远了”、“我这已经是best we can do”了。我保持微笑,但通通ignore。
3,镇守。继续保持风度。。。等他... 阅读全帖
p*l
发帖数: 1359
15
来自主题: Faculty版 - 老实人吃亏啊!
最近一片文章被批得狗血淋头。我也奇怪,大家的测量结果从histogram上看都是差不
多精度的,都是jet colormap画图,为什么我们的图这么难看,人家的图那么好看呢?
今天定一看,人家把jet colormap 调地极其不线性,把偏离均值比较远的图像点都偷
偷藏起来了。我也要去调 colorbar!
s****o
发帖数: 388
16
来自主题: Faculty版 - 见鬼了
两台机器都是office2010. 前几个星期用excel 的analysis chart 的histogram 做的
图 没有任何问题 还改过几次
今天一打开 说我excel版本不支持这个chart 以前的analysis chart的button 也没了
。 一查只有2016 的excel才有这个功能。
那我以前的图怎么做的? 两台机器都这样 见鬼了
MS把这个装了有偷偷下了
我根本没有 2016 啊
p*****u
发帖数: 310
17
来自主题: JobHunting版 - 请教一道算法题
Finally got it. It is similiar to find the biggest rectangle in histogram.
H*M
发帖数: 1268
18
来自主题: JobHunting版 - Google Interview Question
I am still waiting for your solution of the o(n) of that histogram one...or
any hint like which direction to go?
g*******y
发帖数: 1930
19
来自主题: JobHunting版 - 问一个题
that's not a correct O(N^2) solution.
My own opinion: forget about DP,think about histogram problem...
H*M
发帖数: 1268
20
来自主题: JobHunting版 - 问一个题
小尾羊,你说说那个histogram的题的O(n) algorithm吧。。
a*****e
发帖数: 51
21
来自主题: JobHunting版 - 问一个题
Yeah, it's O(n^3).
krone's link provides a nice O(n^2) solution.
Could you please elaborate your histogram method in more detail...
g*******y
发帖数: 1930
22
来自主题: JobHunting版 - 问一个题
histogram问题在那个link里面也有的~
H*M
发帖数: 1268
23
来自主题: JobHunting版 - 问一个题
你是说histogram那题o(n)的解答?哪个link?
m*******y
发帖数: 68
24
来自主题: JobHunting版 - Google interview question
很弱的继续问,什么是Histogram,到底应该这么做?
b****j
发帖数: 78
25
来自主题: JobHunting版 - Google interview question
careercup上搜索histogram
k***e
发帖数: 556
26
来自主题: JobHunting版 - onsite下来忐忑不安,攒rp系列(一)
突然发现 你没有被问道dp,也没有机会展现tree,greedy,d&c,这些比较高级点的
数据结构。更没有string matching,augumented data struc,balanced tree之类的
。更不用说一些专门准备的比如max histogram, min window covering keywords等
tricky的问题,完全就是繁琐的编程,没有机会发挥算法的优势。

本上都不难,但是也被问到了自己比较弱的题目类型,也犯了一些小错误。只有加把劲
继续攒rp,希望能有好结果。。。
紧张,前一天时间都花在准备这些,没想到4个面试官有3个几乎都是一进屋就出题!问
面试官问题基本上也是就问问面试官现在做什么project,你来做了几年了之类的。如
果早知道,可以多花些时间练
许是跟这个office做的东西有关系),怎么说呢,design是我的弱项,大规模的题自己
感觉还不错(同时也鸣谢一下和krone的讨论以及几天前mudhoof的转贴),这两个都没被
问到,从运气上看算是抵消了
因为我有期末考试等缘故,拖到1月第一周。接着换了个recruiter又拖了一周。让
i**c
发帖数: 26
27
就是对每个row做max rectangle in histogram
O(N^2)
w***9
发帖数: 13
28
来自主题: JobHunting版 - Share一下google intern电面问题
1. 这里提到过的bar组成的histogram求最大内切矩形
2. 一个问题有O(N^2)和O(NlgN)两个算法,哪些情况下我们该选N平方那个。不停问还
有什么理由没有,不知道是在期待什么理由还是想听你能说出多少。
3. 给一个字符串,比如aabbbccdeaaaee, 连续的部分要求删除重复的,返回abcdeae,
还要求记录删掉了多少个。后来发现面试官希望in place做,就是没必要多开个数组来
存之类的。
4. 100*100的元素是0或1的矩阵。假如有100K个这样的矩阵的一个库, 然后给你一个矩
阵,设计个方法来回答这个矩阵是否在这个库里。
5. 好像还有一个题,大概也是查找什么东西是不是在什么集合里之类的。确实不记得
了。
6. 问了简历里的一个project怎么做的
祝大家好运!
g*******y
发帖数: 1930
29
来自主题: JobHunting版 - Share一下google intern电面问题
羡慕啊羡慕,我就天天盼着被问histogram问题。。。
H*M
发帖数: 1268
30
来自主题: JobHunting版 - Share一下google intern电面问题
i dont think the histogram problem is a simple one, even for onsite..
P********l
发帖数: 452
31
来自主题: JobHunting版 - Share一下google intern电面问题
histogram code:
package myTest;
import static org.apache.commons.lang.StringUtils.join;
public class DP_blackBlock {
int[][] matrix;
void readMatrix(String[] mtx) {
int n = mtx.length;
String[] s = mtx[0].split("[ ]+");
int m = s.length;
matrix = new int[m][];
for (int i = 0; i < m; i++) {
s = mtx[i].split("[ ]+");
matrix[i] = new int[n];
for (int j = 0; j < n; j++) {
matrix[i][j] = Integer.valueO
x***y
发帖数: 633
r**u
发帖数: 1567
33
思路是这样的,
1. 如果所有的bar都是按升序从左到右排起来的话,那么,就可以简单的用最小(最左
)的bar的高*n, n是bar的个数,这是一个面积,接着用次小的bar的高*(n-1), ...,
找到max area。
2. 一般bar不是完全按升序排列。就用一个vector去simulate a stack,如果下一个
bar比栈顶的bar高,入栈。
否则的话,pop栈里所有比next bar高的bar,再入栈next bar。并且要计算这过程
中这些pop掉的bar cover的area。
3. 最后处理剩在stack里面的bar。
s*********i
发帖数: 66
34
这样计算的面积不重复吗?
s*****i
发帖数: 355
35
你这不是O(n)
g*******y
发帖数: 1930
36
是O(n)的
S******n
发帖数: 1009
37
yes, each bar will be pushed and poped at most once
C***n
发帖数: 452
38
one question here, if there are bars Bi, Bi-1, Bi-2 in the stack top that
are higher than current bar Bj
if you remove (Bi, Bi-1, Bi-2), and then push Bj to stack, how do you know
how many bars higher than Bj?
Also, if you meet a bar Bj height equals to the stack top Bi, what will you
do?
Anybody please share if you get clear ideas about this, thanks.
l*******r
发帖数: 511
39
equal就skip呗
这个题的关键是理解最大的矩形肯定要以某个unit为高。。而这个unit能extend到多左
边多
右边则是由stack里的比它低的那个和将要让它pop的那个决定的

one question here, if there are bars Bi, Bi-1, Bi-2 in the stack top that
are higher than current bar Bj
if you remove (Bi, Bi-1, Bi-2), and then push Bj to stack, how do you know
how many bars higher than Bj?
Also, if you meet a bar Bj height equals to the stack top Bi, what will you
do?
Anybody please share if you get clear ideas about this, thanks.
C***n
发帖数: 452
40
if you skip this equal ones, how do you count it in the max area later?
full solution, please, especially how the max area is updated in each case

you
C***n
发帖数: 452
41
apart from bar height, it looks like the stack will also need to record the
starting index of a bar height?
for example, the 6 bar heights go like this:
2 2 3 3 1 5
the stack will be [2 3] after meeting 2 2 3 3, and how to upadte max area
after meeting the height 1 (5th bar)?
finally the stack will be [1 5], how to update max area with this final
stack? thanks.

you
g*******y
发帖数: 1930
42
stack stores index

the
C***n
发帖数: 452
43
stack stores both height and index information, like a struct {int height,
int index}? thanks for clarification.
in the previous case, if you pop 2,3 and then push 1, it should be {height:1
, index:0} something like this, is my understanding right?
r**u
发帖数: 1567
44

对的。你好好琢磨一下,试着code出来,考虑corner cases,没那么难。自己code印象
才深。
h*******x
发帖数: 12808
45
赞,谢谢了,很好解法。
c***p
发帖数: 221
46
来自主题: JobHunting版 - google 面试题
这个题是 largest rectangle under a histogram 的延伸。作为面试题是有点过分了。
p********7
发帖数: 549
47
来自主题: JobHunting版 - google 面试题
我觉得这个办法很好,histogram做一次O(N)每行都做O(M*N)
p********7
发帖数: 549
48
来自主题: JobHunting版 - google 面试题
老题目了,就是用求histogram最大面积的方法做。
j*******o
发帖数: 246
49
来自主题: JobHunting版 - 笔试题目求助!
各位能稍微讲解一下,或给个相关参考文献链接之类的么?题目如下
There is a log file containing 1 million integers. Each integer is 32 bits
in length. Specific integer values in the log file may be repeated. It is
possible to read the log file sequentially. It is possible to read and write
temp files sequentially; however, no more than 2000 integers may be read
into memory at any given time. There is no limit to the number of files that
may be open at any time.
Objective: Produce a histogram showing absolute counts for each int
b****r
发帖数: 1272
50
来自主题: JobHunting版 - Google的电话面试题
先做预处理,对每个点算出H[i] 然后把每一行当做底,把这个Histogram当做
subproblem来解行不
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)