JSL - 最良の変換を保存するこんにちは、
私は以下のスクリプトを実行していますが、それはbox-cox outline box生成の後に止まるでしょう。私がすることはそれから手動で「箱Cox変換」アウトラインボックスの中で「最高の変換を保存する」ことです。私の質問は、JSLを介して 'Save Best Transformation'を自動化して、変換する項目をさらに増やすスクリプトを続行する方法はありますか?助けてくれてありがとう
-Rgsd、ジョエル
ログを消去();
dtName = "ビッグクラス";
dt = Open( "$ SAMPLE_DATA /" || dtName || ".jmp");
nwd =新しいウィンドウ( "Box Cox"、
dt << Fit Model(
Y(:重量)
しおり、
パーソナリティ( "標準最小二乗")、
強調( "効果レバレッジ")、
実行(
:weight << {近似の要約(1)、分散分析(1)、パラメータの推定値(1)、近似の欠如(0)、実際の予測値によるプロット(1)
プロット回帰(0)、予測残差プロット(1)、プロット効果レバレッジ(1)、ボックスコックスY変換(1)、
最良の変換を保存する(1)
)
)
;
再:JSL - 最高の変換を保存参考までに、ここでは文字列を作成する必要のない代替手段です。このように、エディタでの構文チェックと強調表示は保持されます。あなたが私と同じくらい多くの間違いをするならば、それは役に立ちます。
NamesDefaultToHere(1);
dtName = "Big Class";
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
numericCols = dt << getColumnNames("String", "Numeric");
// Build a function to do what's needed . . .
getBestBoxCox =
Function({numCol}, {Default Local},
// Open the fit model lauch dialog
fmDialog = dt << Fit Model(
Y( Eval(numCol) ),
Effects,
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" )
);
// Run the desired model ('fmAnalysis' is a reference to the analysis layer of the report window)
fmAnalysis = fmDialog << runModel;
// Close the launch dialog
Report(fmDialog) << closeWindow;
// Ask for the transformations
fmAnalysis << Box Cox Y Transformation;
// Get a reference to the little red triangle for the transformations
lrt = Report(fmAnalysis)["Box-Cox Transformations"] << getScriptableObject;
// Save the best transformation
lrt << saveBestTransformation;
// Close the report window
Report(fmAnalysis) << closeWindow;
);
// Use the function on the required columns . . .
for(c=1, c<=NItems(numericCols), c++, getBestBoxCox(numericCols[c]));
再:JSL - 最高の変換を保存こんにちはstephen_pearson、
ちょうど私が必要としているのは 'Box Cox Y変換(1、Save Best Transformation(1))'です。はい、私はこのオプションのための複数の選択を通して実行しています、そしてそれは今手動介入なしで処理しています。ありがとう再:JSL - 最高の変換を保存JSLで共有したコードを文字列として作成し、変換したいすべての列名をリストとして作成した場合( colListYBoxCox その後、列名を代入して、リスト内のすべての列をループすることができます(以下の例)。
私はこれをして、それからボックス - コックス変換が大きな違いを生むかどうかチェックし、そして時間の無駄だったものを自動的に削除しました。
よろしく、
スティーブン
(i = 1、i <= N Items(colListYBoxCox)、i ++の場合、
boxcoxstring = "boxcoxwindow =フィットモデル(
Y( ";
boxcoxstring = Concat(boxcoxstring、":Name(\!" "、colListYBoxCox [i]、" \!")、");
boxcoxstring = Concat(boxcoxstring、")、");
boxcoxstring = Concat(
boxcoxstring、
「効果、
性格(\!"標準最小二乗\!")、
強調(\!"エフェクトレバレッジ\!")、"
;
boxcoxstring = Concat(
boxcoxstring、
"Run(:Name(\!" "、
colListYBoxCox [i]、
"\!")<< {適合性の欠如(0)、予測値による実際のプロット(0)、
回帰プロット(0)、予測残差プロット(0)、
プロット効果レバレッジ(0)、ボックスコックスY変換(1、ベスト変換の保存(1))、VIF表示(1)}、
)
;
boxcoxstring = Concat(boxcoxstring、");" ;
評価(解析(boxcoxstring));
待つ(0);
boxcoxwindow <<ウィンドウを閉じる。
;