Category Archives: PHP Development

Phil 10.11.17

7:00 – 3:30 ASRC MKT

  • Call ACK today about landing pad 7s. Nope – closed today
  • The Thirteenth International Conference on Spatial Information Theory (COSIT 2017)
  • Topic-Relevance Map: Visualization for Improving Search Result Comprehension
    • We introduce topic-relevance map, an interactive search result visualization that assists rapid information comprehension across a large ranked set of results. The topic-relevance map visualizes a topical overview of the search result space as keywords with respect to two essential information retrieval measures: relevance and topical similarity. Non-linear dimensionality reduction is used to embed high-dimensional keyword representations of search result data into angles on a radial layout. Relevance of keywords is estimated by a ranking method and visualized as radiuses on the radial layout. As a result, similar keywords are modeled by nearby points, dissimilar keywords are modeled by distant points, more relevant keywords are closer to the center of the radial display, and less relevant keywords are distant from the center of the radial display. We evaluated the effect of the topic-relevance map in a search result comprehension task where 24 participants were summarizing search results and produced a conceptualization of the result space. The results show that topic-relevance map significantly improves participants’ comprehension capability compared to a conventional ranked list presentation.
  • Important to remember for the Research Browser: Where to Add Actions in Human-in-the-Loop Reinforcement Learning
    • In order for reinforcement learning systems to learn quickly in vast action spaces such as the space of all possible pieces of text or the space of all images, leveraging human intuition and creativity is key. However, a human-designed action space is likely to be initially imperfect and limited; furthermore, humans may improve at creating useful actions with practice or new information. Therefore, we propose a framework in which a human adds actions to a reinforcement learning system over time to boost performance. In this setting, however, it is key that we use human effort as efficiently as possible, and one significant danger is that humans waste effort adding actions at places (states) that aren’t very important. Therefore, we propose Expected Local Improvement (ELI), an automated method which selects states at which to query humans for a new action. We evaluate ELI on a variety of simulated domains adapted from the literature, including domains with over a million actions and domains where the simulated experts change over time. We find ELI demonstrates excellent empirical performance, even in settings where the synthetic “experts” are quite poor.
  • This is interesting. DARPA had a Memex project that they open-sourced
  • Got PHP and xdebug set up on my home machines, mostly following these instructions. The dll that matches the PHP install needs to be downloaded from here and placed in the /php directory. Then add the following to the php.ini file:
    zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
    xdebug.profiler_append = 0
    xdebug.profiler_enable = 1
    xdebug.profiler_enable_trigger = 1
    xdebug.profiler_output_dir = "C:\xampp\tmp"
    xdebug.profiler_output_name = "cachegrind.out.%t-%s"
    xdebug.remote_enable = 0
    xdebug.remote_handler = "dbgp"
    xdebug.remote_host = ""
    xdebug.remote_port = "9876"
    xdebug.trace_output_dir = "C:\xampp\tmp"

    Then go to settings->Languages & Frameworks -> PHP, and either attach to the php CLI or refresh. The debugger should become visible: PHPsetup

  • Reworking the CHI DC to a CHIIR DC
    • There is a new version of the LaTex templates as of Oct 2 here. I wonder if that fixes the CHI problems?
    • Put things in the right format, got the pix in the columns. Four pages! Working on fixing text.
    • Finished first pass (time for multiple passes! Woohoo!)
    • Working on paragraph
    • Start schema for PolarizationGame
  • Theresa asked me to set up a new set of CSEs. Will need a credit card and the repository location. Waiting for that.

Phil 12.2.15

7:00 –

  • Learning: Neural Nets, Back Propagation
    • Synaptic weights are higher for some synapses than others
    • Cumulative stimulus
    • All-or-none threshold for propagation.
    • Once we have a model, we can ask what we can do with it.
    • Now I’m curious about the MIT approach to calculus. It’s online too: MIT 18.01 Single Variable Calculus
    • Back-propagation algorithm. Starts from the end and works forward so that each new calculation depends only on its local information plus values that have already been calculated.
    • Overfitting and under/over damping issues are also considerations.
  • Scrum meeting
  • Remember to bring a keyboard tomorrow!!!!
  • Checking that my home dev code is the same as what I pulled down from the repository
    • No change in definitelytyped
    • No change in the other files either, so those were real bugs. Don’t know why they didn’t get caught. But that means the repo is good and the bugs are fixed.
  • Validate that PHP runs and debugs in the new dev env. Done
  • Add a new test that inputs large (thousands -> millions) of unique ENTITY entries with small-ish star networks of partially shared URL entries. Time view retrieval times for SELECT COUNT(*) from tn_view_network_items WHERE network_id = 8;
    • Computer: 2008 Dell Precision M6300
    • System: Processor Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz, 2201 Mhz, 2 Core(s), 2 Logical Processor(s), Available Physical Memory 611 MB
    • 100 is 0.09 sec
    • 1000 is 0.14 sec
    • 10,000 is 0.84 sec
    • Using Open Office’s linear regression function, I get the equation t = 0.00007657x + 0.733 with an R squared of 0.99948.
    • That means 1,000,000 view entries can be processed in 75 seconds or so as long as things don’t get IO bound
  • Got the PHP interpreter and debugger working. In this case, it was just refreshing in settings->languages->php

Phil 11.25.15

7:00 – 1:00 Leave

  • Constraints: Search, Domain Reduction
    • Order from most constrained to least.
    • For a constrained problem, check over and under allocations to see where the gap between fast failure and fast completion lie.
    • Only recurse through neighbors where domain (choices) have been reduced to 1.
  • Dictionary
    • Add an optional ‘source_text’ field to the tn_dictionaries table so that user added words can be compared to the text. Done. There is the issue that the dictionary could be used against a different corpus, at which point this would be little more than a creation artifact
    • Add a ‘source_count’ to the tn_dictionary_entries table that is shown in the directive. Defaults to zero? Done. Same issue as above, when compared to a new corpus, do we recompute the counts?
    • Wire up Attach Dictionary to Network
      • Working on AlchemyDictReflect that will place keywords in the tn_items table and connect them in the tn_associations table.
      • Had to add a few helper methods in networkDbIo.php to handle the modifying of the network tables, since alchemyNLPbase doesn’t extend baseBdIo. Not the cleanest thing I’ve ever done, but not *horrible*.
      • Done and working! Need to deploy.

Phil 11.24.15

7:00 – Leave

  • Constraints: Interpreting Line Drawings
    • Successful research:
      • Finds a problem
      • Finds a method that solves the problem
      • Using some principal (That can be generalized)
  • Gave Aaron M. A subversion account and sent him a description of the structure of the project
  • Back to dictionary creation
    • Wire up Extract into Dictionary
      • I think I’m going to do most of this on the server. If I do a select text from tn_view_network_items where network = X, then I can run that text that is already in the DB through the term extractor, which should be the fastest thing I can do.
      • The next fastest thing would be to pull the text from the url (if it exists) and add that to the text pull.
      • Added a getTextFromNetwork() method to NetworkDbObject.
      • The html was getting extracted badly, so I had to add a call to alchemy to return the cleaned text. TODO: in the future add a ‘clean_text’ column to tn_items so this is done on ingestion. I also added
      • Added all the pieces to the rssPull.php file and tested. And integrated with the client. Looks like it takes about 8 seconds to go through my resume, so some offline processing will probably be needed for ACM papers, for example.
    • Wire up Attach Dictionary to Network
      • The current setup is set so that a new item that is read in will associate with the current network dictionary. Need to add a way to have the items that are already in the network to check themselves against the new dictionary.
      • Added class AlchemyDictReflect that will place keywords in the DB. Still need to debug. And don’t forget that the controller will have to reload the network after all thechanges are made.


Phil 11.23.15

7:00 – Leave

  • Search: Games, Minimax, and Alpha-Beta
    • Branching factor (B)
    • Search depth (D)
    • Combining the two gives the number of leaf nodes or B^D
    • Branching factor of chess is approximately 14?
  • Dictionaries
    • Wire up Create New Dictionary – done
    • Wire up Extract into Dictionary
      • I think I’m going to do most of this on the server. If I do a select text from tn_view_network_items where network = X, then I can run that text that is already in the DB through the term extractor, which should be the fastest thing I can do.
      • The next fastest thing would be to pull the text from the url (if it exists) and add that to the text pull.
    • Wire up Attach Dictionary to Network
      • The current setup is set so that a new item that is read in will associate with the current network dictionary. Need to add a way to have the items that are already in the network to check themselves against the new dictionary.

Phil 11.20.15

7:00 – Leave

  • Search: Optimal, Branch and Bound, A*
    • Dead Horse principle.
    • Admissible vs. consistency heuristics.
  • Dictionaries
    • Wire up Add – Done. Also found a bug in the PHP code that was screwing up parent return. So that took a while…
    • Wire up Delete – Done. That went much better!
    • Wire up New Dictionary
    • Wire up Extract
    • Wire up Attach

Phil 11.19.15

7:00 – 5:00 Leave

  • Reasoning: Goal Trees and Rule-Based Expert Systems
    • There, now I’m back in order.
    • H. Simon – The complexity of the behavior is max(cplx(prgm), cplx(env))
    • More Genesis – Elaboration graphs
    • Genesis judges similarity in multiple ways: (this presentation, page 25)
      • Using word vectors
      • Using concept vectors: seeing similarities not evident in the words.
    • Genesis aligns similar stories for analogical reasoning (Needleman-Wunch algorithm, which is a way of comparing string similarity using matrices)
  • IRB renewal – ask Wayne
  • In a fit of orderliness, created shortcuts to the cmd windows that the makefiles run in
  • Dictionaries
    • Don’t forget to move the text-extraction calls to the methods that need it and see if that speeds up the others. Done. Much faster. PHP is dumb. Or needs a preloader/compiler
    • Cleaned up the loading and display code a bit. Need to add a tree view (which looks like it can be done in pure CSS), but that can wait.
    • Adding manual entry
      • Finished the form
      • Clear for entry and separate parent is done
      • addition
      • deletion
      • modification (adding parents in particular)
    • Adding text extraction

Phil 11.17.15

7:00 – 4:00 leave

  • Reasoning: Goal Trees and Problem Solving (why is this pertinent to me?)
    • Apply all safe transforms
    • Apply heuristics
    • AND nodes and OR nodes (AND/OR, problem reduction, or goal tree)
  • Realized that I have a redundant user_id in tn_dictionary_entries. This could be used to allow non-owners to add words to the dictionary. Which means that dictionaries could be shared. On the whole, I think that’s a good idea. Adding the change to the dictionary code.
  • Ok, back to text extraction (Is this a safe transform?)
  • Added a _buildExtractor() private method and imported all the extractor parts.
  • It does take a long time. Just to load? I’d like to try profiling…
  • Wow. Extracting, loading into the database, getting the JSON output and deleting the dictionary all work!
  • I think the next step is to either get some definitions or start building the directive. After my lunchtime ride, I decided that the directive is probably the best thing to do next. Adding user functionality is a good way of ensuring that the server functionality makes sense.
  • Added ‘get_user_dictionaries‘ to rssPull.php. We’ll start with that.
  • Got the skeleton of a directive up and retrieving the dictionary list.


Phil 11.16.15

7:00 – 6:00 Leave

  • Found a new programmer resource that looks good – I Programmer. They pointed me to an article about Babel, which compiles JavaScript to… other things. It might even be able to monkeypatch modern JS to run on old browsers. Need to test one of these years. It’s based on plugins which really means that it can map from one thing to anything else. My only issue is that it could break debugging unless there is a mapping file like typescript has.
  • Discovered another communication app – Telegram. ISIS used it to announce Paris?
  • Noon – Thad Starner in ITE 459. Very interesting. Met Aaron Massey, who might be good on the Committee.
  • I’ve been reading Tefko Saracevic‘s paper RELEVANCE: A Review of and a Framework for the thinking on the Notion in Information Science. It’s full of really nice stuff, from a time when you couldn’t just throw processing power at problems and brute force an answer. It’s clarified my thinking about the client word-based network:
    • Search engines are pragmatic relevance engines (i.e topic-relatedness, quality, novelty, importance, credibility, etc.). The networks that they produce try to correlate knowledge at the ‘source’ – basically ‘in the world’
    • We, as individuals are pertinence/situational relevance machines (Wilson’s concerns, preferences and stock of knowledge). Our internal knowledge graph represents our view of the world. We are the ‘destination’ for information.
      • “Situational Relevance is relevance to a particular individual’s situation – but to the situation as he sees it, not as others see it, nor as it really is.”
      • The ‘shape’ of our internal knowledge graph, the sources of information that we lean more heavily on, the weights that we give to certain words (or possibly concepts) may be able to determine whether we are dependably credible or dependably counter-credible.
    • By enabling client-side weighting, we let users adjust components of a relevant search so that it becomes pertinent to us.
    • The information that we produce in this process (dictionaries, weights, etc) can be stored so that a well-structured record of what is pertinent to individuals (and more importantly, groups of individuals) becomes part of the world knowledge. Correlations with respect to internal credibility may then in turn be able to infer the credibility (or lack of) of information in the world.
  • Getting back to dictionary integration.
    • Re-upped my IntelliJ subscription for another two years
    • Updated files and DB. All seems to work
    • DbDictionary.removeDictionary returns a fail JSON message. Fixing. Fixed!
    • Adding ability to update an entry – done.
    • Finishing CreateDictionary. Finished and tested
    • Adding DeleteDictionary. Finished and tested
    • Adding ModifyDictionary. Finished and tested
    • Adding term extraction. Started poking, but that’s it. More tomorrow.

Phil 11.6.15

Burning vacation today

Working on the dictionary server code

  • Make sure that adding a parent doesn’t cause a loop.
  • Adding UpdateStatementObject helper class since I seem to be doing that a lot. And of course it took a few hours longer than I thought it would, but it’s nice and general.