public Object call() { ListDataSet animals = ListDataSet.Factory.ANIMALS(); animals.showGUI(); return animals; }
public void actionPerformed(ActionEvent e) { String s = query.getText(); if (s != null) { s = s.trim(); try { indexer.search(s).showGUI(); } catch (Exception ex) { } } } }
public Object call() { try { ListDataSet ds = ListDataSet.Factory.importFromClipboard(); if (getCoreObject() instanceof HasDataSetMap) { try { ((HasDataSetMap) getCoreObject()).getDataSetMap().add(ds); } catch (Exception e) { ds.showGUI(); } } else { ds.showGUI(); } return ds; } catch (Exception e) { e.printStackTrace(); return null; } }
public Object call() { int sampleCount = -1; while (sampleCount <= 0) { String s = JOptionPane.showInputDialog(getComponent(), "How many samples should the data set contain", "Henon Map DataSet", JOptionPane.QUESTION_MESSAGE); sampleCount = Integer.parseInt(s); } int inputLength = -1; while (inputLength <= 0) { String s = JOptionPane.showInputDialog(getComponent(), "How many values are used as input", "Henon Map DataSet", JOptionPane.QUESTION_MESSAGE); inputLength = Integer.parseInt(s); } int predictionLength = -1; while (predictionLength <= 0) { String s = JOptionPane.showInputDialog(getComponent(), "How many values must be predicted", "Henon Map DataSet", JOptionPane.QUESTION_MESSAGE); predictionLength = Integer.parseInt(s); } ListDataSet henon = ListDataSet.Factory.HenonMap(sampleCount, inputLength, predictionLength); henon.showGUI(); return henon; } }
public Object call() { try { URL url = null; while (url == null) { String s = JOptionPane.showInputDialog("Enter URL:", "http://"); url = new URL(s); } FileFormat fileFormat = FileFormat.values()[JOptionPane.showOptionDialog( getComponent(), "Select format", "Import DataSet", JOptionPane.OK_OPTION, JOptionPane.QUESTION_MESSAGE, null, FileFormat.values(), FileFormat.CSV)]; ListDataSet ds = ListDataSet.Factory.importFromURL(fileFormat, url); if (getCoreObject() instanceof HasDataSetMap) { try { ((HasDataSetMap) getCoreObject()).getDataSetMap().add(ds); } catch (Exception e) { ds.showGUI(); } } else { ds.showGUI(); } return ds; } catch (Exception e) { e.printStackTrace(); return null; } }
public static void main(String[] args) throws Exception { Matrix data = Matrix.Factory.linkTo().file("/home/arndt/muenchen/totale2.txt").asDenseCSV(); // data.showGUI(); ListDataSet orig = new DefaultListDataSet(); // for (int r = 0; r < 10000; r++) { for (int r = 0; r < data.getRowCount(); r++) { if (r % 1000 == 0) { System.out.println(r + " of " + data.getRowCount()); } Collection<?> products = getProductsInLine(data, r); if (products.size() != 0) { RelationalSample s = Sample.Factory.relationalSample(products); orig.add(s); } } MarketBasketAnalysis mba = new MarketBasketAnalysis(); orig.showGUI(); ListDataSet ds = mba.calculate(orig); ds.showGUI(); }