\setlength{\abovedisplayskip}{2pt} \setlength{\belowdisplayskip}{2pt}
2. Reduce space above and below section/subsection titles. Place these lines before beginning the document.
\usepackage[compact]{titlesec}
\titlespacing*{\section} {0pt}{2\baselineskip}{3\baselineskip}
\titlespacing*{\subsection} {0pt}{2\baselineskip}{3\baselineskip}
This answer is copied from this StackOverflow link. In Springer, llncs format I found this sucks but a hack around the same is provided in this StackOverflow answer. It really works!!.
\usepackage{subfigure}
\begin{figure}
\centering
\parbox{5cm}{
\includegraphics[width=5cm]{img1}
\caption{First.}
\label{fig:2figsA}}
\qquad
\begin{minipage}{5cm}
\includegraphics[width=5cm]{img2}
\caption{Second.}
\label{fig:2figsB}
\end{minipage}
\end{figure}
2. Place Table and a Figure side by side. [source:https://tex.stackexchange.com/a/265891/88745%5D
\documentclass{article}
\usepackage{graphicx}
\usepackage{capt-of}% or \usepackage{caption}
\usepackage{booktabs}
\usepackage{varwidth}
\begin{document}
\begin{table}[ht]
\begin{varwidth}[b]{0.6\linewidth}
\centering
\begin{tabular}{ l r r r }
\toprule
Student & Hours/week & Grade \\
\midrule
Ada Lovelace & 2 & A \\
Linus Thorvalds & 8 & A \\
Bruce Willis & 12 & F \\
Richard Stallman & 10 & B \\
Grace Hopper & 12 & A \\
Alan Turing & 8 & C \\
Bill Gates & 6 & D \\
Steve Jobs & 4 & E \\
\bottomrule
\end{tabular}
\caption{Student Database}
\label{table:student}
\end{varwidth}%
\hfill
\begin{minipage}[b]{0.4\linewidth}
\centering
\includegraphics[width=40mm]{example-image}
\captionof{figure}{2-D scatterplot of the Student Database}
\label{fig:image}
\end{minipage}
\end{table}
\end{document}
There are different options for customizing the output such as font size, installing new packages.
The major sources of energy are coal, oil and natural gas. Two major problems with these resources are they are: 1) limited and are getting depleted; this means that our future generations will face energy scarcity. 2) Coal, the main energy source emit lots of carbon dioxide, a green house gas which eventually results in the greenhouse effect. The greenhouse effect deals with heating of our climate which eventually melts the glaciers raises water levels and affects global ecosystem badly.
Sustainable energy aims to find solutions to our existing energy problem by proposing renewable energy sources which regenerate naturally and produce clean energy. These sources include solar, wind, water, biogas, geothermal energy. All these sources are inexhaustible. Sustainable energy also includes the practices of energy efficiency and conservation.
Stephen Pacala, an environment biologist at Princeton University mentions that we can handle the increasing carbon dioxide challenge with following four options:
Corresponding to Eigen vector, we too get a scalar value () which on multiplying vector x results in the same vector as that obtained by above matrix multiplication. Mathematically,
Here, refers to Eigen Vector and refers to Eigen value.
References:
hdmi_safe=1
hdmi_force_hotplug=1
First two weeks were terrible for me, where I felt like an alien on campus. There were various reasons for this felling – i) Everyone was engrossed in their red velvet cubicles either tweaking smart meter, playing with sensors, soldering boards or doing some incompressible stuff, which only they can decode. ii) administrative related issues, iii) and Mumbai residential flat rules. But all thanks to weekly “group meetings” and “Smart ICT” classes, which broke the frozen state and I felt like at my home institute. The best part of the class was that almost every week an eminent figure used to come, deliver his best and made us crazy for one and half hour. I rate this course as my best course I have ever attended, in which the instructor used to deliver lectures in the form of stories and made us awestruck. Remaining ten weeks were enjoying during which work went smoothly.
Well, I stayed outside the campus, but I survived for the first month with the food of Phoenix (H10), second month with Woodland (H8) and the last month with Queen of the campus, the enlightened abode (H1).
Some NP questions which I was never able to solve include:
The things which I am going to miss include:
Finally, three months stay finished and it was my last working day on campus. On this day, I had ten minutes of wisdom sermon from my guide; then all lab members assembled and had a home made Cake (Thanks for the delicious cake). And to my surprise, I was requested to give a speech of above details, which I did. Oh, I forgot to thank Eduroam facility, otherwise, I might have suffered a lot on campus.
Our IIT Bombay team at one of the lab lunches
Concluding with the statement of my guide, “Once a SEILER, always a SEILER”.
</pre> #org_dfs represents object with missing readings timerange = seq(start(org_xts),end(org_xts), by = "hour")# assuming original object is hourly sampled temp = xts(rep(NA,length(timerange)),timerange) complete_xts = merge(org_xts,temp)[,1] <pre>
Removing Duplicate values: Here, we will identify duplicate entries on the basis of duplicate time-stamps.
</pre>
# dummy time-series data
timerange = seq(start(org_xts),end(org_xts), by = "hour")# assuming original object is hourly sampled
temp = xts(rep(NA,length(timerange)),timerange)
# identify indexes of duplicate entries
duplicate_enties = which(duplicated(index(temp)))
# data without duplicates
new_temp = temp[-duplicate_entries,]
<pre>
Resample Higher frequency data to lower frequency: In this function, we will resample the high-frequency data to lower frequency data. Note that there are some tweaks done according to timezone, currently set to “Asia/Kolkata”
</pre>
resample_data <- function(xts_datap,xminutes) {
library(xts)
#xts_datap: Input timeseries xts data, xminutes: required lower frueqeuncy rate
ds_data = period.apply(xts_datap,INDEX = endpoints(index(xts_datap)-3600*0.5, on = "minutes", k = xminutes ), FUN= mean) # subtracting half hour to align hours
# align data to nearest time boundary
align_data = align.time(ds_data,xminutes*60-3600*0.5) # aligning to x minutes
return(align_data)
}
<pre>
After running the LOF algorithm with following R code lines
library(Rlof) # for applying local outlier factor library(HighDimOut) # for normalization of lof scores set.seed(200) df <- data.frame(x = c( 5, rnorm(2,20,1), rnorm(3,30,1), rnorm(5,40,1), rnorm(9,10,1), rnorm(10,37,1))) df$y <- c(38, rnorm(2,30,1), rnorm(3,10,1), rnorm(5,40,1), rnorm(9,20,1), rnorm(10,25,1)) #pdf("understandK.pdf", width = 6, height = 6) plot(df$x, df$y, type = "p", ylim = c(min(df$y), max(df$y) + 5), xlab = "x", ylab = "y") text(df$x, df$y, pos = 3, labels = 1:nrow(df), cex = 0.7) dev.off() lofResults <- lof(df, c(2:10), cores = 2) apply(lofResults, 2, function(x) Func.trans(x,method = "FBOD"))
We get the outlier scores for 30 days on a range of k = [2:10] as follows:
Before explaining results further, I present the distance matrix as below, where each entry shows the distance between days X and Y. Here, X represents row entry and Y represents column entry.
Let us understand how outlier scores get assigned to day 1 on different k’s in the range of 2:10. The neighbours of point 1 in terms of increasing distance are:
Here the first row represents neighbour and the second row represents the distance between point 1 and the corresponding point. While noticing the outlier values of point 1, we find till k = 8, outlier score of point 1 are very high (near to 1). The reason for this is that the density of k neighbours of point 1 till k = 8 is high as compared to point 1. This results in higher outlier score to point 1. But, when we set k = 9, outlier score of point 1 drops to 0. Let us dig it deep further. The 8th and 9th neighbours of point 1 are points 18 and 17 respectively. The neighbours of point 18 in increasing distance are:
and the neighbours of point 17 are:
Observe carefully, that 8th neighbour of point 1 is point 18, and the 8th neighbour of point 18 is point 19. While checking the neighbours of point 18 we find that all of its 8 neighbours are nearby (in cluster D). This results in higher density for all k neighbours of point 1 till 8th neighbour as all these points are densest as compared to point 1, and hence point 1 with lesser density gets high anomaly score. On the other hand, 9th neighbour of point 1 is point 17 that has 9th neighbour as point 3. On further checking, we find that for all the points which are in cluster D now find their 9th neighbour either in cluster A or cluster B. This essentially decreases the density of all the considered neighbours of point 1. As a result, now all the points including point 1 and its 9 neighbours have densities in the similar range and hence point 1 gets low outlier score.
I believe that this small example explains how outlier scores vary with different k’s. Interested readers can use the provided R code to understand this example further.