Phil 2.10.19

Reading Clockwork Muse. Machines don’t really have a desire for novelty directly. But they do have the derivative of arousal potential. That comes from us, their creators. Machines on their own won’t change. Yet.  This is a manifestation of their non-evolutionary history. When machines can seek novelty and become bored is when they will become recognizable as entities.

Listening to Hidden Brain – One Head, Two Brains: How The Brain’s Hemispheres Shape The World We See (transcript)

  • This week on Hidden Brain, we dive into Iain’s research on how the left and right hemispheres shape our perceptions. Iain argues that differences in the brain — and Western society’s preference for what one hemisphere has to offer — have had enormous effects on our lives.
    • VEDANTAM: One of the important differences you point out is sort of understanding the role of metaphor in language. For example, which is that the left hemisphere really is incapable of understanding what metaphor is or how it works.
    • MCGILCHRIST: Yes. And that’s no small thing because as some philosophers have pointed out, metaphor is how we understand everything. And they point out that, actually, particularly scientific and philosophical understanding is mediated by metaphors. In other words, the only way we can understand something is in terms of something else that we think we already understand. And it’s making the analogy, which is what a metaphor does, that enables us to go, I see, I get it. Now, if you think that metaphor is just one of those dispensable decorations that you could add to meaning – it’s kind of nice but probably a distraction from the real meaning – you’ve got it upside down. Because if you don’t understand the metaphor, you haven’t understood the meaning. Literal meaning, however, is a peripheral, diminished version of the richness of metaphorical understanding. And what we know is the right hemisphere understands those implicit meanings, those connections of meanings, what we call connotations, as well as just denotations. It understands imagery. It understands humor. It understands all of that.
    • VEDANTAM: Have you ever wondered whether you, yourself, might be captive to your left hemisphere and you, potentially, now can’t see the problems with your own model?
    • MCGILCHRIST: That’s a very good point. And it’s not – I’m not critical of models, actually, in themselves. I’m critical of particular models because, in fact, we can’t understand anything – this is one of my basic points – except by having a model with which we compare it. So that is always a limitation. We don’t move from a world in which we have models to a better one in which we don’t. We move from a bad model to a better one. So every model has its limitations, but some form, simply, a better fit. And that is what the progress of science is.

This thread is wild. It’s how to force a stampede: YouTube

Phil 2.8.19

7:00 – 6:00 ASRC IRAD TL

  • Need to ping Eric about tasking. Suggest time series prediction. Speaking of which, Transformers (post 1 and post 2) may be much better than LSTMs for series prediction.
    • The Transformer model in Attention is all you need:a Keras implementation.
      • A Keras+TensorFlow Implementation of the Transformer: “Attention is All You Need” (Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, arxiv, 2017)
    • keras-transformer 0.17.0
      • Implementation of transformer for translation-like tasks.
    • The other option is “teachable” ML systems using evolution. There is a lot of interesting older work in this area:
      • Particle swarms for feedforward neural network training
      • Evolving artificial neural networks
      • Training Feedforward Neural Networks Using Genetic Algorithms.
        • Multilayered feedforward neural networks possess a number of properties which make them particularly suited to complex pattern classification problems. However, their application to some real world problems has been hampered by the lack of a training algorithm which reliably finds a nearly globally optimal set of weights in a relatively short time. Genetic algorithms are a class of optimization procedures which are good at exploring a large and complex space in an intelligent way to find values close to the global optimum. Hence, they are well suited to the problem of training feedforward networks. In this paper, we describe a set of experiments performed on data from a sonar image classification problem. These experiments both 1) illustrate the improvements gained by using a genetic algorithm rather than backpropagation and 2) chronicle the evolution of the performance of the genetic algorithm as we added more and more domain-specific knowledge into it.
  • Add writing to the db from within the program, download the latest slack bundle, and try storing it!
  • Read in test-dungeon-1 and realized that there is no explicit link between the channel and the message in the data, so I added fields for the current directory and the current file
  • Ok, everything seems to be working. I had a few trips around the block getting a unique id for messages, but that seems ok now.
  • Created view(s), where I learned how to use conditionals and was happy:
    SELECT * FROM t_message;
    SELECT * FROM t_message_files;
    
    CREATE or REPLACE VIEW user_view AS
    SELECT u.id, p.email, p.real_name,
           (CASE WHEN p.display_name > '' THEN p.display_name ELSE u.name END) as username
    FROM t_user u
           INNER JOIN t_user_profile p ON u.id = p.parent_id;
    
    select * from user_view;
    
    CREATE or REPLACE VIEW post_view AS
    SELECT FROM_UNIXTIME(p.ts) as post_time, p.dirname as post_topic, p.text as post_text, u.username,
           (CASE WHEN p.subtype > '' THEN p.subtype ELSE p.type END) as type
    FROM t_message p
           INNER JOIN user_view u ON p.user = u.id;
    
    select * from post_view order by post_time limit 1000;

     

  • Need to put together a strawman invitation that also has checkboxes for BB-based and/or Slack-based preferences and why a user might choose one over the other. Nope, not yet
  • Got the Slack academic discount!

Phil 2.7.19

7:00 – 7:00 ASRC IRAD TL

  • Continuing with Slack to DB process. I should be done with channels, and now I need to get conversations done.
    • The secondary tables that point to the primary user and conversation tables and the tertiary tables that point at them need to be looked at based on what happens when we go past the 10k limit (assuming that I can’t get the discount on the Standard Plan). REPLACE INTO won’t work with an auto incrementing primary key
    • Got all the parts working, now I need to automate and try out on Tymora1
    • Need to write up a letter for Don to sign – done
    • I think Emily is having a run tonight? Nope
    • Added a research_notes section to Slack for Aaron and I right now. I think I’ll invite Wayne as well – done! Need to know
  • Submitted expenses for TL trip
  • Was officially not invited to the TF dev conf
  • Shimei’s group meeting 4:30 – 7:00

Phil 2.6.19

7:00 – 5:00 ASRC IRAD (TL)

  • The role of maps in spatial knowledge acquisition
    • The Cartographic Journal
    • One goal of cartographic research is to improve the usefulness of maps. To do so, we must consider the process of spatial knowledge acquisition, the role of maps in that process, and the content of cognitive representations derived. Research from psychology, geography, and other disciplines related to these issues is reviewed. This review is used to suggest potential new directions for research with particular attention to spatial problem solving and geographic instruction. A classroom experiment related to these issues is then described. The experiment highlights some of the implications that a concern for the process of spatial knowledge acquisition will have on questions and methods of cartographic research as well as on the use of maps in geographic instruction. It also provides evidence of independent but interrelated verbal and spatial components of regional images that can be altered by directed map work.
  • It’s Not A Lie If You Believe It: Lying and Belief Distortion Under Norm-Uncertainty
    • This paper focuses on norm-following considerations as motivating behavior when lying opportunities are present. To obtain evidence on what makes it harder/easier to lie, we hypothesize that subjects might use belief-manipulation in order to justify their lying. We employ a two-stage variant of a cheating paradigm, in which subjects’ beliefs are elicited in stage 1 before performing the die task in stage 2. In stage 1: a) we elicit the subjects’ beliefs about majoritarian (i) behavior or (ii) normative beliefs in a previous session, and b) we vary whether participants are (i) aware or (ii) unaware of the upcoming opportunity to lie. We show that belief manipulation happens, and takes the form of people convincing themselves that lying behavior is widespread. In contrast with beliefs about the behavior of others, we find that beliefs about their normative convictions are not distorted, since believing that the majority disapproves of lying does not inhibit own lying. These findings are consistent with a model where agents are motivated by norm-following concerns, and honest behavior is a strong indicator of disapproval of lying but disapproval of lying is not a strong indicator of honest behavior. We provide evidence that supports this hypothesis.
  • Sent a note to Slack, asking for an academic plan. They do, and there are forms to fill out. I need to send Don some text that he can send back to me on letterhead.
  • Looks like I’m not going to the TF Dev Conf this year…
  • Continuing with the INSERT code
  • Meeting in Greenbelt to discuss… what, exactly?
  • Got a cool book: A Programmer’s Introduction to Mathematics
  • Got my converter creating error-free sql! t_user
  • Working on reading channel data into the db. Possibly done, but I’m afraid to run it so late in the day. I have chores!
  • Reviewing proposal for missing citations – done

Phil 2.5.19

7:00 – 5:00 ASRC IRAD

  • Got the parser to the point that it’s creating query strings, but I need to escape the text properly
  • Created and ab_slack mysql db
  • Added “parent_id” and an auto increment ID to any of the arrays that are associated with the Slack data
  • Reviewing sections 1-3 – done
  • Figure out some past performance – done
  • Work on the CV. Add the GF work and A2P ML work. – done
  • Start reimbursement for NJ trip
  •  Accidentally managed to start a $45/month subscription to the IEEE digital library. It really reeks of deceptive practices. There is nothing on the subscription page that informs you that this is a $45/month, 6-month minimum purchase. I’m about to contact the Maryland deceptive practices people to see if there is legal action that can be brought

Phil 1.30.19

7:00 – 4:00 ASRC IRAD

Teaching a neural network to drive a car. It’s a simple network with a fixed number of hidden nodes (no NEAT), and no bias. Yet it manages to drive the cars fast and safe after just a few generations. Population is 650. The network evolves through random mutation (no cross-breeding). Fitness evaluation is currently done manually as explained in the video.

  • This interactive balance between evolution and learning is exactly the sort of interaction that I think should be at the core of the research browser. The only addition is the ability to support groups collaboratively interacting with the information so that multiple analysts can train the system.
  • A quick thing on the power of belief spaces from a book review about, of all things, Hell. One of the things that gives dimension to a belief space is the fact that people show up.
    • Soon, he’d left their church and started one of his own, where he proclaimed his lenient gospel, pouring out pity and anger for those Christians whose so-called God was a petty torturer, until his little congregation petered out. Assured salvation couldn’t keep people in pews, it turned out. The whole episode, in its intensity and its focus on the stakes of textual interpretation, was reminiscent of Lucas Hnath’s recent play “The Christians,” about a pastor who comes out against Hell and sparks not relief but an exegetical nightmare.
  • Web Privacy Measurement in Real-Time Bidding Systems. A Graph-Based Approach to Rtb System Classification.
    • In the doctoral thesis, Robbert J. van Eijk investigates the advertisements online that seem to follow you. The technology enabling the advertisements is called Real-Time Bidding (RTB). An RTB system is defined as a network of partners enabling big data applications within the organizational field of marketing. The system aims to improve sales by real-time data-driven marketing and personalized (behavioral) advertising. The author applies network science algorithms to arrive at measuring the privacy component of RTB. In the thesis, it is shown that cluster-edge betweenness and node betweenness support us in understanding the partnerships of the ad-technology companies. From our research it transpires that the interconnection between partners in an RTB network is caused by the data flows of the companies themselves due to their specializations in ad technology. Furthermore, the author provides that a Graph-Based Methodological Approach (GBMA) controls the situation of differences in consent implementations in European countries. The GBMA is tested on a dataset of national and regional European news websites.
  • Continuing with Tkinter and ttk
      • That was easy!
        • app3
      • And now there is a scrollbar, which is a little odd to add. They are separate components that you have to explicitly link and place in the same ttk.Frame:
    # make the frame for the listbox and the scroller to live in
    self.lbox_frame = ttk.Frame(self.content_frame)
    
    # place the frame 
    self.lbox_frame.grid(column=0, row=0, rowspan=6, sticky=(N,W,E,S))
    
    # create the listbox and the scrollbar
    self.lbox = Listbox(self.lbox_frame, listvariable=self.cnames, height=5)
    lbox_scrollbar = ttk.Scrollbar(self.lbox_frame, orient=VERTICAL, command=self.lbox.yview)
    
    # after both components have been made, have the lbox point at the scroller
    self.lbox['yscrollcommand'] = lbox_scrollbar.set

     

    • If you get this wrong, then you can end up with a scrollbar in some other Frame, connected to your target. Here’s what happens if the parent is root:
      • badscroller
    • And here is where it’s in the lbox frame as in the code example above:
      • goodscroller
    • The fully formed examples are no more. Putting together a menu app with text. Got the text running with a scrollbar, and everything makes sense. Next is the menus…scrollingtext
    • Here’s the version of the app with working menus: slackdbio
  • For seminar: Predictive Analysis by Leveraging Temporal User Behavior and User Embeddings
    • The rapid growth of mobile devices has resulted in the generation of a large number of user behavior logs that contain latent intentions and user interests. However, exploiting such data in real-world applications is still difficult for service providers due to the complexities of user behavior over a sheer number of possible actions that can vary according to time. In this work, a time-aware RNN model, TRNN, is proposed for predictive analysis from user behavior data. First, our approach predicts next user action more accurately than the baselines including the n-gram models as well as two recently introduced time-aware RNN approaches. Second, we use TRNN to learn user embeddings from sequences of user actions and show that overall the TRNN embeddings outperform conventional RNN embeddings. Similar to how word embeddings benefit a wide range of task in natural language processing, the learned user embeddings are general and could be used in a variety of tasks in the digital marketing area. This claim is supported empirically by evaluating their utility in user conversion prediction, and preferred application prediction. According to the evaluation results, TRNN embeddings perform better than the baselines including Bag of Words (BoW), TFIDF and Doc2Vec. We believe that TRNN embeddings provide an effective representation for solving practical tasks such as recommendation, user segmentation and predictive analysis of business metrics.

Phil 1.29.19

7:00 – 5:30 ASRC IRAD

  • Theories of Error Back-Propagation in the Brain
    • This review article summarises recently proposed theories on how neural circuits in the brain could approximate the error back-propagation algorithm used by artificial neural networks. Computational models implementing these theories achieve learning as efficient as artificial neural networks, but they use simple synaptic plasticity rules based on activity of presynaptic and postsynaptic neurons. The models have similarities, such as including both feedforward and feedback connections, allowing information about error to propagate throughout the network. Furthermore, they incorporate experimental evidence on neural connectivity, responses, and plasticity. These models provide insights on how brain networks might be organised such that modification of synaptic weights on multiple levels of cortical hierarchy leads to improved performance on tasks.
  • Interactive Machine Learning by Visualization: A Small Data Solution
    • Machine learning algorithms and traditional data mining process usually require a large volume of data to train the algorithm-specific models, with little or no user feedback during the model building process. Such a “big data” based automatic learning strategy is sometimes unrealistic for applications where data collection or processing is very expensive or difficult, such as in clinical trials. Furthermore, expert knowledge can be very valuable in the model building process in some fields such as biomedical sciences. In this paper, we propose a new visual analytics approach to interactive machine learning and visual data mining. In this approach, multi-dimensional data visualization techniques are employed to facilitate user interactions with the machine learning and mining process. This allows dynamic user feedback in different forms, such as data selection, data labeling, and data correction, to enhance the efficiency of model building. In particular, this approach can significantly reduce the amount of data required for training an accurate model, and therefore can be highly impactful for applications where large amount of data is hard to obtain. The proposed approach is tested on two application problems: the handwriting recognition (classification) problem and the human cognitive score prediction (regression) problem. Both experiments show that visualization supported interactive machine learning and data mining can achieve the same accuracy as an automatic process can with much smaller training data sets.
  • Shifted Maps: Revealing spatio-temporal topologies in movement data
    • We present a hybrid visualization technique that integrates maps into network visualizations to reveal and analyze diverse topologies in geospatial movement data. With the rise of GPS tracking in various contexts such as smartphones and vehicles there has been a drastic increase in geospatial data being collect for personal reflection and organizational optimization. The generated movement datasets contain both geographical and temporal information, from which rich relational information can be derived. Common map visualizations perform especially well in revealing basic spatial patterns, but pay less attention to more nuanced relational properties. In contrast, network visualizations represent the specific topological structure of a dataset through the visual connections of nodes and their positioning. So far there has been relatively little research on combining these two approaches. Shifted Maps aims to bring maps and network visualizations together as equals. The visualization of places shown as circular map extracts and movements between places shown as edges, can be analyzed in different network arrangements, which reveal spatial and temporal topologies of movement data. We implemented a web-based prototype and report on challenges and opportunities about a novel network layout of places gathered during a qualitative evaluation.
    • Demo!
  • More TkInter.
    • Starting Modern Tkinter for Busy Python Developers
    • Spent a good deal of time working through how to get an image to appear. There are two issues:
      • Loading file formats:
        from tkinter import *
        from tkinter import ttk
        from PIL import Image, ImageTk
      • This is because python doesn’t know natively how to load much beyond gif, it seems. However, there is the Python Image Library, which does. Since the original PIL is deprecated, install Pillow instead. It looks like the import and bindings are the same.
      • dealing with garbage collection (“self” keeps the pointer alive):
        image = Image.open("hal.jpg")
        self.photo = ImageTk.PhotoImage(image)
        ttk.Label(mainframe, image=self.photo).grid(column=1, row=1, sticky=(W, E))
      • The issue is that if the local variable that contains the reference goes out of scope, the garbage collector (in Tkinter? Not sure) scoops it up before the picture can even appear, causing the system (and the debugger) to try to draw a None. If you make the reference global to the class (i.e. self.xxx), then the reference is maintained and everything works.
    • The relevant stack overflow post.
    • A pretty picture of everything working:
      • app
  • The 8.6.9 Tk/Ttk documentation
  • Looks like there are some WYSIWYG tools for building pages. PyGubu looks like its got the most recent activity
  • Now my app resizes on grid layouts: app2

Phil 1.27.19

The first group is through the test dungeon! Sooooooooooooooooooo much good data! Here’s a taste.

“Huffing a small breath out she did her best to figure out if the beings they were seeing matched up to the outlines they’d seen in the mist previously and if anything about the pair seemed off or odd. She does the same for the dragon though less familiar with the beasts than normal humans, it’s deal… seemed like too easy of a solution and it seemed highly unlikely that it was going to just let them run off with part of its hoard – which in her mind meant it was likely some sort of trick. Figuring out what the trick of it all was currently was her main focus.”

Continuing on my into to TkInter, which is looking a lot like FLTK from my C++ GUI days. I am not complaining. FLTK was awesome.

Phil 1.26.19

Tangled Worldview Model of Opinion Dynamics

  • We study the joint evolution of worldviews by proposing a model of opinion dynamics, which is inspired in notions from evolutionary ecology. Agents update their opinion on a specific issue based on their propensity to change — asserted by the social neighbours — weighted by their mutual similarity on other issues. Agents are, therefore, more influenced by neighbours with similar worldviews (set of opinions on various issues), resulting in a complex co-evolution of each opinion. Simulations show that the worldview evolution exhibits events of intermittent polarization when the social network is scale-free. This, in turn, trigger extreme crashes and surges in the popularity of various opinions. Using the proposed model, we highlight the role of network structure, bounded rationality of agents, and the role of key influential agents in causing polarization and intermittent reformation of worldviews on scale-free networks.
  • Saved to Flocking and Herding

Phil 1.25.19

7:00 – 5:30 ASRC NASA/PhD

    • Practical Deep Learning for Coders, v3
    • Continuing Clockwork Muse (reviews on Amazon are… amazingly thorough) , which is a slog but an interesting slog. Martindale is talking about how the pattern of increasing arousal potential and primordial/stylistic content is self-similar across scales of the individual work to populations and careers.
    • Had a bunch of thoughts about primordial content and the ending of the current dungeon.
    • Last day of working on NOAA. I think there is a better way to add/subtract months here in stackoverflow
    • Finish review of CHI paper. Mention Myanmar and that most fake news sharing is done by a tiny fraction of the users, so finding the heuristics of those users is a critical question. Done!
    • Setting up Fake news on Twitter during the 2016 U.S. presidential election as the next paper in the queue. The references look extensive (69!) and good.
    • TFW you don’t want any fancy modulo in your math confusing you:
      def add_month(year: int, month: int, offset: int) -> [int, int]:
          # print ("original date = {}/{}, offset = {}".format(month, year, offset))
          new_month = month + offset
          new_year = year
      
          while new_month < 1:         new_month += 12         new_year -= 1     while new_month > 12:
              new_month -= 12
              new_year += 1
      
          return new_month, new_year
    • Got a version of the prediction system running on QA. Next week I start something new

 

Phil 1.24.19

7:00 – 4:30 ASRC NASA/PhD

  • Fake news on Twitter during the 2016 U.S. presidential election
    • The spread of fake news on social media became a public concern in the United States after the 2016 presidential election. We examined exposure to and sharing of fake news by registered voters on Twitter and found that engagement with fake news sources was extremely concentrated. Only 1% of individuals accounted for 80% of fake news source exposures, and 0.1% accounted for nearly 80% of fake news sources shared. Individuals most likely to engage with fake news sources were conservative leaning, older, and highly engaged with political news. A cluster of fake news sources shared overlapping audiences on the extreme right, but for people across the political spectrum, most political news exposure still came from mainstream media outlets.
  • One Simple Trick is now live on IEEE!
  • Antibubbles is going well
  • Work on CHI review. Mention this: Less than you think: Prevalence and predictors of fake news dissemination on Facebook
  • Starting to work on the Slack data ingestion and database population. I really want a file dialog to navigate to the Slack folders. StackOverflow suggests tkinter. And lo, it worked just like that:
    import tkinter as tk
    from tkinter import filedialog
    
    root = tk.Tk()
    root.withdraw()
    
    file_path = filedialog.askopenfilename()
  • More beating on the prediction pipeline
    • Load up all the parts of the prediction histories and entries – done
    • Store the raw data in the various prediction tables – done
    • populate PredictedAvailableUDO table – done
    • There’s an error in interpolate that I’m not handling correctly, and I’m too cooked to be able to see it. Tomorrow. interpolatebug

Phil 1.23.19

ASRC NASA 9:00 – 4:30

  • New schema, as of yesterday: diagram
  • Next steps for financial analytics
  • Found a subtle error with creating the actual date from the fiscal date:
    def override_dates(self, year: int, fmonth: int):
        # handle fiscal math converting months that are greater than 12 to the correct fiscal year and month
        self.fiscal_year = year
        if fmonth > 12:
            fmonth = (fmonth % 12) + 1
            self.fiscal_year += 1
        self.fiscal_month = fmonth
    
        # convert the fiscal month and year to actual
        month = fmonth + 2 # convert from US Gov Fiscal to Actual
        self.actual_year = year
        if month > 12:
            month = (month % 12)
            self.actual_year += 1
        self.actual_month = month

    The issue is how the months are handled. The fiscal month is taking an unbounded number and modding it by 12. That produces a range from 0 – 11, so I add one to the result. The actual month is offset by 2 months (The end of the fiscal year is two months before the end of the actual year). So in this case I mod by 12, but don’t have to add the one because it’s working on a range of 1 – 12, not 0 – 11. Anyway, I think it’s fixed now.

Phil 1.22.19

9:00 – 5:00 – ASRC PhD/NASA

  • Google AI proposal is due today! DONE!
  • Next steps for financial analytics
    • Get the historical data to Aaron’s code. Need to look at Pandas’ read_json
    • Get the predictions and intervals back
    • Store the raw data
    • update and insert the lineitems – nope
    • populate PredictedAvailableUDO table
  • Big five personality test (For players and characters) Github