📄 guiantminerjframe.java
字号:
jLabelNumberOfAttributes.setText(" "); } } { jPanel5 = new JPanel(); BoxLayout jPanel5Layout = new BoxLayout(jPanel5, javax.swing.BoxLayout.Y_AXIS); jPanel2.add(jPanel5, new GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(5, 2, 0, 5), 0, 0)); jPanel5.setBounds(396, 8, 385, 250); jPanel5.setLayout(jPanel5Layout); jPanel5.setBorder(BorderFactory.createTitledBorder("Selected Attribute")); jPanel5.setMinimumSize(new java.awt.Dimension(300, 250)); jPanel5.setSize(318, 250); { jPanel6 = new JPanel(); GridBagLayout jPanel6Layout = new GridBagLayout(); jPanel6Layout.columnWeights = new double[] {0.1,0.1,0.1,0.1,0.1,0.1}; jPanel6Layout.columnWidths = new int[] {30,52,120,92,58,25}; jPanel6Layout.rowWeights = new double[] {1.0,1.0,0.1}; jPanel6Layout.rowHeights = new int[] {18,22,4}; jPanel5.add(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6.setBounds(6, 19, 369, 41); jPanel6.setPreferredSize(new java.awt.Dimension(376, 35)); jPanel6.setMinimumSize(new java.awt.Dimension(10, 35)); { jLabel8 = new JLabel(); jPanel6.add(jLabel8, new GridBagConstraints( 2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel8.setFont(new java.awt.Font("Dialog",0,12)); jLabel8.setText(" "); } { jLabel9 = new JLabel(); jPanel6.add(jLabel9, new GridBagConstraints( 1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel9.setText("Missing: "); jLabel9.setFont(new java.awt.Font("Dialog",0,12)); jLabel9.setHorizontalAlignment(SwingConstants.RIGHT); jLabel9.setHorizontalTextPosition(SwingConstants.RIGHT); } { jLabel10 = new JLabel(); jPanel6.add(jLabel10, new GridBagConstraints( 2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel10.setFont(new java.awt.Font("Dialog",0,12)); jLabel10.setText(" "); } { jLabel11 = new JLabel(); jPanel6.add(jLabel11, new GridBagConstraints( 3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel11.setText("Distinct Values: "); jLabel11.setFont(new java.awt.Font("Dialog",0,12)); } { jLabelDistinct = new JLabel(); jPanel6.add( jLabelDistinct, new GridBagConstraints( 4, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabelDistinct.setFont(new java.awt.Font("Dialog",0,12)); jLabelDistinct.setText(" "); } { jLabel7 = new JLabel(); jPanel6.add(jLabel7, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel7.setText("Name: "); jLabel7.setFont(new java.awt.Font( "Dialog", 0, 12)); jLabel7.setBounds(0, 0, 45, 16); } } { jScrollPane3 = new JScrollPane(); jPanel5.add(jScrollPane3); jScrollPane3.setBounds(5, 63, 374, 181); jScrollPane3.setPreferredSize(new java.awt.Dimension(368, 181)); } } { jPanel4 = new JPanel(); BorderLayout jPanel4Layout = new BorderLayout(); jPanel4.setLayout(jPanel4Layout); jPanel2.add(jPanel4, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(263, 4, 5, 7), 0, 0)); jPanel4.setBounds(398, 264, 381, 225); jPanel4.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); jPanel4.setMinimumSize(new java.awt.Dimension(10, 210)); jPanel4.setSize(337, 200); jPanel4.setPreferredSize(new java.awt.Dimension(381, 210)); } } { jPanel3 = new JPanel(); jTabbedPane1.addTab("Classify", null, jPanel3, null); GridBagLayout jPanel3Layout = new GridBagLayout(); jPanel3Layout.columnWeights = new double[] {0.0,1.0}; jPanel3Layout.columnWidths = new int[] {150,500}; jPanel3Layout.rowWeights = new double[] {1.0}; jPanel3Layout.rowHeights = new int[] {7}; jPanel3.setLayout(jPanel3Layout); { jButton1 = new JButton(); jPanel3.add(jButton1, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(292, 10, 0, 0), 0, 0)); jButton1.setText("Start"); jButton1.setBounds(19, 234, 99, 24); jButton1.setToolTipText("Start classification. This operation may take a few minutes."); jButton1.setSize(75, 23); jButton1.setMinimumSize(new java.awt.Dimension(75, 23)); jButton1.setMaximumSize(new java.awt.Dimension(75, 23)); jButton1.setPreferredSize(new java.awt.Dimension(75, 23)); jButton1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { setIsClassifying(true); cv = new CrossValidation(GUIAntMinerJFrame.this); cv.setAttributesArray(attributesArray); cv.setDataInstancesArray(dataInstancesArray); cv.setNumAnts(Integer.parseInt(jTextField1.getText())); cv.setFolds(Integer.parseInt(jTextField2.getText())); cv.setMinCasesRule(Integer.parseInt(jTextField3.getText())); cv.setConvergenceTest(Integer.parseInt(jTextField5.getText())); cv.setNumIterations(Integer.parseInt(jTextField6.getText())); cv.setMaxUncoveredCases(Integer.parseInt(jTextField4.getText())); cv.start(); } }); } { jPanel7 = new JPanel(); GridBagLayout jPanel7Layout = new GridBagLayout(); jPanel7Layout.columnWeights = new double[] {0.0,0.0,0.0}; jPanel7Layout.columnWidths = new int[] {20,135,60}; jPanel7Layout.rowWeights = new double[] {0.0,0.0,0.0,0.0,0.0}; jPanel7Layout.rowHeights = new int[] {22,22,22,22,22}; jPanel3.add(jPanel7, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(60, 5, 0, 2), 0, 0)); jPanel7.setBounds(7, 58, 260, 141); jPanel7.setLayout(jPanel7Layout); jPanel7.setBorder(BorderFactory.createTitledBorder("Other Parameters")); jPanel7.setMinimumSize(new java.awt.Dimension(10, 150)); jPanel7.setPreferredSize(new java.awt.Dimension(10, 150)); jPanel7.setSize(261, 150); { jLabel13 = new JLabel(); jPanel7.add(jLabel13, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel13.setText("Number of Ants:"); jLabel13.setFont(new java.awt.Font("Dialog",0,12)); } { jTextField1 = new JTextField(); jPanel7.add(jTextField1, new GridBagConstraints( 2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jTextField1.setText("5"); jTextField1.setPreferredSize(new java.awt.Dimension(40, 20)); } { jTextField3 = new JTextField(); jPanel7.add(jTextField3, new GridBagConstraints( 2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jTextField3.setText("5"); jTextField3.setPreferredSize(new java.awt.Dimension(40, 20)); } { jTextField4 = new JTextField(); jPanel7.add(jTextField4, new GridBagConstraints( 2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jTextField4.setText("10"); jTextField4.setPreferredSize(new java.awt.Dimension(40, 20)); } { jTextField5 = new JTextField(); jPanel7.add(jTextField5, new GridBagConstraints( 2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jTextField5.setText("10"); jTextField5.setPreferredSize(new java.awt.Dimension(40, 20)); } { jLabel6 = new JLabel(); jPanel7.add(jLabel6, new GridBagConstraints( 1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel6.setText("Rules for Convergence:"); jLabel6.setFont(new java.awt.Font("Dialog",0,12)); } { jLabel12 = new JLabel(); jPanel7.add(jLabel12, new GridBagConstraints( 1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel12.setText("Min. Cases per Rule:"); jLabel12.setFont(new java.awt.Font("Dialog",0,12)); } { jLabel14 = new JLabel(); jPanel7.add(jLabel14, new GridBagConstraints( 1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel14.setText("Max. uncovered Cases:"); jLabel14.setFont(new java.awt.Font("Dialog",0,12)); } { jLabel15 = new JLabel(); jPanel7.add(jLabel15, new GridBagConstraints( 1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabel15.setText("Number of Iterations:"); jLabel15.setFont(new java.awt.Font("Dialog",0,12)); } { jTextField6 = new JTextField(); jPanel7.add(jTextField6, new GridBagConstraints( 2, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jTextField6.setPreferredSize(new java.awt.Dimension(40, 20)); jTextField6.setText("100"); } } { jPanel9 = new JPanel(); jPanel3.add(jPanel9, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 2), 0, 0)); GridBagLayout jPanel9Layout = new GridBagLayout(); jPanel9Layout.columnWidths = new int[] {20,135,60}; jPanel9Layout.columnWeights = new double[] {0.0,0.0,0.0}; jPanel9Layout.rowHeights = new int[] {22}; jPanel9Layout.rowWeights = new double[] {0.1}; jPanel9.setBorder(BorderFactory .createTitledBorder("Cross Validation"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -