只有大表的JMP脚本错误:最大数组长度?你好JMP社区,
使用下面的脚本,这对于包含~500列的表非常有用,在使用20,000列的大型表上使用它时遇到了一个奇怪的问题:本质上,脚本似乎正常完成,根据需要生成输出表但是实际值几乎是随机的(手动验证)。
关于可能发生的事情的任何线索?我有一种预感,这可能是由于超出我用来收集数据的数组的最大长度导致的内存分配错误。
注意:由于数据的机密性,我无法共享我正在处理的大表
谢谢,
Names Default to Here (1);
dt = Current Data Table ();
m = {};
m1 = [];
m2 = [];
m3 = [];
m4 = [];
For (i = 12 , i <= N Col (dt),i++,
mv = Multivariate(
Y( :BIOMARKER, column(i) ),
Estimation Method( "Row-wise" ),
Scatterplot Matrix(
Density Ellipses( 1 ),
Shaded Ellipses( 0 ),
Ellipse Color( 3 )
),
Spearman's ρ( 1 ),
Kendall's τ( 1 )
);
mvr = mv << report;
insert into (m, Column Name (i));
m1 = m1 || ((mvr [Outline Box (1)] [Number Col Box (1)])<< get) [1];
m2 = m2 || ((mvr [Outline Box (1)] [Number Col Box (2)])<< get) [1];
m3 = m3 || ((mvr [Outline Box (1)] [Number Col Box (3)])<< get) [1];
m4 = m4 || ((mvr [Outline Box (1)] [Number Col Box (4)])<< get) [1];
mv << close window;
);
New Table ("Non-Parametric Correlation",
New column ("Symbol", character, set values (m)),
New column ("Spearman Rho", numeric, set values (m1)),
New column ("Spearman p", numeric, set values (m2)),
New column ("Kendall Tau", numeric, set values (m3)),
New column ("Kendal p", numeric, set values (m4)),
);Re:只有大表的JMP脚本错误:最大阵列长度?试试这个:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Body Measurements.jmp");
dt_out = New Table("Non-Parametric Correlation",
Add Rows(N Col(dt)),
New Column("Symbol", character),
New Column("Spearman Rho", numeric),
New Column("Spearman p", numeric),
New Column("Kendall Tau", numeric),
New Column("Kendal p", numeric),
Invisible
);
r = 1;
For(i = 2, i <= N Col(dt), i++,
m = [];
mv = dt << Multivariate(
Y(:Mass, Column(i)),
Estimation Method("Row-wise"),
Scatterplot Matrix(0),
Spearman's ρ(1),
Kendall's τ(1)
);
mob = Report(mv)[Outline Box(1)];
Column(dt_out, 1)[r] = Column(dt, i) << get name;
For(c = 2, c <= 5, c++,
Column(dt_out, c)[r] = (mob[Number Col Box(c - 1)] << get)[1];
);
mv << close window;
r++;
);
dt_out << show window(1);Re:只有大表的JMP脚本错误:最大阵列长度?感谢您对我的问题的优雅解决方案。
我刚刚在我的数据上测试了它(在替换了数据表和固定变量之后)并且它返回了一条错误消息(调试器):该行的参数无效
dt_out<SPAN class="token punctuation">[</SPAN>r<SPAN class="token punctuation">,</SPAN> <SPAN class="token number">1</SPAN><SPAN class="token punctuation">]</SPAN> <SPAN class="token operator">=</SPAN> <SPAN class="token function">Column Name</SPAN><SPAN class="token punctuation">(</SPAN>i<SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
我猜这个命令或语法与JMP 11.1不兼容:最好的解决方法是什么?
Re:只有大表的JMP脚本错误:最大阵列长度?不确定发生了什么。如果逐步填充输出表而不是收集大列表/矩阵中的所有数据,它可能会更好。
一个例子(JMP 13):
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Body Measurements.jmp");
dt_out = New Table("Non-Parametric Correlation",
Add Rows(N Col(dt)),
New Column("Symbol", character),
New Column("Spearman Rho", numeric),
New Column("Spearman p", numeric),
New Column("Kendall Tau", numeric),
New Column("Kendal p", numeric),
Invisible
);
r = 1;
For(i = 2, i <= N Col(dt), i++,
m = [];
mv = dt << Multivariate(
Y(:Mass, Column(i)),
Estimation Method("Row-wise"),
Scatterplot Matrix(0),
Spearman's ρ(1),
Kendall's τ(1)
);
mob = Report(mv)[Outline Box(1)];
m ||= mob[Number Col Box(1)] << get as matrix;
m ||= mob[Number Col Box(2)] << get as matrix;
m ||= mob[Number Col Box(3)] << get as matrix;
m ||= mob[Number Col Box(4)] << get as matrix;
mv << close window;
dt_out[r, 1] = Column Name(i);
dt_out[r, 2 :: 5] = m;
r++;
);
dt_out << show window(1);
Re:只有大表的JMP脚本错误:最大阵列长度?添加一些细节,大多数JMP平台,(即 分发,分区等)在处理中使用多个核心。 JSL代码是单处理器,但Multivarate平台将使用它可以获得的所有处理器。
Re:只有大表的JMP脚本错误:最大阵列长度?你好Uday,
谢谢。
我只是尝试运行相同的脚本,没有其他应用程序在后台运行,它工作正常。所以它看起来可能是某种内存溢出,即使根据任务管理器(Windows 10)我有2 GB RAM可用。
Re:只有大表的JMP脚本错误:最大阵列长度? @sornasst ,
我不知道这会有多大帮助,但你可以在这里分享你的系统RAM细节吗?我不认为JMP在多核上运行,所以假设它运行在单核上,你能不能支持这个?