Computational statistics -OR - identity, ego and self-esteem (BUT NOT MINE!)

22 02 2009

My A2 computing project involves downloading stock prices and related news and showing it in a VB6-made executable. Most of the work is actually getting VB to co-operate with filetypes and graphing modules and whatnot, but it does raise some questions (or maybe I just randomly raised them). Mr Barker explained that Charlie Paterson’s algorithm for predicting trends involved inspecting the last five (or some similar number) changes in price and then looking back for a bunch of five similarly-sized consecutive changes and seeing what the sixth change was and then predicting that that sixth change would happen this time around. It sounded quite interesting to me but apparently it was rather unsuccessful. My dad mentioned “trend-following” ones that predict the price will go down if it’s gone down the last n times. The smaller n is, the more “sensitive” the thing is - obviously if n is 1, it’ll just predict the last change which is probably around 50% useful… but the larger n is, the more “behind the trend” you’ll be when you pick it up.

I kind of dream of fitting polynomials to the last 100 data points or something - maybe this would help predict minima and maxima as well? I think someone once mentioned Fourier analysis of the stock market to me, years and years ago… … … I don’t know. Sounds very interesting.

Then I started thinking in very general terms - think about the deterministic universe idea that if you know its initial state, you can predict its whole future. Obviously you wouldn’t expect to be able to predict the entire progress of the stock market from its initial state (!) because not only is it externally-influenced, it’s completely controlled by external forces. Now, if we could model the behaviour of lots and lots of investors… :) :) :)

I’m going to try to have a look at some stats/compsci mashups when I have the change.

The second part of this high-variance post is about some probably useless things that I’ve been thinking about. In a culture of mass consumption (blah blah) perhaps we slide towards defining ourselves through what we buy etc. … perhaps this is unavoidable, but I hope it’s understandable (in some sense). What I’ve been worrying about is the idea of being not just emotionally invested in endeavours and inanimate items (or even other people) but really, really relying on external things for validation. Maybe it’s insane to think you can fuel yourself - maybe that’s a microneurosis of my own, the belief that someone can function alone - but sometimes it seems insane to think that your environment totally controls you and you are just living “in reaction” to the world. I chanced upon the print version of this article, possibly exaggeratedly (I’m not very good at reading between lines etc.) mocking Twitter users’ need for constant attention/validation… its criticisms seem to ring true in some sense… … I suppose everyone who tries to maximise their “connectability” (*cough, shuffle*) is guilty of trying to “feel alive” by connecting to stuff. Is that bad? Possibly.

I think there must be an optimum point between being {selfish, obstinate, unreactive} and {personalityless, fickle, reactive}. Some particularly cool people seem to just settle near this optimum while others like myself flounder in a state of extreme self-consciousness, spewing a narrative of the slightly odd journey as they (I…) go. I’d like to think I’m slowly migrating towards a healthy emotional state - I’m definitely very happy but it feels a little bit fragile, like if I hit my head and was paralysed and couldn’t do any maths or guitar or exercise anymore I would become depressed. I don’t want that kind of mental breakdown to be possible ever.

What of the idea that one’s ego and one’s self-esteem aren’t the same, and that one’s ego is a big rationalisation (”I’m Farhan, I go to a good school, I have {some skills}, I’m a sexy beast” and one’s self-esteem is one’s natural will to survive? In that case, some people will be successful in maintaining their ego and have that at their core and let their self-esteem wither and with good luck will remain happy for their lives and be so confident that they can be happy that they will always somehow manufacture the situation necessary to reinforce their ego and assure them that they are a functioning life-form. I suspect that these people, if confronted by a terrible accident, would “lose it”, so to speak. Because their ego generally works for them and the world has tricked them into believing that “that is the way happiness works”, they never confront the strange damage that has taken place to their self-esteem as a result of the way modern human civilisation plays itself out.

On the other hand, cool mofos who have worked to genuinely improve themselves as people (I don’t mean in a “LOL LERN NEW SKILLZ” but in a “understand what it means to be human and not a robot or an animal or a brick”) and have avoided or got wise to the hidden and never-discussed subtle, indirect and psychological pitfalls of consumerism have their bodies compeltely crippled by fate and respond amazingly well.

I suspect/hope that for the majority of people, this works itself out - as they “mature” they somehow “find themselves”, some later than others. Fun.

So much/many lulz! countable(lulz)?

Pax

EDIT:

The obvious thing of taking the mean change for the last five and extrapolating is probably ill-fated, so I asked my dad about weighting the means so the ones closer are much more important. I thought that was quite nifty. He laughed in my face and suggested that I read up about the tremendous amount of stuff that’s been done and about how complex and, occasionally, effective it was. Interesting…



Approval and optimisation

11 02 2009

Slowly detaching myself from the need to gain approval from others and losing the arbitrary restrictions I have placed on myself is an enjoyable process.

Now, optimisation. Initially I wanted something like “What is the optimum quadratic ax2 + bx + c to model the cubic px3 + qx2 + rx + s on the interval [x0, x1]?” but realised that this was rather ambitious.

I tried a crippled version of this, which was kind of fun. Say I have a function f(x) and want to approximate it with a straight line g(x) = mx on [0, t] (mx because I want g(x) to be strictly of the form m*h(x)… you’ll see why later).

The integral of f(x) - g(x) dx from 0 to t will give, in some sense, the “error” between the two - the distance. Unfortunately, the distance of one line below the other cancels out with the distance of that one above the other. In order to skip out integrals of |f(x)| (…), I’ll go for int[0, t]{(f(x)-g(x))2}dx. The integrand is a quadratic in m, as is the integral. If I call this integral sigma e2 (”sum of infinitesimal square errors” in a handwavy way), … nothing. That naming was pointless. Anyway, I now rewrite the evaluated definite integral by completing the square with respect to m. From this I can see the value m must take to set the newly-created (m - k)2 term to 0 and thus minimise the expression. Thus I have my line y = mx.

I understand that I just botched the explanation, so I’ll give an example with f(x) = sqrt(x).

You can evaluate the integral term by term by multiplying it out (it’s just polynomial in x) but I used The Integrator (I’LL BE BACK!!) to speed this along.

sigma e2 = int[0 to t]{(sqrt[x] - mx)2} = (1/30)t2(10tm2 - 24m.sqrt(t) + 15)

I don’t even need to fully complete the square… just take that 10t outside the bracket: (10/3)t3(m2 - (12/5)m/sqrt(t) + 3/(2t)) and then we know the (m - k)^2 bit is (m - 6/(5sqrt(t)))2 so to zero that term, m = 6/(5sqrt(t))…

…so in conclusion, the line y = 6x/(5sqrt(t)) best approximates y = sqrt(x) on [0, t]. Try it in Autograph. Lulz.

Yes, it’s useless, but it… is something that should work and it… does (?). It highlights the interpretation of the integral as an infinitesimal sum rather than “the area under a graph” or whatever. Eh.

Pax



Self esteem and Computer Science

1 03 2008

I’m quite glad that I’m going to have a chance to talk to a real psychologist about this now. I noticed some years ago that my self esteem (should it be hyphenated?) seemed to be influenced by the outside world but also comprised some other more random elements. It wasn’t really reflected in my mood - I would always feel kind of confrontational and angry as I’d never really felt I’d totally excelled in any respect and would thus feel like I had a fight to pick with everyone. The thing was, I would sometimes feel like I was a rubbish, untalented person and want to one-up the arrogant and unfairly successful people I met and would sometimes feel immensely proud of myself and want to maintain some phantom “good reputation” that I never really had. I was never in the middle - it was a little extreme. I think this is what made me work so hard.

My surviving grandparents are now both declining rapidly, my maternal grandmother’s death remains an interesting event and my general angst about the world is at an all time high, but I now feel stable and, really, quite good. Windmill Lodge told me I had a period of depression between September and sometime in January, which seems to make sense. It feels so much better now - to be able to categorise it and seal it off is a tremendous relief.

It’s a surreal situation - consistently failing to perform well in Mr Motion’s tests and generally failing at Dr Zetie’s top set exercises should really be killing me but actually, I find myself beginning to change in a more fundamental way than any of these surface fluctuations that have plagued me for so long.

Computer Science with AI at Imperial - where my dad went for Mechanical Engineering - looks awesome, but then again everyone I’ve talked to wants me to apply for Cambridge. It’s a nice thought but I wonder what the course is really like. I’m fascinated by problems of optimisation, logic and semantics… but I also like programming. Erroll Wood (probably the only person in our computing class who comes close to really understanding computing as a discipline - James and Vivan program well but I don’t really know what their views on actual computer science are) has expressed concern over the level of practical stuff in the Cambridge course… meh, open days will resolve these quibbles (hopefully).

On that note, Mr Brewis, Dominic Yeo and Mr Motion all gave me blank looks when I mentioned the Simplex algorithm. I mentioned it to Mr Brewis when we were discussing optimising the equilibrium in the Haber Process, Dominic Yeo for fun and Mr Motion to see if he could properly explain it to us (we’re doing matrices right now, so it might’ve been possible).

I feel like I’m the only one in the whole school apart from Dr Zetie who takes any sort of computer science seriously! Vivan confused the bogosort with the bucket sort as Will played with Mr Fry’s sorting demo app in computing. For a few hopeful minutes I really thought he know what the bucket sort was but I soon realised that NO-ONE CARES ABOUT ANY REAL COMPUTER SCIENCE. ALL THEY CARE ABOUT IS SHOWING OFF HOW THEY CAN CHEAT AT GAMES AND PROGRAM STUFF IN VB, ONE OF THE WORST LANGUAGES IN THE UNIVERSE.

It doesn’t matter how much you know about iPods or how authoritative you can sound while quoting Wikipedia! AUGH! Don’t mistake this for a rant, however, as I’m not really complaining about a sudden retardation - more like getting emotional while stating the forgotten situation in all its stupidity.

Oh, I’m also very optimistic about the Public Schools this year. I somehow did well last year and I feel like I’m becoming a much better fencer anyway. Yeah. Optimistic.

I’m reading Brainwashing. Its cover is so tacky that I almost didn’t buy it but I’m so glad I did. It’s RIDICULOUSLY good. It is now among my top books (Simulacra and Simulation, The Psychology of Interpersonal Behaviour, Surely You’re Joking, Mr Feynman? et al [ask Facebook]). Afterwards I need to read The Theory of the Leisure Class. I think The New Turing Omnibus, which is a little textbooky but incidentally contains Conway’s Game of Life as well as Simplex and a load of other pretty great stuff, will probably be up there once I understand it fully. I’m plodding through it. Like a retard on muscle relaxants. Seriously.

Mr Smith alerted me to the correct pronunciation of Proust (”proost”, for phonetically [is this the right word?] retarded people such as myself). I had mentioned it because of (you won’t see this coming) Lain (his madeleines in In Search of Lost Time were used as a metaphor for involuntary memory).

I’ll finish this with a conspicuous ego-boost. I feel immensely happy when I see someone I know giving someone else the finger or calling them fat or even a chode. Elliot and I, in our social ineptness, broke down barriers and behaved oddly until people began to realise that arbitrarily criticising us or trying to be funny to our detriment didn’t work as well as it should and adopted our crap. Even Michael B, someone very, very critical of odd behaviour - someone who would often mock me for trying to be funny in a perceived-to-be-OTT way - was recently seen giving the one-finger[ed]-salute across the atrium.

Poor Mr Rokison still mutters “You’re all so weird/strange” every time he puts his head down in a desperate attempt to renew his self esteem (aha, we’ve come full circle) in front of a class that is no longer captivated by his paradoxical energy or random lapses into making repeated Pingu sounds. It’s refreshing that he mercilessly mocks Will (I’m sure Will finds it funny or he’d assert himself and throw Ollie - sorry, Rokison… sorry, Mr Rokison - to the ground or something). This isn’t a joke, by the way - I’m growing tired of his attitude. Condescension - especially at such a similar age to us - do not help his position at all. I suspect the way this ends will be hilarious.

Imagine turning down a place at Cambridge. My parents and siblings were horrified. That gives me hope - it means they thought I had a real chance of getting a place there. ;)

Pax



Sociopsychopath

29 02 2008

I was recently assessed by some counsellor-type people who decided that they “didn’t want me on their books” - I’m not mentally ill; success!

They were quite flattering overall, telling me my interpersonal skills were “highly developed, if in the wrong direction” (highly developed? Hmm…) and I think I realised during the course of the thing just how much psychology, psychiatry and philosophy I actually knew from reading, despite not reading enough. I felt a pang of bitterness that most of my insights (which have recently turned out to be true in many cases but I shan’t go into this for ego-inflating reasons) are ignored by peers who believe they know better*, I think I am beginning to realise that things are going to fall into place, although they may take a long, long time.

This should be interesting.

From the Wikipedia article on psychosis:

Thomas Szasz focused on the social implications of labelling people as psychotic; a label he argues unjustly medicalises different views of reality so such unorthodox people can be controlled by society. Psychoanalysis has a detailed account of psychosis which differs markedly from Psychiatry. Freud and Lacan outlined their perspective on the structure of psychosis in a number of works.

Pax

* There is definitely such a thing as a mixed state in bipolar disorder, Will, and I’m sure Stephen Fry knows it… :D



Hidden

14 12 2007

This is awesome and this at least gives me an end date for this mania. This seems familiar.

From here:

…it’s possible for a person to have many of the symptoms of mania and yet also suffer from severely depressive thoughts. This is especially the case if the person experiencing mania has insight into what’s happening to them

I’ll be careful what I say, because reality offends, but here: I’m quite angry about fencing because even if I beat someone a lot, they will always think of themselves as better than me. It’s kind of annoying. Fencing is fun but in this school scenario it is not. I will try to do well in the Public Schools this time around.

From last year:

 Rank   Name   First name   School 
 1   BRIGHTMAN   Samuel   LEICESTER GRAMMAR 
 2   SALTER   Michael   WHITGIFT 
 3   HOWES   Anton   WHITGIFT 
 3   PEGGS   Ben   BRADFIELD COLLEGE 
 15   MANNAN   Farhan   ST PAUL’S 
 17   EMERSON   Hugh   ST PAUL’S 
 21   DABSON   Oliver   ST PAUL’S 
 27   WOOLLCOMBE-MORRIS   Alex   ST PAUL’S 
 38   SPRAGG   Elliot   ST PAUL’S 

I suppose I’d better mention that this is the new canyouhearme.wordpress.com…

Pax



Psychonaut

19 11 2007

The things in Lain were probably just meant to be thought about, talked about and forgotten about. Ironically, while having extreme trouble remembering the minutiae of my life, I have no trouble recalling this stuff - stuff that makes me very uneasy. It hadn’t really soaked into my heart before. I’d understood it all from thinking about The Matrix and such but something just happened. I don’t know.

Consider:

Together, these things have taken something from me. It was a delusion of some kind. I WANT IT BACK.

Pax



Update

19 11 2007

There’s been a bit of a lacuna and I don’t think I’ll fill it entirely as others have committed the events I missed to posterity.

I now make a large number of notes on my phone and in Mail. I now retain much more information than I used to - or at least, my computer and phone do, and I am able to retrieve this information.

Themes of personal reality and our inability to accurately perceive the real physical world are endlessly depressing. To quote Eiri Masami:

A memory is merely a record. Thoughts and emotions are but a limited sum derived from this record. Between this mere receptacle we call human form and the truly real world stands an insurmountable wall.

I think I’ll be uploading the text from omnipresence in wired as it’s quite interesting. It seems that Lain contains everything I care about. From the existential stuff to the misanthropy to the genuinely researched computer science (it’s way, way beyond The Matrix intellectually and emotionally. I never thought I’d say something like that)

Despite it being what people tell me is a simple process, I haven’t been able to get Inquisitor to install since upgrading to Leopard. Elliot and I have switched to Opera. It’s awesome.

Some connections sprang up. I Am Legend was brought to my attention by my uncle many years ago and is soon to be a film (I know that there have been repeated films based on it). It features urban decay and loneliness. Good. It feels like the truth is out there - if only I could find someone to explain it to me! How do you check if what you’re doing is the right thing? You can’t just sit and think, because you fudge your mind. There’s no rulebook. You ask other people. Consensus reality!

Suppose I’m a histrionic pathological liar. This combined with a general obsessiveness means I would be prone to interchange reality and fiction in my head. It would often have no consequence but it means I become fixated (Lain). Is there a cure? I think so. I still wonder about HotSauce. I also wonder about how the Lain people knew about computers and information science. Strange. Lain and The Matrix make me worry about secret truths. I think that’s why I try to make everyone watch Lain. I fear that information will be lost forever.

It’s easy to get sick of something and move on… but more dangerous is not getting sick of it. Instead of burning it out during an intense phase of interest, it might haunt you. Lain haunted me for about year before I really knew what it was. Maybe this is partly why it is taking me so long to shake it.

I used to consider myself a good writer and although it’s clear now that I am nothing of the sort, I still have a fondness for my piece of GCSE English coursework about a rather deranged man called Slavik. He met his end choking on a Quorn sandwich. More recently, Enjoy Every Sandwich. Connection! \o/

They should superimpose satnav data onto car windscreens somehow. Augmented reality.

I saw David Gray at the Roundhouse on the 14th. I like him. He’s clever.

Ikea and council flats at night. Kids hanging around some rusting metal railings outside a car park. Sad-looking car that never moves. Secret people locked up in those little houses. Suburban gloom?!

If I were in an attention-seeking, dramatic mood, I’d simply smile with some sort of emotional weight.

Pax



Redo

12 11 2007

I have a large amount to blog about (I’ve even started procrastinating about stuff I enjoy doing…) but I’ve completely changed Psyche. Again.

Here’s the final menu bar design thing:

untitled.png

Pax



Intersect

6 11 2007

I won only one fight during the BYC qualifier (proper results to follow) but Hugh Emerson came 2nd in the U16 sabre and Adam Zethraeus came 2nd 3rd in the U18 sabre (I don’t know how Adam did in the épée but Adam also came 6th in the épée and I’ll link to results later anyway). I felt rather sicktastic afterwards and got quite a bad two-point moving headache which intellectually incapacitated me on Monday and earlier today. This offered me time to re-evaluate something, though…

Going back to Rosebank Avenue, where my grandfather lives and where we lived a long time ago, reminded me of track 9 (or was it the other way round…?). This, predictably, brings me back to The Node. I think I’m going to need to formally define it and strategies for dealing with it if I’m going to be able to continue living.

Here it comes, then:

The Node is an event or concept which I cannot recall but which is somehow linked to many other certain events, concepts or situations in my life. I suspect this because of extreme feelings of déjà vu or nostalgia when confronted with certain events.

Now, what exactly reminds me of it? These are elements common to works of fiction or situations which remind me of …it.

  • Suburban gloom
  • (Old) computers
  • One or many lonely people
  • The telephone system

This brought up some funny stuff:

Places like Rosebank and other locations in Greenford where my family have lived have heavy doses of wires and suburban gloom. Council flats with satellite dishes on also remind me of it… hmm. Durston had those old Macs that felt old even when they were new… and the Macbeath Hall in the Haven Green churchy place evoked a feeling very similar to the suburban gloom feeling (in me, I mean).

This leads to my hypotheses. The questions I must ask are:

  1. What is The Node?
  2. What should I do?

So, possibilities for what The Node is:

  1. It’s simply an exaggerated form of nostalgia for places I used to live or technology I used to use (very likely)
  2. It’s my subconscious trying to give my life a purpose in the absence of any obvious external source of purpose (quite likely)
  3. It’s a repressed memory of something very important (unlikely)

Well, it seems quite clear-cut, doesn’t it? However, I no longer have faith in the truth as a solution. Instead, consider which of these viewpoints it is most advantageous for me to adopt. The first gives me nothing. The second gives me some quirkiness but mostly nothing. The third gives me purpose. Memento, anyone? I’d rather have an artificial purpose than be swallowed by nihilism. I hope I somehow… urgh! I hope this turns out well.

This was Warren Zevon’s final public performance; he died about three months later, I think.

[youtube=http://youtube.com/watch?v=WhRRWwH3Fro]

Isn’t this interesting? Why did they want to call the internet the intergalactic thingy anyway? To think I wouldn’t have known that had it not been for the Lain artbook, I wouldn’t have know that… I really need to research the history of the internet properly. Why didn’t we get taught this?!

Pax



Progredior

2 11 2007

SciCast went reasonably well considering how… uh, basically we had a rather high input:output ratio… =]

Michael (Bali) agreed with me that I was losing my intelligence, citing my random theories which I adopt because “some famous guy wrote them” etc. and I guess he’s right but I think that’s a slightly outdated viewpoint. I am now totally lost - but at least I can’t be criticised as much for trying too hard to justify my own existence/define myself as an individual.

I think I’m going to have to find a happy medium between rationalism and acceptance of the uncertainty that underpins reality. Urgh. I continue to catch solipsism’s eye when it looks around but I don’t think I’ll strike up a conversation just yet. I have to trust that even in the total absence of purpose or meaning, my actions’ consequences are somehow valid. I don’t really know if I can do that, but I have to, right?

Right?

Pax