{"version":2,"type":"job","id":"60d08cd0-3dc3-405a-88c9-8aeb4772a4a4","name":"#3_階層的クラスタリング.cpf","label":"#3_階層的クラスタリング","description":"","created":1664628699714,"modified":1664850099240,"notes":"","parameters":{"server":"","target":"com.sas.ep.sascoder.execution.producers.VPP","action":"processFlow","priority":"Reserved"},"properties":{"left":"20","top":"20","width":"100","height":"60","region":"output","fillcolor":"#FCFCFC","linecolor":"#9a9a9a","tooltip":"","portsonly":false,"key":"control","visible":true,"readonly":false},"steps":[{"version":2,"type":"import","id":"efdcf34b-6774-4d82-8e54-a1cdefec11cd","name":"","label":"\"Japan_expenditure_2014.csv\" のインポート ","description":"","created":1664850474846,"modified":1664850483291,"notes":"","parameters":{"server":"","target":"com.sas.ep.sascoder.execution.producers.VPP","action":"runSASCode","priority":"Reserved","code":"/* 生成コード (IMPORT) */\r\n/* ソースファイル: Japan_expenditure_2014.csv */\r\n/* ソースパス: /home/u62013505 */\r\n/* コード生成日: 2022/10/04 11:28 */\r\n\r\n%web_drop_table(WORK.IMPORT);\r\n\r\n\r\nFILENAME REFFILE '/home/u62013505/Japan_expenditure_2014.csv';\r\n\r\nPROC IMPORT DATAFILE=REFFILE\r\n\tDBMS=CSV\r\n\tOUT=WORK.IMPORT;\r\n\tGETNAMES=YES;\r\nRUN;\r\n\r\nPROC CONTENTS DATA=WORK.IMPORT; RUN;\r\n\r\n\r\n%web_open_table(WORK.IMPORT);","resource":false,"outputType":"TABLE","outputName":"IMPORT","outputLocation":"WORK","fileName":"Japan_expenditure_2014.csv","filePath":"/home/u62013505","fileType":"","fileSheet":"","fileTable":"","delimiterOption":"","dataRowOption":-1,"guessingRowsOption":-1,"getnamesOption":true,"quoteDelimiterOption":true,"eolDelimiterOption":""},"properties":{"left":"92.0703125","top":"93.78193664550781","width":"100","height":"60","region":"output","fillcolor":"#E0E6F1","linecolor":"#6882a3","tooltip":""Japan_expenditure_2014.csv" のインポート ","portsonly":true,"key":"control","visible":true}},{"version":2,"type":"task","id":"06cde7e3-b6fc-4c2f-8d1c-077a07574d79","name":"","label":"オブザベーションのクラスタリング","description":"オブザベーションのクラスタリングタスクは、座標データの標準化と、距離データへの変換を行い、様々な手法でクラスタリングを実行します。","created":1664850502514,"modified":1664850565097,"notes":"","parameters":{"server":"","target":"com.sas.ep.sascoder.execution.producers.VPP","action":"runSASCode","priority":"Reserved","code":"/*\n *\n * SAS Studio 3.8 によって生成されたタスクコード \n *\n * 生成日 '2022/10/04 11:29' \n * 生成者 'u62013505' \n * 生成に使用されたサーバー 'ODAWS01-APSE1-2.ODA.SAS.COM' \n * 生成に使用された SAS プラットフォーム 'Linux LIN X64 3.10.0-1062.12.1.el7.x86_64' \n * 生成に使用された SAS バージョン '9.04.01M6P11072018' \n * 生成に使用されたブラウザ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36' \n * 生成に使用された Web クライアント 'https://odamid-apse1-2.oda.sas.com/SASStudio/main?locale=ja&zone=GMT%252B09%253A00&ticket=ST-104640-3rSxhjAWmvdiuRCttHAg-cas' \n *\n */\n\nods noproctitle;\n\n/*** 変数の標準化 ***/\nproc distance data=WORK.IMPORT stdonly outsdz=Work._Temp_sdz;\n\tvar ratio('食料'n '住居'n '光熱・水道'n '家具・家事用品'n '被服及び履物'n '保健医療'n '交通・通信'n '教育'n \n\t\t'教養娯楽'n '読書'n '聴視・観覧'n '旅行'n 'スポーツ'n '月謝'n '会費・つきあい費'n / std=maxabs);\nrun;\n\nproc cluster data=Work._Temp_sdz method=ward plots outtree=work.Cluster_tree;\n\tvar '食料'n '住居'n '光熱・水道'n '家具・家事用品'n '被服及び履物'n '保健医療'n '交通・通信'n '教育'n '教養娯楽'n \n\t\t'読書'n '聴視・観覧'n '旅行'n 'スポーツ'n '月謝'n '会費・つきあい費'n;\n\tid '都道府県'n;\nrun;\n\nproc delete data=Work._Temp_sdz;\nrun;","ctm":"./resources/sas/models/HierarchicalClustering.xml","serializedData":"\n \n オブザベーションのクラスタリング\n オブザベーションのクラスタリングタスクは、座標データの標準化と、距離データへの変換を行い、様々な手法でクラスタリングを実行します。\n 13433cb9-c32d-480e-aff9-3164e5d5a6c7\n DISTANCE CLUSTER FASTCLUS\n 3.8\n \n SAS Studio タスクリファレンスガイド\n \n \n CLUSTER プロシジャ\n \n \n FASTCLUS プロシジャ\n \n \n DISTANCE プロシジャ\n \n \n SAS チュートリアル\n \n \n \n \n \n \n クラスタリングに使用する変数:\n 比例変数\n 間隔変数:\n 順序変数:\n 対称の名義変数:\n 非対称の名義変数:\n 非対称の名義変数:\n 度数カウント:\n 重み変数:\n グループ分析:\n クラスターのオブザベーションの識別:\n これらの変数を含める:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Select at least one level of measurement for the variables to be used in clustering.\n \n \n Select at least two ratio variables to use in clustering for the correlation and squared correlation dissimilarity measures.\n \n \n Select at least two ratio, interval, or ordinal variables to use in clustering for the correlation and squared correlation dissimilarity measures.\n \n \n Select at least two ratio, interval, or ordinal variables to use in clustering for the correlation and squared correlation dissimilarity measures.\n \n \n Select at least two ratio, interval, or ordinal variables to use in clustering for the correlation and squared correlation dissimilarity measures.\n \n \n Specify either the maximum number of clusters or the minimum distance from a candidate seed to existing seeds in the Clustering methods group on the Options tab.\n \n \n Select at least one plot on the Options tab.\n \n \n The Cluster seeds data set cannot be the same as the data set being analyzed.\n \n \n 0)\nproc sort data=$dataset out=Work.SortTempTableSorted;\n #if ($dataset.getWhereClause() != '')\n where $dataset.getWhereClause();\n #end\n by #foreach( $item in $byVariables ) $item #end;\nrun;\n#end\n\n## INPUT data set contains coordinate data, not distance data\n#if (!($dataset.getDataType().equalsIgnoreCase('DISTANCE')))\n\n #if ($distGowerOnlyCombo) #set ($methodCombo = $distGowerOnlyCombo)\n #elseif ($distRatioOnlyCombo) #set ($methodCombo = $distRatioOnlyCombo)\n #elseif ($distNominalOnlyCombo) #set ($methodCombo = $distNominalOnlyCombo)\n #elseif ($distAsymNominalOnlyCombo)#set ($methodCombo = $distAsymNominalOnlyCombo)\n #elseif ($distRatioIntervalOrdinalCombo)#set ($methodCombo = $distRatioIntervalOrdinalCombo)\n #elseif ($distRatioAsymNominalCombo)#set ($methodCombo = $distRatioAsymNominalCombo)\n #end\n\n## Standardization is optional if only one level of measurement is used; required if more than one is used UNLESS\n## standardization is explicitly suppressed\n #set($_standardizeData=0)\n #set($_standardizeRequired=0)\n #set($_standardizeRatioData=0)\n #set($_standardizeIntervalData=0)\n #set($_standardizeOrdinalData=0)\n #if (!($suppressStdCheckbox == 1))\n #set($_sum=0)\n #if ($ratioData == 1)#set($_sum=$_sum+1)#end\n #if ($intervalData == 1)#set($_sum=$_sum+1)#end\n #if ($ordinalData == 1)#set($_sum=$_sum+1)#end \n #if ($nominalData == 1)#set($_sum=$_sum+1)#end \n #if ( $_sum > 1 ||\n (\n ($ratioData == 1 && $ratioStdCheckbox == 1) ||\n ($intervalData == 1 && $intervalStdCheckbox == 1) ||\n ($ordinalData == 1 && $ordinalStdCheckbox == 1)\n )\n )#set($_standardizeData=1)\n #end\n #if ($_sum > 1)#set($_standardizeRequired=1)#end\n #if ($ratioData == 1 && ($ratioStdCheckbox == 1 || $_standardizeRequired==1))#set($_standardizeRatioData=1)#end\n #if ($intervalData == 1 && ($intervalStdCheckbox == 1 || $_standardizeRequired==1))#set($_standardizeIntervalData=1)#end\n #if ($ordinalData == 1 && ($ordinalStdCheckbox == 1 || $_standardizeRequired==1))#set($_standardizeOrdinalData=1)#end\n #end\n\n ## Create distances unless using k-means || Euclidean distances \n #set($_createDistances=1)\n #if ($clusteringMethod == \"kmeansChoice\" || $methodCombo == 'euclidChoice')#set($_createDistances=0)#end\n\n ## Use the DISTANCE procedure if standardizing data or creating distances \n #set($useProcDistance=0)\n #if ($_standardizeData==1 || $_createDistances==1)#set($useProcDistance=1)#end\n\n #if ($useProcDistance == 1)\n\n #if ($_createDistances == 1) \n #if ($_standardizeData == 1)\n/*** $stdVarCreateDistComment ***/ \n #else\n/*** $createDistComment ***/\n #end \n #else\n #if ($_standardizeData == 1)\n/*** $stdVarComment ***/\n #end\n #end\n \n #if ($byVariables.size() > 0)\nproc distance data=Work.SortTempTableSorted \n #else\nproc distance data=$dataset \n #end\n\n #if ($_createDistances==1)\n #if (!($_standardizeData == 1 )) nostd#end\n\nmethod=\n #if ($methodCombo == 'dgowerChoice')dgower\n#elseif ($methodCombo == 'euclidChoice')euclid\n#elseif ($methodCombo == 'sqeuclidChoice')sqeuclid\n#elseif ($methodCombo == 'minkowskiChoice')L($lambda)\n#elseif ($methodCombo == 'chebychevChoice')chebychev\n#elseif ($methodCombo == 'cityblockChoice')cityblock\n#elseif ($methodCombo == 'dcorrChoice')dcorr\n#elseif ($methodCombo == 'sizeChoice')size\n#elseif ($methodCombo == 'shapeChoice')shape\n#elseif ($methodCombo == 'disratioChoice')disratio\n#elseif ($methodCombo == 'nonmetricChoice')nonmetric\n#elseif ($methodCombo == 'canberraChoice')canberra\n#elseif ($methodCombo == 'doverlapChoice')doverlap\n#elseif ($methodCombo == 'chisqChoice')chisq\n#elseif ($methodCombo == 'phisqChoice')phisq\n#elseif ($methodCombo == 'chiChoice')chi\n#elseif ($methodCombo == 'phiChoice')phi\n#elseif ($methodCombo == 'hammingChoice')hamming\n#elseif ($methodCombo == 'dmatchChoice')dmatch\n#elseif ($methodCombo == 'dsqmatchChoice')dsqmatch\n#elseif ($methodCombo == 'blwmnChoice')blwmn\n#elseif ($methodCombo == 'djaccardChoice')djaccard\n#elseif ($methodCombo == 'dsqcorrChoice')dsqcorr\n#elseif ($methodCombo == 'powerChoice')power($power,$root)\n#end\n\n out=Work._tmp_distances\n;\n #else\n stdonly outsdz=Work._Temp_sdz; \n #end \n\n #if ($byVariables.size() == 0 && $dataset.getWhereClause() != '')\n where $dataset.getWhereClause();\n #end\n\n #if (($ratioData == '1' && $ratioVariables.size() > 0) || \n ($intervalData == '1' && $intervalVariables.size() > 0)|| \n ($ordinalData == '1' && $ordinalVariables.size() > 0) || \n ($symNominalData == '1' && $nominalVariables.size() > 0) ||\n ($asymNominalData == '1' && \n ($asymVarType == 'numVarChoice' && $asymNominalNumVariables.size() > 0) ||\n ($asymVarType == 'charVarChoice' && $asymNominalCharVariables.size() > 0)\n )\n )\n var\n\n #if ($ratioData == '1' && $ratioVariables.size() > 0) ratio(\n #foreach( $item in $ratioVariables ) $item #end\n\n #if ($_standardizeRatioData==1)\n #set($stdizeMethod = $ratioStdizeMethod)\n \n / std=#if ($stdizeMethod == 'stdDevChoice') std\n #elseif ($stdizeMethod == 'euclidStdChoice') euclen\n #elseif ($stdizeMethod == 'rangeChoice') range\n #elseif ($stdizeMethod == 'sumChoice') sum\n #elseif ($stdizeMethod == 'iqrChoice') iqr\n #elseif ($stdizeMethod == 'abwChoice') abw($ratioBwTuningConstant)\n #elseif ($stdizeMethod == 'ahuberChoice') ahuber($ratioHuberTuningConstant)\n #elseif ($stdizeMethod == 'awaveChoice') awave($ratioWaveTuningConstant)\n #elseif ($stdizeMethod == 'agkChoice') agk($ratioAgkProportion)\n #elseif ($stdizeMethod == 'madChoice') mad\n #elseif ($stdizeMethod == 'medianStdChoice') median\n #elseif ($stdizeMethod == 'meanChoice') mean\n #elseif ($stdizeMethod == 'maxabsChoice') maxabs\n #elseif ($stdizeMethod == 'spacingChoice') spacing($ratioSpacingProportion)\n #elseif ($stdizeMethod == 'minkowskiStdChoice') L($ratioLambda)\n #end\n #end\n )\n #end\n \n #if ($intervalData == '1' && $intervalVariables.size() > 0) interval(\n #foreach( $item in $intervalVariables ) $item #end\n\n #if ($_standardizeIntervalData==1)\n #set($stdizeMethod = $intervalStdizeMethod)\n \n / std=#if ($stdizeMethod == 'stdDevChoice') std\n #elseif ($stdizeMethod == 'rangeChoice') range\n #elseif ($stdizeMethod == 'iqrChoice') iqr\n #elseif ($stdizeMethod == 'abwChoice') abw($intervalBwTuningConstant)\n #elseif ($stdizeMethod == 'ahuberChoice') ahuber($intervalHuberTuningConstant)\n #elseif ($stdizeMethod == 'awaveChoice') awave($intervalWaveTuningConstant)\n #elseif ($stdizeMethod == 'agkChoice') agk($intervalAgkProportion)\n #elseif ($stdizeMethod == 'madChoice') mad\n #elseif ($stdizeMethod == 'medianStdChoice') median\n #elseif ($stdizeMethod == 'meanChoice') mean\n #elseif ($stdizeMethod == 'spacingChoice') spacing($intervalSpacingProportion)\n #elseif ($stdizeMethod == 'minkowskiStdChoice') L($intervalLambda)\n #elseif ($stdizeMethod == 'defaultChoice')\n #if ($methodType == 'distanceChoice' && $methodCombo == 'dgowerChoice')range\n #else std\n #end\n #end\n #end\n )\n #end\n\n #if ($ordinalData == '1' && $ordinalVariables.size() > 0) ordinal(\n #foreach( $item in $ordinalVariables ) $item #end\n\n #if ($_standardizeOrdinalData==1)\n #set($stdizeMethod = $ordinalStdizeMethod)\n \n / std=#if ($stdizeMethod == 'stdDevChoice') std\n #elseif ($stdizeMethod == 'rangeChoice') range\n #elseif ($stdizeMethod == 'iqrChoice') iqr\n #elseif ($stdizeMethod == 'abwChoice') abw($ordinalBwTuningConstant)\n #elseif ($stdizeMethod == 'ahuberChoice') ahuber($ordinalHuberTuningConstant)\n #elseif ($stdizeMethod == 'awaveChoice') awave($ordinalWaveTuningConstant)\n #elseif ($stdizeMethod == 'madChoice') mad\n #elseif ($stdizeMethod == 'medianStdChoice') median\n #elseif ($stdizeMethod == 'meanChoice') mean\n #elseif ($stdizeMethod == 'minkowskiStdChoice') L($ordinalLambda)\n #elseif ($stdizeMethod == 'defaultChoice')\n #if ($methodType == 'distanceChoice' && $methodCombo == 'dgowerChoice')range\n #else std\n #end\n #end\n #end\n )\n #end\n \n #if ($nominalData == '1')\n #if ($symNominalData == '1' && $nominalVariables.size() > 0) nominal(\n #foreach( $item in $nominalVariables ) $item #end\n )\n #end\n \n #if ($asymNominalData == '1') anominal(\n #if ($asymVarType == 'numVarChoice')\n #if($asymNominalNumVariables.size() > 0)\n #foreach( $item in $asymNominalNumVariables ) $item #end\n / absent=$numericAbsent\n #end\n #elseif ($asymVarType == 'charVarChoice')\n #if ($asymNominalCharVariables.size() > 0)\n #foreach( $item in $asymNominalCharVariables ) $item #end\n #if($charAbsent.contains('\"')) \n #set($txt2 = $charAbsent.replace('\"','\"\"'))\n / absent = \"$txt2\"\n #else / absent=\"$charAbsent\"\n #end \n #end\n #end\n )\n #end\n #end\n ;\n #end\n\n #if( $freqVariable.size() > 0 )\n freq #foreach( $item in $freqVariable ) $item #end;\n #end\n\n #if( $weightVariable.size() > 0 )\n weight #foreach( $item in $weightVariable ) $item #end;\n #end\n \n## Add idClusterVariable to copy statement with distance matrix\n #if($_createDistances == 1 && \n ($idClusterVariable.size() > 0 || ( $outtreeDS == 1 && $copyClusterVariables.size() > 0 )))\n copy \n #foreach( $item in $idClusterVariable ) $item#end\n #if( $outtreeDS == 1 && $copyClusterVariables.size() > 0 )\n #if ($idClusterVariable.size() == 0)\n #foreach( $item in $copyClusterVariables ) $item#end\n #else\n #foreach( $item in $idClusterVariable ) $item ## Note: there's only 1\n #foreach( $subitem in $copyClusterVariables)\n ## Check if a copyClusterVar is the same as the idClusterVar\n## Must do the comparison using $CTMUtil.toSASName() otherwise it won't work with n-literal notation \n #if (!($CTMUtil.toSASName($item.value) == $CTMUtil.toSASName($subitem.value))) $subitem#end\n #end\n #end\n #end\n #end\n ;\n #end\n\n #if( $byVariables.size() > 0 )\n by #foreach( $item in $byVariables ) $item #end;\n #end\nrun;\n #end ##end of if($useProcDistance == 1)\n\n #if ($clusteringMethod == \"kmeansChoice\")\n \n #if ( $byVariables.size() > 0 && $useSeedsDataset == 1) \nproc sort data=$seedsDataset out=$seedsDataset;\n by #foreach( $item in $byVariables ) $item #end;\nrun;\n #end\n \nproc fastclus data=\n #if ($_standardizeData == 1)\nWork._Temp_sdz\n #else \n #if( $byVariables.size() > 0 )Work.SortTempTableSorted\n #else $dataset\n #end\n #end\n \n #if ($useMaxclusters == 1) maxclusters=$maxClusters#end\n #if ($useRadius == 1) radius=$radius#end\n #if ($useMaxiter == 1) maxiter=$maxiter#end\n #if ($drift == 1) drift#end\n #if ($statsCombo=='customPrint')\n #if ($listFastclus == 1) list#end\n #if ($distanceFastclus== 1) distance#end\n #end\n #if ($useSeedsDataset == 1) seed=$seedsDataset#end\n #if ($outDS == 1) out=$outDSName#end\n #if ($outstatDS == 1) outstat=$outstatDSName#end\n #if ($outseedDS == 1) outseed=$outseedDSName#end\n;\n\n #if (!($_standardizeData == 1))\n #if ($byVariables.size() == 0 && $dataset.getWhereClause() != '')\n where $dataset.getWhereClause();\n #end\n #end\n \n #if( $ratioVariables.size() > 0 || $intervalVariables.size() > 0)\n var #foreach( $item in $ratioVariables ) $item #end#foreach( $item in $intervalVariables ) $item #end;\n #end\n\n #if( $freqVariable.size() > 0 )\n freq #foreach( $item in $freqVariable ) $item #end;\n #end\n\n #if( $byVariables.size() > 0 )\n by #foreach( $item in $byVariables ) $item #end;\n #end\nrun;\n \n #else\n\nproc cluster data=\n #if ($_createDistances == 1)\n #if ($outdistDS == 1) $outdistDSName\n #else Work._tmp_distances\n #end\n #elseif ($_standardizeData == 1)Work._Temp_sdz\n #else \n #if( $byVariables.size() > 0 )Work.SortTempTableSorted\n #else $dataset\n #end\n #end\n \n method=#if ($clusteringMethod == \"averageChoice\")average \n #elseif ($clusteringMethod == \"centroidChoice\")centroid \n #elseif ($clusteringMethod == \"completeChoice\")complete \n #elseif ($clusteringMethod == \"densityChoice\")density\n #elseif ($clusteringMethod == \"flexibleChoice\")flexible#if ($useBeta == 1) beta=$beta#end \n #elseif ($clusteringMethod == \"mcquittyChoice\")mcquitty\n #elseif ($clusteringMethod == \"medianChoice\")median\n #elseif ($clusteringMethod == \"singleChoice\")single\n #elseif ($clusteringMethod == \"twoStageChoice\")twostage\n #elseif ($clusteringMethod == \"wardChoice\")ward\n #end\n \n #if ($useTrim && $useTrim == 1) trim=$trim#end\n #if ($kernelEstimation)\n #if ($kernelEstimation == 'uniformKernelChoice') r=$kernelR\n #elseif ($kernelEstimation == 'knnChoice') k=$kernelK\n #end \n #end\n \n #if ($statsCombo == 'customPrint')\n #if ($ccc == 1) ccc#end\n #if ($pseudo == 1) pseudo#end\n #if ($rmsstd == 1) rmsstd#end\n #if ($rsquare == 1) rsquare#end\n #if (!($nprintCombo == 'allGenerationsChoice'))\n #if ($nprintCombo == 'noGenerationsChoice') print=0\n #elseif ($nprintCombo == 'customGenerationsChoice') print=$nprint\n #end\n #end\n #end\n\n #if ($plotsCombo=='noplotsChoice') plots=none\n #else\n ## boolean for dendrogram\n #set($_treeplt = 0)\n #if ($plotsCombo=='defaultPlotChoice' || ($plotsCombo == 'customPlotChoice' && $treePlot == 1))#set($_treeplt=1)#end\n ## boolean for ccc or pseudo plots\n #set($_cccplt = 0)\n #if ($plotsCombo == 'customPlotChoice' && ($cccPlot == 1 || $pseudoPlot == 1))#set($_cccplt = 1)#end\n ## boolean for any global plot options\n #set($_plotOpts=0)\n #if ($useMaxclusToPlot == 1 || ($plotsCombo == 'customPlotChoice'))#set($_plotOpts=1)#end\n \n plots#if ($_plotOpts == 1)(#end\n #if($plotsCombo == 'customPlotChoice')only#end\n #if($useMaxclusToPlot == 1)\n #if ($_treeplt == 1) maxpoints=$maxClustersToPlot#end\n #if ($_cccplt == 1) maxclus=$maxClustersToPlot#end\n #end\n #if ($_plotOpts == 1))#end\n\n #if ($plotsCombo == 'customPlotChoice')\n #if ($cccPlot == 1 || $treePlot == 1 || $pseudoPlot == 1)=(#end\n #if ($treePlot == 1) dendrogram#end\n #if ($cccPlot == 1) ccc#end\n #if ($pseudoPlot == 1) pseudo#end\n #if ($cccPlot == 1 || $treePlot == 1 || $pseudoPlot == 1))#end\n #end \n #end\n \n #if ($outtreeDS == 1) outtree=$outtreeDSName#end\n;\n\n #if (!($_standardizeData == 1))\n #if ($byVariables.size() == 0 && $dataset.getWhereClause() != '')\n where $dataset.getWhereClause();\n #end\n #end\n\n #if ($_createDistances == 1)\n var Dist:;\n #else\n #if( $ratioVariables.size() > 0 || $intervalVariables.size() > 0 || $ordinalVariables.size() > 0)\n var #foreach( $item in $ratioVariables ) $item #end#foreach( $item in $intervalVariables ) $item #end#foreach( $item in $ordinalVariables ) $item #end;\n #end\n #end\n\n #if( $outtreeDS == 1 && $copyClusterVariables.size() > 0 )\n copy #foreach( $item in $copyClusterVariables ) $item #end;\n #end\n\n #if ($idClusterVariable.size() > 0)\n id #foreach( $item in $idClusterVariable ) $item #end;\n #end\n\n #if( $byVariables.size() > 0 )\n by #foreach( $item in $byVariables ) $item #end;\n #end\nrun;\n#end\n\n#if (!($useProcDistance == 0 || $_standardizeData == 1) && !($outdistDS == 1)) proc delete data=Work._tmp_distances; run;#end\n\n#end\n\n## PROC CLUSTER step for Distance input data\n#if ($dataset.getDataType().equalsIgnoreCase('DISTANCE'))\n #if ($byVariables.size() > 0)\nproc cluster data=Work.SortTempTableSorted \n #else\nproc cluster data=$dataset \n #end\n \n method=#if ($clusteringMethod == \"averageChoice\")average \n #elseif ($clusteringMethod == \"centroidChoice\")centroid \n #elseif ($clusteringMethod == \"completeChoice\")complete \n #elseif ($clusteringMethod == \"densityChoice\")density \n #elseif ($clusteringMethod == \"flexibleChoice\")flexible#if ($useBeta == 1) beta=$beta#end\n #elseif ($clusteringMethod == \"mcquittyChoice\")mcquitty\n #elseif ($clusteringMethod == \"medianChoice\")median\n #elseif ($clusteringMethod == \"singleChoice\")single\n #elseif ($clusteringMethod == \"twoStageChoice\")twostage\n #elseif ($clusteringMethod == \"wardChoice\")ward\n #end\n \n #if ($useTrim && $useTrim == 1) trim=$trim#end\n #if ($kernelEstimation)\n #if ($kernelEstimation == 'uniformKernelChoice') r=$kernelR\n #elseif ($kernelEstimation == 'knnChoice') k=$kernelK\n #end \n #end\n \n #if ($statsCombo == 'customPrint')\n #if ($ccc == 1) ccc#end\n #if ($pseudo == 1) pseudo#end\n #if ($rmsstd == 1) rmsstd#end\n #if ($rsquare == 1) rsquare#end\n #end\n\n #if ($plotsCombo=='noplotsChoice') plots=none\n #else\n ## boolean for dendrogram\n #set($_treeplt = 0)\n #if ($plotsCombo=='defaultPlotChoice' || ($plotsCombo == 'customPlotChoice' && $treePlot == 1))#set($_treeplt=1)#end\n ## boolean for ccc or pseudo plots\n #set($_cccplt = 0)\n #if ($plotsCombo == 'customPlotChoice' && ($cccPlot == 1 || $pseudoPlot == 1))#set($_cccplt = 1)#end\n ## boolean for any global plot options\n #set($_plotOpts=0)\n #if ($useMaxclusToPlot == 1 || ($plotsCombo == 'customPlotChoice'))#set($_plotOpts=1)#end\n \n plots#if ($_plotOpts == 1)(#end\n #if($plotsCombo == 'customPlotChoice')only#end\n #if($useMaxclusToPlot == 1)\n #if ($_treeplt == 1) maxpoints=$maxClustersToPlot#end\n #if ($_cccplt == 1) maxclus=$maxClustersToPlot#end\n #end\n #if ($_plotOpts == 1))#end\n\n #if ($plotsCombo == 'customPlotChoice')\n #if ($cccPlot == 1 || $treePlot == 1 || $pseudoPlot == 1)=(#end\n #if ($treePlot == 1) dendrogram#end\n #if ($cccPlot == 1) ccc#end\n #if ($pseudoPlot == 1) pseudo#end\n #if ($cccPlot == 1 || $treePlot == 1 || $pseudoPlot == 1))#end\n #end \n #end\n \n #if ($outtreeDS == 1) outtree=$outtreeDSName#end\n;\n \n #if ($byVariables.size() == 0 && $dataset.getWhereClause() != '')\n where $dataset.getWhereClause();\n #end\n \n #if( $analysisVariables.size() > 0 )\n var #foreach( $item in $analysisVariables ) $item #end;\n #end\n\n #if( $outtreeDS == 1 && $copyClusterVariables.size() > 0 )\n copy #foreach( $item in $copyClusterVariables ) $item #end;\n #end\n\n #if ($idClusterVariable.size() > 0)\n id #foreach( $item in $idClusterVariable ) $item #end;\n #end\n \n #if( $byVariables.size() > 0 )\n by #foreach( $item in $byVariables ) $item #end;\n #end\nrun;\n\n#end\n\n#if ($_standardizeData == 1 || $byVariables.size() > 0)\n\n #if ($_createDistances == 1)\n #if (!($outdistDS == 1))proc delete data=Work._tmp_distances;run;#end\n #elseif ($_standardizeData == 1)proc delete data=Work._Temp_sdz;run;\n #end\n\n #if ($byVariables.size() > 0)\nproc delete data=Work.SortTempTableSorted; run;\n #end\n\n#end\n]]>\n\n","dependencies":["efdcf34b-6774-4d82-8e54-a1cdefec11cd"]},"properties":{"left":"282.0703125","top":"93.78193664550781","width":"100","height":"60","region":"output","fillcolor":"#E0E6F1","linecolor":"#6882a3","tooltip":"オブザベーションのクラスタリング","portsonly":true,"key":"control","visible":true,"icon":"sasClusterAnalysisIcon"}}],"ports":[{"version":2,"type":"port","id":"cdd76998-e7c7-4d29-8fe1-cecb162bbb7c","name":"","label":"","description":"","created":1664850474855,"modified":1664850474857,"notes":"","parameters":{},"properties":{"left":"72.0703125","top":"116.78193664550781","width":"13","height":"13","parent":"efdcf34b-6774-4d82-8e54-a1cdefec11cd","region":"input","readonly":false,"disabled":false,"fillcolor":"#E0E6F1","linecolor":"#6882a3","key":"control"}},{"version":2,"type":"port","id":"44eca83a-acdb-4ffc-8b1a-4b066d6a4355","name":"","label":"","description":"","created":1664850474857,"modified":1664850488310,"notes":"","parameters":{},"properties":{"left":"199.0703125","top":"107.78193664550781","width":"13","height":"13","parent":"efdcf34b-6774-4d82-8e54-a1cdefec11cd","region":"output","readonly":false,"disabled":false,"fillcolor":"#E0E6F1","linecolor":"#6882a3","key":"control"}},{"version":2,"type":"port","id":"712e7f8c-e859-4f57-8e3e-64ee410cd28e","name":"IMPORT","label":"","description":"","created":1664850488305,"modified":1664850488310,"notes":"","parameters":{},"properties":{"left":"199.0703125","top":"125.78193664550781","width":"13","height":"13","parent":"efdcf34b-6774-4d82-8e54-a1cdefec11cd","region":"output","readonly":true,"disabled":false,"fillcolor":"#E0E6F1","linecolor":"#6882a3","key":"data","icon":"sasSASDataSetIcon10","libref":"WORK"}},{"version":2,"type":"port","id":"759fdf4d-51d0-4401-82ed-ac4dc2c78f23","name":"","label":"","description":"","created":1664850502524,"modified":1664850502529,"notes":"","parameters":{},"properties":{"left":"262.0703125","top":"116.78193664550781","width":"13","height":"13","parent":"06cde7e3-b6fc-4c2f-8d1c-077a07574d79","region":"input","readonly":false,"disabled":false,"fillcolor":"#E0E6F1","linecolor":"#6882a3","key":"control"}},{"version":2,"type":"port","id":"120c0ba4-cf2c-423f-89ab-d14982505069","name":"","label":"","description":"","created":1664850502526,"modified":1664850502529,"notes":"","parameters":{},"properties":{"left":"389.0703125","top":"116.78193664550781","width":"13","height":"13","parent":"06cde7e3-b6fc-4c2f-8d1c-077a07574d79","region":"output","readonly":false,"disabled":false,"fillcolor":"#E0E6F1","linecolor":"#6882a3","key":"control"}}],"connectors":[{"version":2,"type":"link","id":"2004e7b7-a738-460a-8cbb-55d7eb9b7a40","name":"","label":"","description":"","created":1664850502529,"modified":1664850502529,"notes":"","parameters":{},"properties":{"linecolor":"#C0C0C0","linestyle":"Dash"},"sources":[{"value":"44eca83a-acdb-4ffc-8b1a-4b066d6a4355"}],"targets":[{"value":"759fdf4d-51d0-4401-82ed-ac4dc2c78f23"}]}]}