Col Quantile 계산에서 행 제외안녕,
Col Quantile( :height, 0.5, :class)을 가져오려고 했지만 계산 시 제외된 행이 여전히 고려되는 것 같습니다.
Col Quantile 계산에서 제외된 행을 거부하는 방법이 있습니까?
감사해요,
미도리
데이터 혼합 및 정리데이터 탐색 및 시각화Re: Col Quantile 계산에서 행 제외Col Quantile() 함수 내에서 제외되는 행을 확인할 수 있습니다. 아래는 예시입니다
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Col Quantile Height by Age",
numeric,
continuous,
formula( Col Quantile(If(excluded(rowstate(Row())),., :height), 0.5, :age ) )
);
데이터 테이블의 행에 대해 제외된 rowstate가 변경될 때마다 수식은 새 값을 계산합니다.
Re: Col Quantile 계산에서 행 제외다음 코드를 사용하여 많은 매개변수의 50번째 백분위수를 수집하는 루프를 만들려고 했지만 "test_list"의 두 요소는 모두 동일합니다(둘 다 가중치의 50%입니다). 그러나 라인을 수동으로 실행하면 작동합니다. for 루프에서 Col Quantile() 함수를 사용할 수 없나요?
이름의 기본값은 여기에 있습니다( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
플롯_파라미터={
키,
무게};
테스트_목록={};
for(plotcnt=1,plotcnt<=nitems(plot_param),plotcnt++,
pct_50=Col Quantile( If(excluded(rowstate(Row())),.,column(plot_param[plotcnt])), 0.5);
test_list[plotcnt]=pct_50;
);
Re: Col Quantile 계산에서 행 제외
다음 코드를 사용하여 많은 매개변수의 50번째 백분위수를 수집하는 루프를 만들려고 했지만 "test_list"의 두 요소는 모두 동일합니다(둘 다 가중치의 50%입니다). 그러나 라인을 수동으로 실행하면 작동합니다. for 루프에서 Col Quantile() 함수를 사용할 수 없나요?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
plot_param={
height,
weight};
test_list={};
for(plotcnt=1, plotcnt<=nitems(plot_param), plotcnt++,
pct_50=Col Quantile( If(excluded(rowstate(Row())),., column(plot_param[plotcnt])), 0.5);
test_list[plotcnt]=pct_50;
); Re: Col Quantile 계산에서 행 제외Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
plot_param={
height,
weight};
test_list={};
for(plotcnt=1, plotcnt<=nitems(plot_param), plotcnt++,
Eval (Substitute (Expr(pct_50=Col Quantile( If(excluded(rowstate(Row())),., _col_), 0.5)), Expr(_col_), column(plot_param[plotcnt])));
test_list[plotcnt]=pct_50;
);
Re: Col Quantile 계산에서 행 제외오타로 인해 1을 1로 대체하더라도 Eval(substitute())이면 충분하다는 것을 방금 확인했습니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
plot_param = {height, weight};
test_list = {};
For( plotcnt = 1, plotcnt <= N Items( plot_param ), plotcnt++,
pct_50 = Eval( Substitute( Expr( Col Quantile( If( Excluded( Row State( Row() ) ), ., Column( plot_param[plotcnt] ) ), 0.5 ) ), 1, 1 ) );
test_list[plotcnt] = pct_50;
);
show(test_list);

Re: Col Quantile 계산에서 행 제외@LatentDataTiger , JMP 지원팀의 피드백(TS-00139301)
네, 버그입니다. 개발자는 이것이 Col Quantile [& Col Median]의 캐싱 문제임을 확인했습니다. 다른 Col 함수에는 문제가 없습니다. Substitute를 사용하면 루프의 각 반복마다 새로운 표현식이 생성되므로 캐싱이 부적절하게 사용되지 않습니다. 이 문제를 보고해 주셔서 감사합니다. 버그 보고서를 제출하겠습니다.
따라서 줄 아래에 Substitute 가 아니라 버그를 수정하는 Eval(Expr()) 을 통한 보호 기능이 있습니다.
@Arn_Cota 의 좋은 예 [수정된 버전]가 효과를 설명합니다.
더 보기...Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
plot_param = {height, weight};
test_list = {};
For( plotcnt = 1, plotcnt <= N Items( plot_param ), plotcnt++,
// Without Exclude, returns correct values
pct_50_v0 = Col Quantile( Column( plot_param[plotcnt] ), 0.5 );
// With Exclude, returns the Quantile for height
pct_50_v1 = Col Quantile(
If( Excluded( Row State( Row() ) ),
.,
Column( plot_param[plotcnt] )
),
0.5
);
// With Eval and Substitute, returns correct values
pct_50_v2 = Eval(
Substitute(
Expr(
Col Quantile(
If( Excluded( Row State( Row() ) ),
.,
Column( plot_param[plotcnt] )
),
0.5
)
),
1, 1
)
);
// use Eval(Expr() to protect the expression against inappropriate caching
pct_50_v3 = Eval(Expr(Col Quantile(
If( Excluded( Row State( Row() ) ),
.,
Column( plot_param[plotcnt] )
),
0.5
)));
// Show different versions
Show(
plotcnt,
Column( plot_param[plotcnt] ),
pct_50_v0,
pct_50_v1,
pct_50_v2,
pct_50_v3
);
test_list[plotcnt] = pct_50_v3;
); Re: Col Quantile 계산에서 행 제외JMP의 표현식 처리에 추가된 예제/해결 방법: Tipps 및 Trapdoors