The HPC cluster is configured on CentOS 6.6 with 252 64bit CPU cores, 1TB aggregated RAM (48GB/node), with 1G Ethernet plus 40-10G QDR Infiniband interconnects. About 5TB of share storage for user data with large 1TB per-node /tmp disk space as scratch space available for local needs. A sets of application softwares are being installed (detail can be found here - incomplete!!!). Following sections show very basic information about using this cluster facility.
| We have setup a google group for discussions [takeout][from][public]. Please send you querries to this mail id. |
How do I connect to HPC?
To connect using a Mac or Linux, open the Terminal application and type:
ssh -Y<EMAIL_ADDRESS># the '-Y' requests that the X11 protocol is tunneled back to you, encrypted inside of ssh.
| Login IP is <IP_ADDRESS> |
Be sure to use the -Y or -X options, if you want to view X11 graphics. Occasionally you may get the error below when you try to log into HPC or among the HPC nodes:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!  Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 31:5f:75:e9:5c:0e:b9:6a:11:e1:7f:98:ee:c2:e8:71. Please contact your system administrator. Add correct host key in /root/.ssh/known_hosts to get rid of this message. Offending key in /root/.ssh/known_hosts:5 Password authentication is disabled to avoid man-in-the-middle attacks. Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks. Agent forwarding is disabled to avoid man-in-the-middle attacks. X11 forwarding is disabled to avoid man-in-the-middle attacks.
The reason for this error is that the computer to which you’re connecting to has changed its identification key (Since you were using IISERM HPC earlier, you might get above connection error). The fix is buried in the error message itself.
Offending key in /root/.ssh/known_hosts:5
Simply edit that file and delete the line referenced. When you log in again, there will be a notification that the key has been added to your known_hosts file. More simply, you can also just delete your ~/.ssh/known_hosts file. The missing connection info will be regenerated when you ssh to new nodes.
| After you log in… |
The default shell (or environment in which you type commands) for your HPC login is bash. I am sure, you’re going to be using HPC for more than a few times, it’s useful to set up a file of aliases to useful commands and then source that file from your ~/.bashrc.
Changing Password
Once you logged into the usernode, you can change password. To change password you must do following
[sjena@usernode ~]$ ssh hpciiserm
It will initiate a login session without any password in the server.
| NEVER change password in usernode, if you do so, it will reset to your old password. |
You should see following prompt like:
[sjena@hpciiserm ~]$ then do [sjena@hpciiserm ~]$ passwd
change your password and exit.
Once you done above procedure, it will take some time at least 90 minutes (automatic) to sync. If you exit from usernode and you want to re-login within this time, your old password should work.
| Once you are logged in to usernode, you don’t need password to login to any computing node as the HPC is like a single computer with several cores available to you. However, password is needed to login from outside to HPC through usernode. HPC is like a single computer with several cores available to you. |
Other Basic Info - coming soon.
On the login node, you shouldn’t do anything too computationally strenuous. If you run something that takes more than an hour or so to complete, you should be running on an interactive node or submit it to one of the batch queues (via qsub batch_script.sh).
Can I compile code?
Yes.
We have the full GNU tool-chain available on both the login nodes so normal compilation tools such as autoconf, automake, libtool, make, gcc, g++, gfortran, gdb, ddd, java, python, perl, etc are available to you. Please let us know if there are other tools or libraries you need that aren’t available.
Compiling your own code
Use gnu-tool chain.
Adding a Package
Adding a package is similar to keeping the executation or your own program. If you keep any executable in your area, it will be accessible in all computenode.
The detail is given here.
Storage & Quota
Disk Space
HPC disk storage is limited and an user quota has been set for all user spaces (/home). All users are given 10GB of user space. There is no notification system to inform you if you exceed the quota limit. When you exced the quota limit you won’t be able to perform write operation i.e. can’t create file or run jobs if you pass the hard quota limit.
| 10GB of user space to keep your codes and important files. To keep large files, outputs of jobs etc., you should use /home/storage1/$USER. |
HPC has about 7TB of storage on to be shared among IISER HPCs users, and the instantaneous needs of those users varies tremendously. We do not use disk quotas on this storage to enforce user limits to allow substantial dynamic storage use. However, if you use hundreds of GB, the onus is on you to clean up your files and decrease that usage as soon as you’re done with it.
| (Very Important) Avoid creating huge number of files in a single directory. It will affect storage performance especially when your job is accessing such directories frequently. This is called Directory Cache Thrashing. |
Scratch Space
If your code accessing large I/O, you should use local scratch space. This is to prevent this network jam, there is a large /tmp directory on each node (writable by all users, but sticky - files written can only be deleted by the user who wrote them or by admin. However, if you use hundreds of GB, the onus is on you to clean up your files and decrease that usage as soon as you’re done with it. (automatic script as regular cleanup will be added if needed).
Monitoring Disk Usage & Quota
Use quota -s command to see your ussage.
sjena@usernode~$ quota -s Disk quotas for user sjena (uid 500): Filesystem blocks quota limit grace files quota limit grace /dev/sda1 7009M 10240M 11264M 21140 58000 60000
This means:
Filesystem = /dev/sda1 : this is your home directory blocks = 7009M : Current data usage is 7009 MB quota = 10240M : Soft quota limit is 10GB limit = 11264M : Hard quota limit is 11GB grace = : if you exceed, it will set a grace period to cleanup files = 21140 : Number of files in your account quota = 58000 : Soft limit for maximum number of files you can create limit = 60000 : Hard limit for maximum number of files you can create
Batch Job & Queues
Job Scheduler
Our cluster is configured with SGE Batch Job Submission tool. The Sun Grid Engine (SGE) queuing system is useful when you have a lot of tasks to execute and want to distribute the tasks over a cluster of machines. It has three basic features
-
Scheduling - allows you to schedule a virtually unlimited amount of work to be performed when resources become available. This means you can simply submit as many tasks (or jobs) as you like and let the queuing system handle executing them all.
-
Load Balancing - automatically distributes tasks across the cluster such that any one node doesn’t get overloaded compared to the rest.
-
Monitoring/Accounting - ability to monitor all submitted jobs and query which cluster nodes they are running on, whether they’re finished, encountered an error, etc. Also allows querying job history to see which tasks were executed on a given date, by a given user, etc.
If you would like to know more, you may prefer to check a plenty of documents available in the web. Let me start with what minimal set of information (mostly taken from web from several sources)
Submitting Jobs
A job in SGE represents a task to be performed on a node in the cluster and contains the command line used to start the task. A job may have specific resource requirements but in general should be agnostic to which node in the cluster it runs on as long as its resource requirements are met.
All jobs require at least one available slot on a node in the cluster to run.
Submitting jobs is done using the qsub command. Let’s try submitting a simple job that runs the hostname command on a given cluster node:
sjena@usernode~$ qsub -V -b y -cwd hostname Your job 1 ("hostname") has been submitted
-
The -V option to qsub states that the job should have the same environment variables as the shell executing qsub (recommended)
-
The -b option to qsub states that the command being executed could be a single binary executable or a bash script. In this case the command hostname is a single binary. This option takes a y or n argument indicating either yes the command is a binary or no it is not a binary.
-
The -cwd option to qsub tells Sun Grid Engine that the job should be executed in the same directory that qsub was called.
-
The last argument to qsub is the command to be executed (hostname in this case)
Notice that the qsub command, when successful, will print the job number to stdout. You can use the job number to monitor the job’s status and progress within the queue as we’ll see in the next section.
| Job submissions are done in a dedicated Node called usernode in our HPCIISERM, executions happen on all compute nodes. You are requested not to execute any job in usernode - node where you login in. If you run manual jobs in usernode, jobs will be killed automatically. Therefore, you [red]# MUST # use SGE commands for job submission, for instance, qsub to submit job. If you use qsub, the submission will be taken care automatically. |
| Never login to hpciiserm as well as NEVER should submit any job in hpciiserm - Jobs will be terminated without notice and the automated script might block the account. |
Monitoring Jobs in the Queue
Now that our job has been submitted, let’s take a look at the job’s status in the queue using the command qstat:
[sjena@usernode ~]$ qstat job-ID prior name user state submit/start at queue slots ja-task-ID ............................................................................... 4001 0.55500 hostname sjena r 03/03/2017 10:16:32<EMAIL_ADDRESS>1 [sjena@usernode ~]$
From this output, we can see that the job is in the r state which is running in node compute-0-0. Once the job has finished, the job will be removed from the queue and will no longer appear in the output of qstat. You should see the job outputs
Outputs
SGE creates stdout and stderr files in the job’s working directory for each job executed. If any additional files are created during a job’s execution, they will also be located in the job’s working directory unless explicitly saved elsewhere (I will discuss later).The job’s stdout and stderr files are named after the job with the extension ending in the job’s number. For the simple job submitted above, we have:
[sjena@usernode ~]$ ls hostname.e4001 hostname.o4001 mpi [sjena@usernode ~]$ cat hostname.e4001 [sjena@usernode ~]$ cat hostname.o4001 compute-0-0.local [sjena@usernode ~]$
Notice that SGE automatically named the job hostname and created two output files: hostname.e4001 and hostname.o4001. The e stands for stderr and the o for stdout. The 4001 at the end of the files’ extension is the job number. So if the job had been named extraordinary_job and was job #47 submitted, the output files would look like: extraordinary_job.e47 extraordinary_job.o47
Deleting a Job
What if a job is stuck in the queue, is taking too long to run, or was simply started with incorrect parameters? You can delete a job from the queue using the qdel command in SGE.  Checking again after few second:
[sjena@usernode mpi]$ qstat job-ID prior name user state submit/start at queue slots ja-task-ID ............................................................................... 4009 0.55500 mpi-ring.q sjena r 03/03/2017 11:24:17<EMAIL_ADDRESS>24
r means Job has started. Send a kill signal by qdel jobid and check the status.
[sjena@usernode mpi]$ qdel 4009 sjena has registered the job 4009 for deletion [sjena@usernode mpi]$ qstat
After running qdel you’ll notice the job is gone from the queue: qstat returns nothing, i.e. qdel has killed the job.
Monitoring Cluster Usage
SGE uses qstat to check the job status. I have submitted 10 jobs, which need 10 core each. I would type qstat and it will show me everything
[sjena@usernode mpi]$ qstat job-ID prior name user state submit/start at queue slots ja-task-ID ................................................................................... 4010 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4011 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4012 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4013 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4014 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4015 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4016 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4017 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4018 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 4019 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02<EMAIL_ADDRESS>10 [sjena@usernode mpi]$
You can also view the average load (load_avg) per node using the ‘-f’ option to qstat:
[sjena@usernode mpi]$ qstat -f queuename qtype resv/used/tot. load_avg arch states<EMAIL_ADDRESS>BIP 0/0/12 0.00 linux-x64<EMAIL_ADDRESS>BIP 0/0/12 0.00 linux-x64<EMAIL_ADDRESS>BIP 0/0/12 0.00 linux-x64<EMAIL_ADDRESS>BIP 0/12/12 0.00 linux-x64 4010 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02 10 4011 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02 2<EMAIL_ADDRESS>BIP 0/12/12 0.00 linux-x64 4011 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02 8 4012 0.55500 mpi-ring.q sjena r 03/03/2017 11:35:02 4<EMAIL_ADDRESS>BIP 0/0/12 0.00 linux-x64<EMAIL_ADDRESS>BIP 0/0/12 0.00 linux-x64 .............................................................................. [sjena@usernode mpi]$
qsub scripts
In the ‘Submitting a Job’ section we submitted a single command hostname. This is useful for simple jobs but for more complex jobs where we need to incorporate some logic we can use a so-called job script. A job script is essentially a bash script that contains some logic and executes any number of external programs/scripts. The shell script that you submit (for example job_name.sh) should be written in bash and should completely describe the job, including where the inputs and outputs are to be written (if not specified, the default is your home directory). The following is a simple shell script that defines bash as the job environment, calls date, waits 20s and then calls it again.
#!/bin/bash # request Bourne shell as shell for job #$ -S /bin/bash # print date and time date # Sleep for 20 seconds sleep 20 # print date and time again date
Note that your script has to include (usually at the end) at least one line that executes something - generally a compiled program but it could also be a Perl or Python script (which could also invoke a number of other programs). Otherwise your SGE job won’t do anything.
And to submit above script job_name.sh, you would do:
[sjena@usernode mpi]$ qsub -V job_name.sh Your job 4048 ("job_name.sh.sh") has been submitted
Using qsub scripts to keep data local
HPC depends on a network-shared /data filesystem. The actual disks are on a network file server node so users are local to the data when they log in. However, when you submit an SGE job, unless otherwise specified, the nodes have to read the data over the network and write it back across the network. This is fine when the total data involved is a few MB, such as is often the case with molecular dynamics runs - small data in, lots of computation, small data out. However, if your jobs involve 100s or 1000s of MB, the network traffic can grind the entire cluster to a halt.
To prevent this network jam, there is a large /tmp directory on each node (writable by all users, but sticky - files written can only be deleted by the user who wrote them or by admin. However, if you use hundreds of GB, the onus is on you to clean up your files and decrease that usage as soon as you’re done with it. (automatic script as regular cleanup will be added if needed).
following is an example script (self explanatory)
#!/bin/bash ################################ # Example to use /tmp space - qsub script # Written for IISER HPC community # Author: S. Jena # Sat Mar 4 14:23:52 IST 2017 ################################ # ###### BEGIN SGE PARAMETERS - note the '#$' prefix ###### ###### DO NOT SET THE -cwd flag for a /tmp job # #$ -S /bin/bash # specify the name of the job displayed in 'qstat' output #$ -N sjena-job # ######## Where to keep Log Output ######### # Make sure you have a directory log in your HOME #$ -o log/ #$ -e log/ ###### BEGIN /tmp DIR CODE ###### # set the STDATA to point to the node-local /tmp dir and make sure you # place the files in your own subdir. '${USER}' is global environment # variable inherited by all your processes, so you shouldn't have to # define it explicitly #JOB_ID get the job number and we keep output in folder with this number COPUT="ANYINDEX${JOB_ID} # change ANYINDEX to anything of your choice STDATA="/tmp/${USER}/"${COPUT} # STDATA - Standard output folder in /tmp ####$HOME is another automatic global variable MYAPP="${HOME}/test/my_executable_bin" # Path to executable FOUTPUTD="${HOME}/test/output" # final output folder (global) # 'mkdir -p' creates all the nec dirs to the final dir specified if # needed and does not complain if it exists already mkdir -p ${STDATA} # creates dir on the local compute node /tmp/user mkdir -p ${FOUTPUTD} # creates the dir in your $HOME - final output cd ${STDATA} # since this job will be done on many nodes, just to check where it runs cd ${STDATA} FILE=`hostname` pwd ${MYAPP} > output.${JOB_ID}.txt # keeping outut into a file with JOB_ID name # Once Done move out the outputs form /tmp directory cd ../ cp -r ${COPUT} ${FOUTPUTD}/. # and clean up your mess on /tmp rm -rf ${COPUT} # clean up the /scratch
In this example all data output will be stored in $HOME/test/output and this is expected to be small output. If it is large output, you must redirect it to the NFS data-space.
Similarly, you can write scripts for parallel jobs.
Parallel Jobs
We have already set the OpenMPI and integrated to SGE. This integration allows Sun Grid Engine to handle assigning hosts to parallel jobs and to properly account for parallel jobs.
OpenMPI Parallel Environment
StarCluster by default sets up a parallel environment, called orte, that has been configured for OpenMPI integration within SGE and has a number of slots equal to the total number of processors in the cluster. You can inspect the SGE parallel environment by running:
[sjena@usernode ~]$ qconf -sp orte pe_name orte slots 9999 user_lists NONE xuser_lists NONE start_proc_args /bin/true stop_proc_args /bin/true allocation_rule $fill_up control_slaves TRUE job_is_first_task FALSE urgency_slots min accounting_summary TRUE [sjena@usernode ~]$
| at this stage we don’t support allocation_rule for round_robin. This is important for those who are using it. This is the default configuration. With this allocation, if a user requests 8 slots and a single machine has 8 slots available, that job will run entirely on one machine. If 5 slots are available on one host and 3 on another, it will take all 5 on that host, and all 3 on the other host. |
Submitting OpenMPI Jobs
The general workflow for running MPI code is: Compile the code using mpi compilers like mpicc.. The produced executable can be used in parallel environment of SGE. It is important that the path to the executable is identical on all nodes for mpirun to correctly launch your parallel code. The easiest approach is to copy the executable somewhere under /home/user on the usernode since /home/user is NFS-shared across all nodes in the cluster.
Run the code on X number of machines using:
$ mpirun -np X -hostfile myhostfile ./mpi-executable arg1 arg2 [...]
where the hostfile looks something like:
$ cat /path/to/hostfile compute-0-0 slots=4 compute-0-1 slots=4 compute-0-11 slots=4 compute-0-12 slots=4 compute-0-13 slots=4
However, when using an SGE parallel environment with OpenMPI you no longer have to specify the -np, -hostfile, -host, etc. options to mpirun. This is because SGE will automatically assign hosts and processors to be used by OpenMPI for your job. You also do not need to pass the -byslot and -bynode options to mpirun given that these mechanisms are now handled by the fill_up and round_robin modes specified in the SGE parallel environment.
Instead of using the above formulation create a simple job script that contains a very simplified mpirun call:
$ cat myjobscript.sh mpirun /path/to/mpi-executable arg1 arg2 [...]
Then submit the job using the qsub command and the orte parallel environment automatically configured for you by StarCluster:
$ qsub -pe orte 24 ./myjobscript.sh
The -pe option species which parallel environment to use and how many slots to request. The above example requests 24 slots (or processors) using the orte parallel environment. The parallel environment automatically takes care of distributing the MPI job amongst the SGE nodes using the allocation_rule defined in the environment’s settings.
| If you believe I have made some mistake, or the new implimentation needs more clarification, let me know. |
Installation of New Software/Packages
There are several softwares/packages are installed (open source) centrally and the list is available here.
On contrary, it is also possible to install application/software by user into their own area. Once a user compiles and install, the binary will be automatically available in every compute-node. In case of software with large (>2GB) size, user may request to sysad to install the application/software centrally (follow point 2).
| (1): There might be a situation where an user wants to install a package which is purchased by him/her: install it in your own area. Please note that, it will be the responsibility of respective user to take care the licensing and authorizations. |
| (2): Central installation (open-source package): user may request to install it centrally. In this case, user should provide us the detail of software (like sources, web links etc.), the dependencies, pre-requisites and compilation procedure. In some occasion, sysad may ask the concerned user to assist installation. |
| (3): Central installation (licenced package): The licencing should be of cluster type or group-licence type. user should provide info as above and provide the licencing process (may help to secure lincence). |
Author’s Note
This document is very naive and under continuous change depending on the requests we recieve. It is being written from the information available with me and from several sources available on internet. So, Do not hesitate to contact us.
By S. Jena
Document version: V1.1.1 12/06/2017
Document version: V1.1.0 23/03/2017
Document version: V1.0.2 16/03/2017
Document version: V1.0.1 04/03/2017


Ferrari reveals polished and powerful mid-engine coupe in Rome
ROME, Nov 14 — Though a hardtop version of the Portofino has been expected since the convertible was announced in 2017, Ferrari went ahead and used this opportunity as a chance to do more than add a permanent roof: the model got a new name and a new body style.
Yesterday, Ferrari unveiled the Roma — “La Nuova Dolce Vita” — during a private event held in Rome, the perfect place to reveal a model inspired by Italy’s capital city.
Though Roma serves as a hardtop version of the Portofino convertible announced back in 2017, the company describes this coupe as having a “timeless design” that models “the carefree, pleasurable way of life that characterised Rome in the 1950s and ‘60s.”
To embody this essence, the body was restyled when compared with its drop-top counterpart with smooth contours (“all superfluous detailing has been removed”), a front end that angles more sharply to the ground, and a fastback rear, all executed in a way that is contemporary but can be found on sports cars from the past 70 years.
The power that the Roma delivers matches its modern flair. The engine is a turbo charged V8 (the same found in the Portofino) which puts out over 600 hp, allowing the car to sprint from 0 mph to 62 mph in 3.4 seconds.
The interior was designed to put the driver in control of their experience. The cabin body panels wrap in such a way that the driver and the passenger sit in individual cells with functional elements being distributed throughout each side of the cockpit.
This model is the final one the company will announce this year.
Ferrari is expected to reveal availability and pricing information soon. — AFP-Relaxnews


Below is table that lists some math classes and some details about those classes.
| Math Class | Subjects Covered | Difficulty |
|---|---|---|
| Algebra | Equation solving, single variables, double variables | Easy |
| Geometry | Shape properties, theorems, distances | Medium |
| Calculus | Integrals, derivatives, three-dimensional objects | Hard |


General Election 2019: The wives of two former Tory MPs stand in their seats
by Catherine NeilanThe wives of two former Conservative MPs are standing in their respective husbands’ seats, following allegations of sexual misconduct against both men.
Andrew Griffiths, who once served as Theresa May’s chief of staff in No 10, stepped aside last night, having narrowly survived an attempt to block him as the candidate for the seat of Burton and Uttoxeter.
He is backing his wife Kate Griffiths who went on to win the selection for the seat.
Griffiths had the Tory whip removed in July last year and resigned as the minister for small business after it emerged he had sent more than 2,000 explicit messages to two women.
He had the whip reinstated in December last year, and was cleared of wrongdoing.
On Monday local members split the vote on whether or not to keep him as their candidate, forcing him to face a second vote on Tuesday. Instead, he decided to stand down.
Last week former Dover and Deal MP Charlie Elphicke was replaced as the Conservative parliamentary candidate by his wife Natalie.
Elphicke lost the Tory whip in 2017 when allegations of sexual assault – which he denies – were referred to the police.
Elphicke, who has represented the Kent seat since 2010, was readmitted to the party last December ahead of a key vote under Theresa May.
He was then suspended again when he was charged in July this year with three sexual assaults; all of which he denies.
Separately, a former MP who lost his seat following a conviction for a false expenses claim has quit after briefly becoming the Conservative candidate for Ynys Mon.
Chris Davies pulled out after other Welsh Tories criticised his selection.
“I will not want to put my wife and family through any more distress,” the former Brecon and Radnorshire MP said.
Deputy leader of the Welsh Liberal Democrats Christine Humphreys said his selection “demonstrated the [Conservatives’] utter contempt for the voters of Ynys Môn”.
“This shows they can offer nothing more than an MP who has admitted to providing false information about his expenses claims.”
Main image: Getty


--- layout: page title: About header-img: "img/about-bg.png" ---
I am a copywriter and former high school teacher at the start of a lifelong pursuit of mastering software development and using it to help create positive change. I have a strong interest in new technologies and their power to shape the future. The purpose of this blog is to probe at my evolution as a coder as it unfolds, hopefully revealing some insights into the relationship between my coding education, my goals as a developer, and what I ultimately produce.


method index without paramaters (get index)
method index with paramater '4' (set index by number)
method value without paramaters (get value)
method value with paramater 'Medium' (set value by string)
method value with paramater '4' (passed as number)
method value with paramater '11' (passed as string)
method value with paramater 'test123' (not existing value)
"default popup" Style
Select a Speed:
Slower
Slow
Medium
Fast
Faster
Up to eleven


Connect is an extensible HTTP server framework for node using "plugins" known as middleware.
var connect = require('connect')
var http = require('http')
var app = connect()
// gzip/deflate outgoing responses
var compression = require('compression')
app.use(compression())
// store session state in browser cookie
var cookieSession = require('cookie-session')
app.use(cookieSession({
keys: ['secret1', 'secret2']
}))
// parse urlencoded request bodies into req.body
var bodyParser = require('body-parser')
app.use(bodyParser.urlencoded())
// respond to all requests
app.use(function(req, res){
res.end('Hello from Connect!\n');
})
//create node.js http server and listen on port
http.createServer(app).listen(3000)
Connect is a simple framework to glue together various "middleware" to handle requests.
$ npm install connect
The main component is a Connect "app". This will store all the middleware
added and is, itself, a function.
var app = connect();
The core of Connect is "using" middleware. Middleware are added as a "stack"
where incoming requests will execute each middleware one-by-one until a middleware
does not call next()
within it.
app.use(function middleware1(req, res, next) {
// middleware 1
next();
});
app.use(function middleware2(req, res, next) {
// middleware 2
next();
});
The .use()
method also takes an optional path string that is matched against
the beginning of the incoming request URL. This allows for basic routing.
app.use('/foo', function fooMiddleware(req, res, next) {
// req.url starts with "/foo"
next();
});
app.use('/bar', function barMiddleware(req, res, next) {
// req.url starts with "/bar"
next();
});
There are special cases of "error-handling" middleware. There are middleware
where the function takes exactly 4 arguments. Errors that occur in the middleware
added before the error middleware will invoke this middleware when errors occur.
app.use(function onerror(err, req, res, next) {
// an error occurred!
});
The last step is to actually use the Connect app in a server. The .listen()
method
is a convenience to start a HTTP server.
var server = app.listen(port);
The app itself is really just a function with three arguments, so it can also be handed
to .createServer()
in Node.js.
var server = http.createServer(app);
These middleware and libraries are officially supported by the Connect/Express team:
bodyParser
, json
, and urlencoded
. You may also be interested in:
compress
timeout
cookieParser
cookieSession
csrf
error-handler
session
method-override
logger
response-time
favicon
directory
static
vhost
Most of these are exact ports of their Connect 2.x equivalents. The primary exception is cookie-session
.
Some middleware previously included with Connect are no longer supported by the Connect/Express team, are replaced by an alternative module, or should be superseded by a better module. Use one of these alternatives instead:
cookieParser
limit
multipart
query
staticCache
Checkout http-framework for many other compatible middleware!
npm install
npm test
https://github.com/senchalabs/connect/graphs/contributors
< 1.x
- node 0.2
1.x
- node 0.4
< 2.8
- node 0.6
>= 2.8 < 3
- node 0.8
>= 3
- node 0.10
, 0.12
; io.js 1.x
, 2.x


About Me Experienced Managing Trustee with a demonstrated history of working in the education management industry. Skilled in Strategic and Business Planning, Analytical Skills, Coaching, Entrepreneurship, and Team Building. Strong business development professional with a MBA, Texas A&M-Commerce, USA and MSc in Software Engineering, University of Westminster, UK.


Premier League title already out of Manchester United's reach, Solskjær admits – video
Manchester United manager Ole Gunnar Solskjær admits the Premier League title is out of the club’s reach this season as his rebuilding project at Old Trafford continues.
‘We’re too far behind the top teams,’ he said. ‘We need to improve our league form, definitely.’
United are in 10th place with 13 points from 11 games this season, already 18 behind leaders Liverpool. They face Brighton at home on Sunday with just one victory in their last six league games.


Chalk and Sawdust Powerlifting Gym is training facility focusing on the principles of powerlifting to help people of all abilities and age ranges improve their strength and fitness. Powerlifting is an individual sport combining 3 disciplines; the squat, the bench press and the deadlift. Chalk and Sawdust Powerlifting Gym provides the equipment, the environment and the knowledge required to excel in these disciplines and become the best lifter you can be.
A wide range of strength and cardio equipment
Knowledgeable personal training to help you acheive your goals
Regular gym competitions to give you a goal to focus your training towards


The Shri Ram School, Moulsari Campus is proud to present ShriTeq, the only technology symposium of its kind. Built on the success of three previous iterations, ShriTeq 2017 is on a larger and grander stage than ever before. ShriTeq consists of four events: the Technology Quiz, the Hackathon, Scratch Animation, and our moviemaking event, Lights, Camera, Action! Our flagship event, the Technology Quiz hosted by tech guru Rajiv Makhni is North India’s largest tech quiz at the school level. Participants in the Hackathon will be challenged to innovate and create high-quality products by harnessing the power of technology, while the creative events will challenge participants to combine creativity and technical skill to intertwine art and technology. Featuring over 25 prestigious schools of the Delhi-NCR, ShriTeq promises to be the experience of a lifetime.
Class 5
1 Team per school
3 Participants in a team
Class 5
1 Team per school
3 Participants in a team
Class 5
1 Team per school
2 Participants per team
Classes 6-8
1 Team per school
3 Participants in a team
Classes 9-12
1 Team per school
3 Participants in a team
Classes 9-12
1 Team per school
5 Participants in a team
The event will be spread over 2 days.
Login details will be shared on the 7th of October.


19 July 1996
Disease Outbreak Reported
As of 4 July a total of 12 374 cases with 1193 deaths had been reported since the beginning of the outbreak. Two more states, Taraba and Yobe, have now reported cases.
A total of 11 139 cases with 1 165 deaths have been reported since the beginning of the outbreak. The largest numbers of cases are reported from Kano, Kebbi, Borno, Oyo and Niger States. WHO is in the process of organizing supplies and aid which are urgently needed to assist in the control of this epidemic.
Other countries in Africa reporting cholera in the last week: Chad, Niger, United Republic of Tanzania.


UISelectable¶
The UISelectable module.
op_Equality¶
-
UnityEngineUISelectable.
__op_Equality__UnityEngineObject_UnityEngineObject__SystemBoolean
(UnityEngine.Object UnityEngine.Object)¶
outputs: unnamed (Boolean
)
flow: none
Selectable Equals¶
-
UnityEngineUISelectable.
__Equals__SystemObject__SystemBoolean
(UnityEngine.UI.Selectable instanceSystem.Object other)¶
outputs: unnamed (Boolean
)
flow: none
Selectable FindSelectable¶
-
UnityEngineUISelectable.
__FindSelectable__UnityEngineVector3__UnityEngineUISelectable
(UnityEngine.UI.Selectable instanceUnityEngine.Vector3 dir)¶
outputs: unnamed (Selectable
)
flow: none
Selectable FindSelectableOnDown¶
-
UnityEngineUISelectable.
__FindSelectableOnDown__UnityEngineUISelectable
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Selectable
)
flow: none
Selectable FindSelectableOnLeft¶
-
UnityEngineUISelectable.
__FindSelectableOnLeft__UnityEngineUISelectable
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Selectable
)
flow: none
Selectable FindSelectableOnRight¶
-
UnityEngineUISelectable.
__FindSelectableOnRight__UnityEngineUISelectable
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Selectable
)
flow: none
Selectable FindSelectableOnUp¶
-
UnityEngineUISelectable.
__FindSelectableOnUp__UnityEngineUISelectable
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Selectable
)
flow: none
Selectable get_animationTriggers¶
-
UnityEngineUISelectable.
__get_animationTriggers__UnityEngineUIAnimationTriggers
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (AnimationTriggers
)
flow: none
Selectable get_animator¶
-
UnityEngineUISelectable.
__get_animator__UnityEngineAnimator
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Animator
)
flow: none
Selectable get_colors¶
-
UnityEngineUISelectable.
__get_colors__UnityEngineUIColorBlock
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (ColorBlock
)
flow: none
Selectable get_enabled¶
-
UnityEngineUISelectable.
__get_enabled__SystemBoolean
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Boolean
)
flow: none
Selectable get_gameObject¶
-
UnityEngineUISelectable.
__get_gameObject__UnityEngineGameObject
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (GameObject
)
flow: none
Selectable get_image¶
-
UnityEngineUISelectable.
__get_image__UnityEngineUIImage
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Image
)
flow: none
Selectable get_interactable¶
-
UnityEngineUISelectable.
__get_interactable__SystemBoolean
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Boolean
)
flow: none
Selectable get_name¶
-
UnityEngineUISelectable.
__get_name__SystemString
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (String
)
flow: none
Selectable get_spriteState¶
-
UnityEngineUISelectable.
__get_spriteState__UnityEngineUISpriteState
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (SpriteState
)
flow: none
Selectable get_targetGraphic¶
-
UnityEngineUISelectable.
__get_targetGraphic__UnityEngineUIGraphic
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Graphic
)
flow: none
Selectable get_transform¶
-
UnityEngineUISelectable.
__get_transform__UnityEngineTransform
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Transform
)
flow: none
Selectable get_transition¶
-
UnityEngineUISelectable.
__get_transition__UnityEngineUISelectableTransition
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Transition
)
flow: none
Selectable GetComponent¶
-
UnityEngineUISelectable.
__GetComponent__SystemType__UnityEngineComponent
(UnityEngine.UI.Selectable instanceSystem.Type type)¶
outputs: unnamed (Component
)
flow: none
Selectable GetComponentInChildren¶
-
UnityEngineUISelectable.
__GetComponentInChildren__SystemBoolean__T
(UnityEngine.UI.Selectable instanceSystem.Boolean includeInactiveSystem.Type type)¶
outputs: T (Object
)
flow: none
Selectable GetComponentInParent¶
-
UnityEngineUISelectable.
__GetComponentInParent__SystemType__UnityEngineComponent
(UnityEngine.UI.Selectable instanceSystem.Type t)¶
outputs: unnamed (Component
)
flow: none
Selectable GetComponents¶
-
UnityEngineUISelectable.
__GetComponents__ListT__SystemVoid
(UnityEngine.UI.Selectable instanceSystem.Collections.Generic.List`1[UnityEngine.Object] results)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable GetComponentsInChildren¶
-
UnityEngineUISelectable.
__GetComponentsInChildren__SystemBoolean_ListT__SystemVoid
(UnityEngine.UI.Selectable instanceSystem.Boolean includeInactiveSystem.Collections.Generic.List`1[UnityEngine.Object] result)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable GetComponentsInParent¶
-
UnityEngineUISelectable.
__GetComponentsInParent__SystemBoolean_ListT__SystemVoid
(UnityEngine.UI.Selectable instanceSystem.Boolean includeInactiveSystem.Collections.Generic.List`1[UnityEngine.Object] results)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable GetHashCode¶
-
UnityEngineUISelectable.
__GetHashCode__SystemInt32
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Int32
)
flow: none
Selectable GetInstanceID¶
-
UnityEngineUISelectable.
__GetInstanceID__SystemInt32
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Int32
)
flow: none
Selectable GetType¶
-
UnityEngineUISelectable.
__GetType__SystemType
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Type
)
flow: none
op_Implicit¶
-
UnityEngineUISelectable.
__op_Implicit__UnityEngineObject__SystemBoolean
(UnityEngine.Object)¶
outputs: unnamed (Boolean
)
flow: none
op_Inequality¶
-
UnityEngineUISelectable.
__op_Inequality__UnityEngineObject_UnityEngineObject__SystemBoolean
(UnityEngine.Object UnityEngine.Object)¶
outputs: unnamed (Boolean
)
flow: none
Selectable IsActive¶
-
UnityEngineUISelectable.
__IsActive__SystemBoolean
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Boolean
)
flow: none
Selectable IsDestroyed¶
-
UnityEngineUISelectable.
__IsDestroyed__SystemBoolean
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Boolean
)
flow: none
Selectable IsInteractable¶
-
UnityEngineUISelectable.
__IsInteractable__SystemBoolean
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (Boolean
)
flow: none
Selectable OnDeselect¶
-
UnityEngineUISelectable.
__OnDeselect__UnityEngineEventSystemsBaseEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.BaseEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable OnMove¶
-
UnityEngineUISelectable.
__OnMove__UnityEngineEventSystemsAxisEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.AxisEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable OnPointerDown¶
-
UnityEngineUISelectable.
__OnPointerDown__UnityEngineEventSystemsPointerEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.PointerEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable OnPointerEnter¶
-
UnityEngineUISelectable.
__OnPointerEnter__UnityEngineEventSystemsPointerEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.PointerEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable OnPointerExit¶
-
UnityEngineUISelectable.
__OnPointerExit__UnityEngineEventSystemsPointerEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.PointerEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable OnPointerUp¶
-
UnityEngineUISelectable.
__OnPointerUp__UnityEngineEventSystemsPointerEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.PointerEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable OnSelect¶
-
UnityEngineUISelectable.
__OnSelect__UnityEngineEventSystemsBaseEventData__SystemVoid
(UnityEngine.UI.Selectable instanceUnityEngine.EventSystems.BaseEventData eventData)¶
outputs: none
flow inputs: unnamed
flow outputs: unnamed
Selectable Select¶
-
UnityEngineUISelectable.

__ToString__SystemString
(UnityEngine.UI.Selectable instance)¶
outputs: unnamed (String
)
flow: none


This article is about a review of the paper [1], and is the second part of a personal research project to utilize the use of Graph Neural Network to the field of cascading outage prediction or detection.
I plan to utilize the model architecture used in this paper for cascading outage prediction.
1. INTRODUCTION
1.1. What is the problem?
Transportation plays a vital role in everybody’s daily life. According to a survey in 2015, U.S. drivers spend about 48 minutes on average behind the wheel daily [2]. Under this circumstance, an accurate real-time forecast of traffic conditions is of paramount importance for road users, private sectors, and governments.
There were many efforts to monitor the current status of traffic conditions and to predict the future. These studies aimed to contribute to widely used transportation services, such as flow control, route planning, and navigation.
1.2. History of previous approaches
Previous studies on traffic prediction can be roughly divided into two categories: Dynamical modeling and Data-driven methods.
Many researchers are shifting their attention to data-driven approaches, since dynamical modeling methods have drawbacks as follow. 😡
- It requires sophisticated systematic programming.
- It consumes massive computational power.
- Impractical assumptions and simplifications among the modeling degrade the prediction accuracy.
As a result, Deep learning approaches, which are major representatives of data-driven approaches, have been widely and successfully applied to various traffic tasks. Significant progress has been made in following works. 😁
- Deep belief network (DBN) [3]
- Stacked auto-encoder (SAE) [4]
However, it is difficult for these dense networks to extract spatial and temporal features from the input jointly. 😡
To take full advantage of spatial features, some researchers use convolutional neural network (CNN) to capture adjacent relations among the traffic network, along with employing recurrent neural network (RNN) on time axis. 😁
However, this approach has limitations as follow. 😡
- The normal convolutional operation applied restricts the model to only process grid structures (e.g. images, videos) rather than general domains.
- Rrecurrent networks for sequence learning require iterative training, which introduces error accumulation by steps.
- RNN-based networks are widely known to be difficult to train and computationally heavy.
1.3. Proposed Approach
For overcoming the limitations of previous approaches, the author introduces several strategies to effectively model temporal dynamics and spatial dependencies of traffic flow. 😁
- To fully utilize spatial information, the author models the traffic network by a general graph instead of treating it separately (e.g. grids or segments).
- To handle the inherent deficiencies of recurrent networks, the author employs a fully convolutional structure on time axis.
Above all, the author proposes a novel deep learning architecture, the spatio-temporal graph convolutional networks (STGCN), for traffic forecasting tasks. 🤘
Q. IS THERE ANY DRAWBACK IN STGCN???
A.
2. PRELIMINARY
2.1. Traffic Prediction on Road Graphs
Traffic forecast as a typical time-series prediction problem
Predicting the most likely traffic measurements (e.g. speed or traffic flow) in the next $H$ time steps given the previous $M$ traffic observations as,
\[\hat{v}_{t+1}, ..., \hat{v}_{t+H} = \underset{v_{t+1}, ..., v_{t+H}}{\mathrm{argmax}}\log{P(v_{t+1}, ..., v_{t+H} | v_{t-M+1}, ..., v_{t})} \tag{1}\]where $v_t \in \mathbb{R}^{n}$ is an observation vector of $n$ road segments at time step $t$, each element of which records historical observation for a single road segment.
Graph structured traffic time series problem
In this work, the author defines the traffic network on a graph and focuses on structured traffic time series. The traffic network is represented as an undirected graph (or directed one) $\mathcal{G_t}$ with weights $w_{ij}$ as shown in Figure 1.
At the $t$-th time step, in graph $\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}, W)$,
- $\mathcal{V}_t$ is a finite set of vertices, corresponding to the observations from $n$ monitor stations at time $t$.
- $\mathcal{E}$ is a set of edges, indicating the connectedness between stations.
- $W \in \mathbb{R}^{n \times n}$ denotes the weighted adjacency matrix of $\mathcal{G}_t$.
Q. DOES EDGES CAN HAVE ITS OWN TIME VARIANT VARIABLES???
(e.g. temperature of transmission lines in power system)
A.
2.2. Convolutions on Graphs
In this paper, the author introduces the notion of graph convolution operator “$*\mathcal{G}$” based on the conception of spectral filtering [7, 8].
\[\begin{aligned} y & = \Theta *\mathcal{G} x \\& = \Theta (L) x \\& = \Theta (U \Lambda U^T) x \\&= U \Theta (\Lambda) U^T x \end{aligned} \tag{2}\]where
- $x \in \mathbb{R}^{n}$ is a graph signal as an input (data from each vertex).
- $y \in \mathbb{R}^{n}$ is filtered signal as an output.
- $\Theta(\cdot)$ is a kernel (characteristic of the filter).
- $U = [u_0, …, u_{n-1}] \in \mathbb{R}^{n\times n}$, Graph Fourier basis, is the matrix of eigenvectors of the normalized graph Laplacian $L$.
- $\Lambda =diag([\lambda_0, …, \lambda_{n-1}]) \in \mathbb{R}^{n\times n}$ is the matrix of eigenvalues of the normalized graph Laplacian $L$.
(check details of Laplacian matrix in appendix 7.1)
As a result, a graph signal $x$ is filtered by a kernel $\Theta$ can be defined with multiplication between $\Theta$ and graph Fourier transform $U^T x$ [7].
(check details of graph Fourier transform in appendix 7.2)
In addition, due to its matrix multiplication, the computational complexity of graph convolution is $\mathcal{O}(n^2)$.
Q. WHY “NORMALIZED” L???
A.
3. PROPOSED MODEL
3.1. Network Architecture
The author proposed a model architecture called spatio-temporal graph convolutional networks (STGCN). As shown in Figure 2, STGCN is composed of several spatio-temporal convolutional blocks. Each spatio-temporal convolutional blocks is formed as a “sandwich” structure with two gated sequential convolution layers and one spatial graph convolution layer in between.
3.2. Graphs CNNs for Extracting Spatial Features
The traffic network generally organizes as a graph structure. Since 2-D convolutions on grids can only capture the spatial locality, attributes of traffic networks (graph structured data) were not fully extracted by 2-D convolution filters.
Accordingly, in STGCN, the graph convolution is employed directly on graph-structured data to extract highly meaningful patterns and features in the space domain.
However, there are two issues of the graph convolution expressed in Eq. (2). 😡
- The kernel is not localized in space yet.
- The computation of kernel $\Theta$ in graph convolution by Eq. (2) can be expensive due to $\mathcal{O}(n^2)$ multiplications with graph Fourier basis.
The authors applied two approximation strategies to overcome these issues. 😁
Chebyshev Polynomials Approximation
Chebyshev polynomial $T_k(x)$ is used to approximate kernels as a truncated expansion of order $K-1$ as follows.
\[\begin{aligned}\Theta (\Lambda) & = \sum_{k=0}^{K-1} \theta_k \Lambda^k \\ &\approx \sum_{k=0}^{K-1} \theta_k T_k(\tilde{\Lambda})\end{aligned}\]where
- $\tilde{\Lambda} = 2 \frac{\Lambda}{\lambda_{max}}-I_n$ ($\lambda_{max}$ denotes the largest eigenvalues of $L$).
- $\theta \in \mathbb{R}^{n}$ is a vector of polynomial coefficient.
(check details of Chebyshev polynomials approximation in appendix 7.3)
Using the Chebyshev polynomials approximation, the graph convolution can then be rewritten as,
\[\begin{aligned} \Theta*\mathcal{G}x &= \Theta(L)x \\ &\approx \sum_{k=0}^{K-1} \theta_k T_k(\tilde{L})x \end{aligned} \tag{3}\]where
- $T_k(\tilde{L})\in\mathbb{R}^{n\times n}$ is the Chebyshev polynomial of order $k$
- $\tilde{L} \in \mathbb{R}^{n \times n}$ the scaled Laplacian $\tilde{L} = 2\frac{L}{\lambda_{max}} - I_n$.
As a result, we can localize the filter by restricting kernel $\Theta$ to a polynomial of order $k$.
Moreover, by recursively computing $K$ convolutions through the polynomial approximation, the cost of Eq. (2) can be reduced to $\mathcal{O}(K|\mathcal{E}|)$ as Eq. (3) shows [8].
(check details of localizing convolution filters in appendix 7.4)
Q. RESCALED??? WHY???
A. It makes eigenvalues in the range [-1, 1] to prepare for the recursive computation.
Q. WHY |E| IN COMPUTAIONAL COMPLEXITY???
A.
1st-order Approximation
A layer-wise linear formulation can be defined by stacking multiple localized graph convolutional layers with the first-order approximation of graph Laplacian [9].
Due to the scaling and normalization in neural networks, we can further assume that $\lambda_{max} \approx 2$.
Q. THE SCALING AND NORMALIZATION IN NEURAL NETS???
A.
Thus, the Eq. (3) can be simplified to,
\[\begin{aligned} \Theta*\mathcal{G}x & \approx \theta_0x + \theta_1(\frac{2}{\lambda_{max}}L-I_n)x \\ &\approx \theta_0x - \theta_1(D^{-1/2}WD^{-1/2})x \end{aligned} \tag{4}\]where $\theta_0$, $\theta_1$ are two shared parameters of the kernel.
In order to constrain parameters and stabilize numerical performances, $\theta_0$ and $\theta_1$ are replaced by a single parameter $\theta$ by letting $\theta = \theta_0 = -\theta_1$.
Then, the graph convolution can be alternatively expressed as,
\[\begin{aligned} \Theta*\mathcal{G}x &= \theta(I_n + D^{-1/2}WD^{-1/2})x \\&= \theta(\tilde{D}^{-1/2}\tilde{W}\tilde{D}^{-1/2})x \end{aligned} \tag{5}\]where
- $W$ is renormalized by $\tilde{W} = W + I_n$
- $D$ is renormalized by $\tilde{D_{ii}} = \sum_j{\tilde{W}_{ij}}$.
The authors stack the 1st-order approximation $K$ layers vertically. In this scenario, $K$ is the number of successive filtering operations, and the stack achieves the similar effect as $K$-localized convolutions do horizontally.
Additionally, the layer-wise linear structure is parameter-economic and highly efficient for large-scale graphs, since the order of the approximation is limited to one.
(check details of localizing convolution filters in appendix 7.4)
Generalization of Graph Convolutions
The graph convolution operator “$*\mathcal{G}$” defined on $x \in \mathbb{R}^n$ can be extended to multi-dimensional tensors.
For a signal $C_i$ channels $X \in \mathbb{R}^{n \times C_i}$, the graph convolution can be generalized by,
\[y_i = \sum_{i=1}^{C_i} \Theta_{ij}(L)x_i \in \mathbb{R}^n, 1 \leq j \leq C_o \tag{6}\]with the $C_i \times C_o$ vectors of Chebyshev coefficients $\Theta_{ij} \in \mathbb{R}^K$ ($C_i$, $C_o$ are the size of input and output of the feature maps, respectively).
The graph convolution for 2-D variables is denoted as “$\Theta *\mathcal{G}X$” with $\Theta \in \mathbb{R}^{K \times C_i \times C_o}$.
3.3. Gated CNNs for Extracting Temporal Features
RNNs for traffic prediction still suffer from following. 😡
- time-consuming iterations
- complex gate mechanisms
- slow response to dynamic changes.
On the contrary, CNNs have the superiority as follows. 😁
- fast training
- simple structures
- no dependency constraints to previous steps.
The authors employ entire convolutional structures on time axis to capture temporal dynamic behaviors of traffic flows.
This specific design allows parallel and controllable training procedures through multi-layer convolutional structures formed as hierarchical representations.
For each node in graph $\mathcal{G}$, the temporal convolution explores $K_t$ neighbors of input elements without padding which leading to shorten the length of sequences by $K_{t}-1$ each time. Thus, input of temporal convolution for each node can be regarded as a length-$M$ sequence with $C_i$ channels as $Y \in \mathbb{R}^{M \times C_i}$.
The convolution kernel $\Gamma \in \mathbb{R}^{K_t \times C_i \times 2C_o}$ is designed to map the input $Y$ to a single output element $[P : Q] \in \mathbb{R}^{(M-K_t+1) \times (2C_o)}$ ($P, Q$ is split in half with the same size of channels).
As a result, the temporal gated convolution can be defined as,
\[\Gamma * \tau Y=P \odot \sigma (Q) \in \mathbb{R}^{(M-K_t+1) \times C_o} \tag{7}\]where
- $P, Q$ are input of gates in GLU respectively
- $\odot$ denotes the element-wise Hadamard product.
- $\sigma$ is sigmoid gate controls which input $P$ of the current states are relevant for discovering compositional structure and dynamic variances in time series.
Q. WHY GLU, NOT ReLU OR SOMETHING ELSE???
A.
The non-linearity gates contribute to the exploiting of the full input filed through stacked temporal layers as well. Furthermore, residual connections are implemented among stacked temporal convolutional layers. Similarly, the temporal convolution can also be generalized to 3-D variables by employing the same convolution kernel $\Gamma$ to every node $\mathcal{Y}_i \in \mathbb{R}^{M \times C_i}$ (e.g. sensor stations) in $\mathcal{G}$ equally, noted as “$\Gamma * \tau \mathcal{Y}$” with $\mathcal{Y} \in \mathbb{R}^{M \times n \times C_i}$.
3.4. Spatio-Temporal Convolutional Block
In order to fuse features from both spatial and temporal domains, the spatio-temporal convolutional block (ST-Conv block) is constructed to jointly process graph-structured time series.
As illustrated in Figure 5, the spatial layer in the middle is to bridge two temporal layers which can achieve fast spatial-state propagation from graph convolution through temporal convolutions.
The “sandwich” structure also helps the network sufficiently apply bottleneck strategy to achieve scale compression and feature squeezing by downscaling and upscaling of channels $C$ through the graph convolutional layer.
Q. WHY IT HAS SANDWICH STRUCTURE???
A.
Moreover, layer normalization is utilized within every ST-Conv block to prevent overfitting.
The input and output of ST-Conv blocks are all 3-D tensors. For the input $v^l \in \mathbb{R}^{M \times n \times C^l}$ of block $l$, the output $v^{l+1} \in \mathbb{R}^{(M-2(K_t-1)) \times n \times C^{l+1}}$is computed by,
\[v^{l+1} = \Gamma_1^l * \tau ReLU(\Theta^l * \mathcal{G}(\Gamma_0^l * \tau v^l)) \tag{8}\]where
- $\Gamma_0^l$, $\Gamma_1^l$ are the upper and lower temporal kernel within block $l$, respectively.
- $\Theta^l$ is the spectral kernel of graph convolution
- $ReLU(\cdot)$ denotes the rectified linear units function.
3.5. Loss Function
We use L2 loss to measure the performance of our model.
\[L(\hat{v};W_{\theta})=\sum_{t}\| \hat{v}(v_{t-M+1}, ..., v_t, W_\theta) - v_{t+1} \|^2 \tag{9}\]where
- $W_\theta$ are all trainable parameters in the model
- $v_{t+1}$ is the ground truth
- $\hat{v}(\cdot)$ denotes the model’s prediction
3.6. Recap of the Main Characteristics STGCN
- STGCN is a universal framework to process structured time series.
- It is not only able to tackle traffic network modeling and prediction issues but also to be applied to more general spatio-temporal sequence learning tasks.
- The spatio-temporal block combines graph convolutions and gated temporal convolutions, which can extract the most useful spatial features and capture the most essential temporal features coherently.
- The model is entirely composed of convolutional structures and therefore achieves parallelization over input with fewer parameters and faster training speed.
4. EXPERIMENTS & RESULTS
4.1. Dataset Description
BJER4 was gathered from the major areas of east ring No.4 routes in Beijing City by double-loop detectors.
- The traffic data are aggregated every 5 minutes.
- There are 12 roads selected for the experiment.
PeMSD7 was collected from Caltrans Performance Measurement System (PeMS) in real-time by over 39,000 sensor stations, deployed across the major metropolitan areas of California state highway system.
- The traffic data are aggregated every 5 minutes.
- The authors randomly select a medium and a large scale among the District 7 of California containing 228 and 1,026 stations, labeled as PeMSD7(M) and PeMSD7(L), respectively, as data sources (shown in the left of Figure 7).
4.2. Data Preprocessing
- Interpolation method: Linear interpolation
- Normalization method: Z-score
4.3. Experimental Settings
All the tests use 60 minutes as the historical time window.
\[\hat{v}_{t+1}, ..., \hat{v}_{t+H} = \underset{v_{t+1}, ..., v_{t+H}}{\mathrm{argmax}}\log{P(v_{t+1}, ..., v_{t+H} | v_{t-M+1}, ..., v_{t})} \tag{1}\]With Eq. (1) and the time window setting, 12 observed data points ($M = 12$) are used to forecast traffic conditions in the next 15, 30, and 45 minutes ($H = 3, 6, 9$).
Evaluation Metric
To measure and evaluate the performance of different methods, three following metrics are adopted.
- Mean Absolute Errors (MAE)
- Mean Absolute Percentage Errors (MAPE)
- Root Mean Squared Errors (RMSE)
Q. WHY DO WE NEED MULTIPLE METRICS???
A.
Baselines
The authors set up two types of models based on STGCN framework.
- STGCN(Cheb) with the Chebyshev polynomials approximation
- STGCN(1st) with the 1st-order approximation ($K=1$).
STGCN based models are compared with following baselines.
- Historical Average (HA)
- Linear Support Vector Regression (LSVR)
- Auto-Regressive Integrated Moving Average (ARIMA)
- Feed-Forward Neural Network (FNN)
- Full-Connected LSTM (FC-LSTM)
- Graph Convolutional GRU (GCGRU)
4.4. Experimental Results
Benefits of Spatial Topology
Through effectively utlizing spatial structure of the given data, the STGCN based models have achieved a significant improvement on short and mid-and-long term forecasting.
Training Efficiency and Generalization
To see the benefits of the convolution along time axis in our proposal, we summarize the comparison of training time between STGCN and GCGRU in Table 3.
In order to further investigate the performance of compared deep learning models, the authors plot the RMSE and MAE of the test set of PeMSD7(M) during the training process, see Figure 9.
Those figures also suggest that the models can achieve muchfaster training procedure and easier convergences. Thanks to the special designs in ST-Conv blocks, the models have superior performances in balancing time consumption and parameter settings.
Q. HOW IT ACHIEVES SUPERIOR PERFORMANCE IN BALANCING TIME COMSUMPTION & PARAMETER SETTING???
A.
Moreover, the number of parameters in STGCN ($4.54 \times 10^5$) only accounts for around two third of GCGRU, and saving over 95% parameters compared to FC-LSTM.
5. CONCLUSION
In this paper, the authors propose
- A novel deep learning framework STGCN for traffic prediction.
- Integrating graph convolution and gated temporal convolution through spatio-temporal convolutional blocks.
The experiments shows
- Benefits of spatial topology
- The model outperforms other state-of-the-art methods on two real-world datasets.
- The results indicate its great potentials on exploring spatio-temporal structures from the input.
- The model outperforms other state-of-the-art methods on two real-world datasets.
- Training efficiency and generalization
- Faster training (parallelization).
- Fewer parameters with flexibility and scalability.
- Faster training (parallelization).
Q. WHY/HOW IT ACHEIVES FELXIBILITY AND SCALABILITY???
A.
These features are quite promising and practical for scholarly development and large-scale industry deployment. In the future, we will further optimize the network structure and parameter settings.
Moreover, the proposed framework can be applied into more general spatio-temporal structured sequence forecasting scenarios, such as evolving of social networks, and preference prediction in recommendation systems, etc.
6. MY RESEARCH PROJECT
Purpose / Goal
- Forecast or detect (in real-time) cascading outages in power systems.
Approach
- Use a GNN based model to predict or detect cascading outages.
Experiments
Step 1. Data Generation
- Need to introduce randomness to create large size of dataset.
-
Randomness will be given by the method that generated the uncertain loads in [16]:
\[d := d + \mathcal{N}(\mu=0, \sigma = 0.03 * d)\]- $d$ is a load.
- $\mathcal{N}$ is normal distribution with mean zero and standard deviation proportional to the load.
- $d$ is a load.
Q. WHICH FEATURES (e.g. $P_d, Q_d, P_g, Q_g$ or outage event time $t_{event}$) SHOULD BE GIVEN RANDOMNESS?
A.
Step 2. Design the GNN Model Architecture
- The model should able to utilze spatial and temporal feature of the data.
- graph structured data: spatial feature
- time series data: temporal feature
- graph structured data: spatial feature
- Models based on STGCN architecture [1] can extract and learn the both features (spatial & temporal) from the data.
- Codes
- yet not ready…😭
- yet not ready…😭
Step 3. Train & Test the Model
- 🤔
Step 4. Tune the Hyper-parameters
- 🤔
Results (What we want to see…)
- High enough prediction (or detection) accuracy.
- Extremely high computational efficiency compared to old methods.
- A GNN based model having significantly fewer nodes (trainable parameters) than other deep learning models.
7. APPENDIX
7.1. Laplacian & Symmetric normalized Laplacian [10]
Laplacian
Given a simple graph $\mathcal{G}$ with $n$ vertices, its Laplacian matrix $L_{n \times n}$ is defined as,
\[L = D - A\]where
- $D$ is the degree matrix of the graph.
- $A$ is adjacency matrix.
The elements of $L$ are given by
\[L_{ij}:= \begin{cases} deg(v_i) &\text{if } i=j \\ -1 &\text{if } i\neq j \text{ and } v_i \text{ is adjacent to } v_j \\ 0 &\text{otherwise} \end{cases}\]where
- $deg(v_i)$ is the degree of the vertex $i$.
Symmetric normalized Laplacian
The symmetric normalized Laplacian matrix is defined as,
\[L = I - D^{-1/2} A D^{-1/2}\]The elements of $L^{sym}$ are given by
\[L_{ij}:= \begin{cases} 1 &\text{if } i=j \text{ and } deg(v_i) \neq 0\\ -\frac{1}{\sqrt{deg(v_i)deg(v_j)}} &\text{if } i\neq j \text{ and } v_i \text{ is adjacent to } v_j \\ 0 &\text{otherwise} \end{cases}\]7.2. Graph Fourier transform
Graph Fourier transform is a mathematical transform which eigendecomposes the Laplacian matrix of a graph into eigenvalues and eigenvectors. Analogously to classical Fourier Transform, the eigenvalues represent frequencies and eigenvectors form what is known as a graph Fourier basis [11].
Lets assume we have a graph $\mathcal{G}_t = (\mathcal{V}, \mathcal{E}, W)$, where $\mathcal{V}$ is a finite set of $|\mathcal{V}|=n$ verices, $\mathcal{E}$ is a set of edges, and $W \in \mathbb{R}^{n\times n}$ is a weighted adjacency matrix.
The definition of Laplacian matrix is
\[L = I_n - D^{-\frac{1}{2}} W D^{-\frac{1}{2}} = U \Lambda U^T \in \mathbb{R}^{n\times n}\]where
- $I_n$ is an identity matrix.
- $D \in \mathbb{R}^{n\times n}$ is the diagonal degree matrix with $D_{ii} = \sum_{j}{W_{ij}}$.
- $U = [u_0, …, u_{n-1}] \in \mathbb{R}^{n\times n}$ is a Graph Fourier basis.
- $\Lambda =diag([\lambda_0, …, \lambda_{n-1}]) \in \mathbb{R}^{n\times n}$ is the diagonal matrix of eigenvalues of $L$.
The graph Fourier transform of a signal $x \in \mathbb{R}^{n}$ is then deinfed as as $\hat{x} = U^{T}x \in \mathbb{R}^{n}$, and its inverse as $x=U\hat{x}$ [13].
7.3. Chebyshev Polynomial & Approximation [14, 15]
The Chebyshev polynomials are two sequences of polynomials related to the sine and cosine functions, notated as $T_n(x)$ and $U_n(x)$.
\[T_n(cos(\theta))=cos(n\theta)\] \[U_n(cos(\theta))sin(\theta)=sin((n+1)\theta)\]The Chebyshev polynomials of the first kind are obtained from the recurrence relation as follows.
\[T_0(x)=1 \\ T_1(x)=x \\ T_{n+1}(x)=2xT_n(x)-T_{n-1}(x)\]One can obtain polynomials very close to the optimal one by expanding the given function in terms of Chebyshev polynomials and then cutting off the expansion at the desired degree.
\[f(x) \approx \sum_{i=0}^{\infty}{c_i T_{i}(x)}\]This is similar to the Fourier analysis of the function, using the Chebyshev polynomials instead of the usual trigonometric functions.
7.4. Localizing Convolutional Filter in Space
The Eq. (2) represents spectral filtering of graph signal.
\[\begin{aligned} y & = \Theta *\mathcal{G} x \\& = \Theta (L) x \\& = \Theta (U \Lambda U^T) x \\&= U \Theta (\Lambda) U^T x \end{aligned} \tag{2}\]The filter is characterized by its kernel ($\Theta(\cdot)$), and the simplest kernerl we can imagine is a non-parametic filter, i.e. the kernel parameters $\theta_k \in \mathbb{R}$ $(k=1, …, n)$ are all free.
\[\Theta(\Lambda) = diag(\theta)\]In this case, the filter has a limitaion that it is not localized in space. 😡
However, this issue can be solved by following two strategies. 😁
A. Restricting kernel to polynomial by Chebyshev approximation (Horizontal ver.)
We can localize the filter in space by restricting the kernel to a polynomial [8]. As a result, the convolutional filter is restricted as a polynomial filter. Moreover, by using Chebyshev approximation, we could limit the radius of the convolutional operation.
The localized filter can be expressed as follows.
\[\begin{aligned}\Theta(\Lambda) &= \sum_{k=0}^{K-1}{\theta_k \Lambda^{k}} \\ &\approx \sum_{k=0}^{K-1}{\theta_k T_{k}(\tilde{\Lambda})}\end{aligned}\]where
- $\tilde{\Lambda} = 2 \frac{\Lambda}{\lambda_{max}}-I_n$ ($\lambda_{max}$ denotes the largest eigenvalues of $L$).
- $\theta \in \mathbb{R}^{n}$ is a vector of polynomial coefficient.
- $K$ is a radius of the convolutional filter.
B. Applying a stack of 1st-order approximated kernel (Vertical ver.)
By 1st-order approximation, we can get a simplified filter as follows.
\[\Theta(\Lambda) \approx \theta_0 + \theta_1(\frac{2}{\lambda_{max}}\Lambda-I_n)\]where $\theta_0$, $\theta_1$ are two shared parameters of the kernel.
Applying a stack of graph convolutions with the 1st-order approximation vertically that achieves the similar effect as $K$-localized convolutions do horizontally, all of which exploit the information from the $(K-1)$-order neighborhood of central nodes [1].
Reference
[1] B. Yu, H. Yin, and Z. Zhu, “Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting,” arXiv.org, 12-Jul-2018.
[2] B. Tefft, S. Rosenbloom, R. Santos, and T. Triplett, “American Driving Survey: 2014 – 2015,” AAA Foundation, 14-Jun-2018. [Online]. Available: https://aaafoundation.org/american-driving-survey-2014-2015/. [Accessed: 15-Feb-2021].
[3] Yuhan Jia, Jianping Wu, and Yiman Du, “Traffic speed prediction using deep learning method,” 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC), 2016.
[4] Y. Lv, Y. Duan, W. Kang, Z. Li and F. Wang, “Traffic Flow Prediction With Big Data: A Deep Learning Approach,” in IEEE Transactions on Intelligent Transportation Systems, vol. 16, no. 2, pp. 865-873, April 2015, doi: 10.1109/TITS.2014.2345663.
[5] M. Niepert, M. Ahmed, and K. Kutzkov, “Learning Convolutional Neural Networks for Graphs,” arXiv.org, 08-Jun-2016. [Online]. Available: https://arxiv.org/abs/1605.05273. [Accessed: 05-Apr-2021].
[6] J. Bruna, W. Zaremba, A. Szlam, and Y. LeCun, “Spectral Networks and Locally Connected Networks on Graphs,” arXiv.org, 21-May-2014. [Online]. Available: https://arxiv.org/abs/1312.6203. [Accessed: 05-Apr-2021].
[7] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst, “The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains,” IEEE Signal Processing Magazine, vol. 30, no. 3, pp. 83–98, 2013.
[8] M. Defferrard, X. Bresson, and P. Vandergheynst, “Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering,” arXiv.org, 05-Feb-2017. [Online]. Available: https://arxiv.org/abs/1606.09375. [Accessed: 05-Apr-2021].
[9] T. N. Kipf and M. Welling, “Semi-Supervised Classification with Graph Convolutional Networks,” arXiv.org, 22-Feb-2017. [Online]. Available: https://arxiv.org/abs/1609.02907v4. [Accessed: 05-Apr-2021].
[10] “Laplacian matrix,” Wikipedia, 10-Jan-2021. [Online]. Available: https://en.wikipedia.org/wiki/Laplacian_matrix. [Accessed: 03-Feb-2021].
[11] “Graph Fourier Transform,” Wikipedia, 30-Dec-2020. [Online]. Available: https://en.wikipedia.org/wiki/Graph_Fourier_Transform. [Accessed: 01-Mar-2021].
[12] M. Elbayad, “Rethinking the Design of Sequence-to-Sequence Models for Efficient Machine Translation,” TEL, 03-Nov-2020. [Online]. Available: https://tel.archives-ouvertes.fr/tel-02986998. [Accessed: 09-Apr-2021].
[13] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst, “The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains,” IEEE Signal Processing Magazine, vol. 30, no. 3, pp. 83–98, 2013.
[14] “Chebyshev polynomials,” Wikipedia, 08-Apr-2021. [Online]. Available: https://en.wikipedia.org/wiki/Chebyshev_polynomials. [Accessed: 14-Apr-2021].
[15] “Approximation theory,” 11-Jan-2021. [Online]. Available: https://en.wikipedia.org/wiki/Approximation_theory. [Accessed: 14-Apr-2021].
[16] D. Deka and S. Misra, “Learning for DC-OPF: Classifying active sets using neural nets,” 2019 IEEE Milan PowerTech, Milan, Italy, 2019, pp. 1-6.


Previous generation survey: SDSS
Current generation survey: DES
LSST precursor survey: HSC
We want to solve for the Maximum A Posterior solution:
$$\arg \max - \frac{1}{2} \parallel {\color{Orchid} y} - {\color{SkyBlue} x} \parallel_2^2 + \log p_\theta({\color{SkyBlue} x})$$ This can be done by gradient descent as long as one has access to $\frac{\color{orange} d \color{orange}\log \color{orange}p\color{orange}(\color{orange}x\color{orange})}{\color{orange} d \color{orange}x}$.But what about uncertainty quantification?
$\Longrightarrow$ We can see which parts of the image are well constrained by data, and which regions are uncertain.
Thank you!


This app simulates sending Morse Code with a flashlight. The output is shown in the order of (letter) followed by the dot and dash values for the Morse code.


On this page we have two controllers that use a
service to share data.
- Click the reset button, check the "key" checkbox, then click the #psb#
to see the initial state.
Peri$scope draws services, in addition to scopes, as nodes.
Notice that |service| in Ctrl1 and |theService| in Ctrl2 reference the same
single service object. (Services in AngularJS are singletons.)
Notice that |localArray| is a reference to |serviceArray|,
|localNestedObj| is a reference to |serviceNestedObj.nestedObj|,
|localObj| is a reference to |serviceObj|, and
|localNestedArray| is a reference to array |nestedArray| –
these are all references to objects inside the service.
- Uncheck the "key" checkbox.
Type something in the four service* textboxes, then click the #psb#.
Since |ng-model| for these four textboxes refers to properties of the
service object, they affect the service.
- Type something in the |localObj.name| textbox, then click the #psb#.
In Ctrl1, |localObj| was assigned to |myService.serviceObj|, and
since |serviceObj| is an object, |localObj| is a reference to
|myService.serviceObj|.
Therefore, any changes made to |localObj| (e.g., to |localObj.name|
via |ng-model|) affect the object it references, which is
|myService.serviceObj|.
- Type something in the |localPrimitive| textbox, then click the #psb#.
In Ctrl1, |localPrimitive| was assigned to |myService.servicePrimitive|,
but since |servicePrimitive| is a primitive, |localPrimitive| is
also created as a primitive (not a reference), and hence its initial value
is a copy of the current value of |myService.servicePrimitive|.
(This is how JavaScript works.)
Therefore, any changes made to |localPrimitive| (e.g., via |ng-model|)
affect the local scope variable/property – they do not affect the
primitive defined in the service. So don't do this!
Best Practice: When multiple controllers need access to the same
data (or state or code), a service should be used. (You should not rely on
scope inheritance, as it restricts how you structure your HTML.)
Do not assign primitives defined in the service to controller scope
variables, because this will create local scope variables/properties that
do not reference the service.


Hello User !
Please login to Access your Account
Email ID
Password
Remember Me
Sign In
Don't have an account !
Sign Up


Click to open modal window
×
Modal title
One fine body…
Click to open modal window
×
Modal title
One fine body…