Recap about the sea

Here's the recap of something related to our mother nature in given terms:



King tides: No scientific definition at all. Just a popular term among the people or on the news. It refers to the highest tide that occurs at a specific location per year. This term was what I commonly used. The height of the king tides will be similar along the year during normal weather conditions. But the low air pressure (pressing down to the water level) and strong winds can elevate the sea level above expect height. King tides generally occur in Summer, yet in Winter occasionally.

Highest astronomical tide (HAT): The highest level of water that can be predicted to occur under average meteorological conditions and any combination of astronomical conditions. This level may NOT be reached every year. However, a storm tide level reaching higher than the highest astronomical tide is more likely to cause inundation and flooding in coastal areas.

Mean sea level (MSL): The value obtained at a site by averaging hourly tide heights observed over a long period of time (preferably 18.6 years). It is also the average water level that would exist in the absence of tides.

Residual: The difference between the predicted tide—under average weather conditions—and the actual tide height. Actual tides include the height of the tide itself, and the height variations (residuals) that result from the effects of the weather on the height of the sea level. The residuals give a measure of height of storm surges during severe (cyclonic) weather conditions.
The components of the residuals are:

  • storm surge
  • wave setup 
  • wave run-up.


Seiche: A standing oscillation in an enclosed or semi-enclosed body of water that continues after the end of the original force. They can be triggered in an otherwise still body of water by strong winds, changes in atmospheric pressure, earthquakes, tsunami or tides. The waves in a seiche are stationary in the horizontal plane and do not progress forward. The waves move up and down, but not forward like wind waves at sea. I have no previous knowledge of this until I see this video.

Storm surge: An increase in water level associated with some significant meteorological event such as:

  • persistent strong winds
  • falling barometric pressure
  • tropical cyclone

A storm surge is an abnormal rise of water level generated by a storm over and above the predicted tide level. Storm surges are the combined effect of wind setup and wave setup, and falling barometric pressure. In some situations, when winds blow offshore, sea level can fall lower than the predicted tide level too. The magnitude of the storm surge depends on the severity and duration of the event and the seabed topography at the site. Most large surges are caused by tropical cyclones.

Storm tide: The combination of a storm surge and the normal astronomical tide. If the storm surge arrives at the same time as the high tide, the potential risk of inundaton, flooding and erosion is greater than at a lower tide. An additional threat at this time could come from the presence of very high waves (wave run-up). The inundation produced by a storm tide is often exacerbated by wave runup, waves overtopping natural or constructed levees and localised intense rainfall. This can lead to coincident flooding if combined with the effects of riverine (freshwater) flooding.

Tropical cyclone: A non-frontal low pressure system (below 1000hPa) rotating clockwise (in the southern hemisphere) that is of tropical origin and in which 10-minute mean wind speeds exceed gale force (63km/hr, 34kt or 17.5m/s).

Tsunami: A wave generated by seismic activity. It is also called a seismic sea wave, or incorrectly a tidal wave. Barely visible in the open ocean, the amplitude of a tsunami may increase greatly as it approaches shallow coastal waters. Tsunami waves travel in groups (wave trains) and often the largest wave occurs long after the arrival of the first wave. This is particularly evident within harbours and bays where seiching can increase the height of the tsunami wave.

Wave run-up: This is the rush of water up a beach after a wave reaches the shoreline. The amount of wave run-up is the vertical distance between the maximum height the rush of water reaches on the beach and the still water level. Wave run-up depends on many factors including wave height, wave period, and the slope and composition of the beach.

Wave setup: Refers to an increase in the mean water level towards the shoreline, caused by wave action. This can be important during storm events as it results in an increase in water level above the tide.

Wind setup: The vertical rise of a body of water above still water level, caused by wind stresses on the surface of the water. Wind setup at the coast can force the sea level higher or lower than the predicted tide depending on the direction of the wind relative to the coast. When the wind is blowing towards the coast (onshore), water will be piled up against the coast and raise the sea level. When the wind is blowing offshore, water is pushed away from the coast and sea levels fall.

Here's a simpler presentation about storm surge:

Q: What is storm surge?

A: Storm surge is the rise in seawater level caused solely by a storm.


Storm surge is the abnormal rise in seawater level during a storm, measured as the height of the water above the normal predicted astronomical tide. The surge is caused primarily by a storm’s winds pushing water onshore. The amplitude of the storm surge at any given location depends on the orientation of the coast line with the storm track; the intensity, size, and speed of the storm; and the local bathymetry.


Storm tide is the total observed seawater level during a storm, resulting from the combination of storm surge and the astronomical tide. Astronomical tides are caused by the gravitational pull of the sun and the moon and have their greatest effects on seawater level during new and full moons—when the sun, the moon, and the Earth are in alignment. As a result, the highest storm tides are often observed during storms that coincide with a new or full moon.






RNN: Reason of using min-batch size rather than whole training set of data for approximating the gradient of loss function

Best way to approach the gradient of loss function:
The size of the learning rate is limited mostly by factors like how curved the cost function is. You can think of gradient descent as making a linear approximation to the cost function, then moving downhill along that approximate cost. If the cost function is highly non-linear (highly curved) then the approximation will not be very good for very far, so only small step sizes are safe.

...There are diminishing marginal returns to putting more examples in the minibatch.

...even using the entire training set doesn’t really give you the true gradient. The true gradient would be the expected gradient with the expectation taken over all possible examples, weighted by the data generating distribution. Using the entire training set is just using a very large minibatch size, where the size of your minibatch is limited by the amount you spend on data collection, rather than the amount you spend on computation.

Notice the reshaping of the data into a matrix with batch_size rows.

def generateData():
    x = np.array(np.random.choice(2, total_series_length, p=[0.5, 0.5]))
    y = np.roll(x, echo_step)
    y[0:echo_step] = 0

    x = x.reshape((batch_size, -1))  # The first index changing slowest, subseries as rows
    y = y.reshape((batch_size, -1))

    return (x, y)

Neural networks are trained by approximating the gradient of loss function with respect to the neuron-weights, by looking at only a small subset of the data, also known as a mini-batch. According to the reason above, the reshaping takes the whole dataset and puts it into a matrix, that later will be sliced up into these mini-batches.

Schematic of the reshaped data-matrix, arrow curves shows adjacent time-steps that ended up on different rows. Light-gray rectangle represent a “zero” and dark-gray a “one”.


Ref:
https://www.quora.com/In-deep-learning-why-dont-we-use-the-whole-training-set-to-compute-the-gradient




Install Developer Toolset on Scientific Linux

For Scientific Linux, Developer Toolset is the basic build tool for C/C++ program .

First, let's install Software Collections package:

#
#Install Software Collections in CentOSShell
$ yum install centos-release-scl

#Install Software Collections in Scientific Linux 7
$ yum install yum-conf-repos
$ yum install yum-conf-softwarecollections

#Install Software Collections in Scientific Linux 6
$ yum install "http://ftp.scientificlinux.org/linux/scientific/6x/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el6.noarch.rpm"

Now, we can install Developer Toolset with the following versions of your choice:

#Install Developer Toolset 6
$ yum install devtoolset-6
#
#Install Developer Toolset 4
$ yum install devtoolset-4
#
#Install Developer Toolset 3
$ yum install devtoolset-3

To use Developer Toolset 6, try the following commands:

#Enter Developer Toolset 6 Environment
#to invoke a BASH  with environment variables setup to run Developer Toolset 6
$ scl enable devtoolset-6 bash

#Now check your developement environment by printing GCC Version
$ gcc --version




Take a look at the nature: the sea

One brilliant data source for training data would probably come from the mother nature which  sometimes can be unpredictable. This can be a challenge for weather forecast but deep learning technique can be applied to solve this complex problem.

Back to the basic definitions about the sea, what's the tide? what's the wave?

Here's the difference between them:
  1. Tides are formed because of the interaction of the gravitational forces between the Earth, the moon, and the sun.
  2. Waves are formed because of the gusting or raging force exerted by the wind on the water surface.
  3. Tides are usually generated at the deep oceanic regions while waves are usually seen at shallower areas of the sea.
  4. Tides are made by the rising and falling sea levels with the action of gravity while waves are formed when several factors relating to the wind and water interact with each other.
Here's the extract about waves and tides:

Waves are formed when a combination of wind and water variables interact. These variables include: the speed of the wind, the distance of the area where the wind slides, duration of the blowing of the wind, how deep the body of water is, and also the total lateral distance influenced by the fetch. In simple terms, the stronger the wind is and the longer the wind blows, the bigger the waves will be. On the contrary, tides are made by a rising sea level and then water has risen to its highest elevation (reaching high tide) by the action of heavenly gravitational forces for an extended period of time (usually several hours). When the sea level starts to drop for several hours, water appears not to fall thus attaining low tide.

Ref: http://www.differencebetween.net/language/words-language/difference-between-tides-and-waves/#ixzz4uOsmBuQG







Basic difference between machine learning and deep learning




Machine learning
Deep learning
Features extracted
Manual
Automatic
Classifiers selection
Manual
Automatic
Improvement over size of data increase
No
Yes
End-to-end learning
No
Yes
Amount of training data required
Medium
Large
Accelerated with GPU
Optional
Yes

apt install through corporate proxy

Assuming proxy service like CNTLM is up and running on Ubuntu machine, one can use apt-get to install package with specifying http proxy inf...