Tuesday, October 20, 2015

Using XPath to find Maximum and Minimum values



 
 
 



XPath for minimum

/ama/e/@v[not(. > ../../e/@v)]

XPath for Maximum

/ama/e/@v[not(. < ../../e/@v)]

Monday, October 19, 2015

Note on Anomaly detection

https://en.wikipedia.org/wiki/Anomaly_detection

In data mining, anomaly detection (or outlier detection) is the identification of items, events or observations which do not conform to an expected pattern or other items in a dataset.


Three broad categories of anomaly detection techniques exist. Unsupervised anomaly detection techniques detect anomalies in an unlabeled test data set under the assumption that the majority of the instances in the data set are normal by looking for instances that seem to fit least to the remainder of the data set. Supervised anomaly detection techniques require a data set that has been labeled as "normal" and "abnormal" and involves training a classifier (the key difference to many other statistical classification problems is the inherent unbalanced nature of outlier detection). Semi-supervised anomaly detection techniques construct a model representing normal behavior from a given normal training data set, and then testing the likelihood of a test instance to be generated by the learnt model.

Friday, October 02, 2015

Convert Putty key to SSH key

assuming you already have private key that was generated by puttygen, do following steps to import the key to ssh.

1. load the private key to puttygen with it's load function
2. in its conversions menu, choose export openssh. make sure format is ssh-2 rsa.
3. save the key to ~/.ssh/id_isa
3. with ssh-keygen, do
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub