Phil 8.10.16

7:00 – 4:30 VTX

  • Working on diagram
  • Realised that I don’t have an evaluation Criteria for RQ2
  • Got the antiBelief and origin force scalars working
  • Still don’t have the inserts and deletes working in Belief.addBeliefStatements() working something to talk to Don and Aaron about?
  • Starting to work on clustering. Extended the ResizableCanvas class, since it knows the global state.
  • Yay! I don’t have to implement DBSCAN. It’s in the apache math commons!
  • It works! You need to know the average spacing within a cluster. Here’s how.
    Clusters with eps of < 3.8461538461538463
    
    cluster (10 elements):
    Shape[0-0] pos = (5.14, 2.50), angle = 0.00
    Shape[0-1] pos = (7.46, 0.73), angle = 0.00
    Shape[0-2] pos = (2.51, 2.64), angle = 0.00
    Shape[0-4] pos = (5.11, 0.24), angle = 0.00
    Shape[0-6] pos = (4.07, 1.91), angle = 0.00
    Shape[0-7] pos = (4.14, 4.53), angle = 0.00
    Shape[0-8] pos = (3.82, 5.07), angle = 0.00
    Shape[0-3] pos = (1.96, 4.80), angle = 0.00
    Shape[0-5] pos = (0.68, 2.02), angle = 0.00
    Shape[0-9] pos = (2.73, 6.09), angle = 0.00
    
    cluster (10 elements):
    Shape[1-0] pos = (37.75, 38.52), angle = 0.00
    Shape[1-1] pos = (37.47, 38.50), angle = 0.00
    Shape[1-2] pos = (40.58, 37.65), angle = 0.00
    Shape[1-6] pos = (38.97, 37.11), angle = 0.00
    Shape[1-7] pos = (40.48, 39.53), angle = 0.00
    Shape[1-8] pos = (35.93, 35.51), angle = 0.00
    Shape[1-9] pos = (35.95, 40.37), angle = 0.00
    Shape[1-3] pos = (40.63, 34.00), angle = 0.00
    Shape[1-5] pos = (40.69, 35.59), angle = 0.00
    Shape[1-4] pos = (34.95, 34.15), angle = 0.00
    
    cluster (10 elements):
    Shape[2-0] pos = (68.48, 71.03), angle = 0.00
    Shape[2-4] pos = (67.78, 72.69), angle = 0.00
    Shape[2-5] pos = (67.39, 69.31), angle = 0.00
    Shape[2-6] pos = (71.04, 70.03), angle = 0.00
    Shape[2-8] pos = (70.69, 73.91), angle = 0.00
    Shape[2-1] pos = (70.23, 66.77), angle = 0.00
    Shape[2-2] pos = (74.27, 68.85), angle = 0.00
    Shape[2-3] pos = (72.95, 68.10), angle = 0.00
    Shape[2-7] pos = (72.85, 69.00), angle = 0.00
    Shape[2-9] pos = (72.05, 73.34), angle = 0.00
  • Yup, that worked:
    for(SmartShape outerSS : ssList){
        for(SmartShape innerSS : ssList){
            if(outerSS == innerSS){
                continue;
            }
            double[] op = outerSS.getPoint();
            double[] ip = innerSS.getPoint();
            double dist = Math.sqrt(op[0]*ip[0] + op[1]*ip[1]);
            distList.add(dist);
        }
    }
    distList.sort(doubleComparator);
    double eps = distList.get(distList.size()/10);
    DBSCANClusterer<SmartShape> dbscan = new DBSCANClusterer<SmartShape>(eps, 3);
    final List<Cluster<SmartShape>> clusterList = dbscan.cluster(ssList);
  • Well, that was a really good day…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.