Posts

Showing posts from August, 2020

Don’t Overfit! — How to prevent Overfitting in your Deep Learning Models

Image
  Base Model To see how we can prevent overfitting, we first need to create a base model to compare the improved models to. The base model is a simple keras model with two hidden layers with 128 and 64 neurons. You can check it out here: model = keras . Sequential () model . add ( keras . layers . Dense ( 300 , activation = tf . nn . relu , input_dim = 300 )) model . add ( keras . layers . Dense ( 128 , activation = tf . nn . relu )) model . add ( keras . layers . Dense ( 64 , activation = tf . nn . relu )) model . add ( keras . layers . Dense ( 1 , activation = tf . nn . sigmoid )) model . compile ( optimizer = 'adam' , loss = 'binary_crossentropy' , metrics = [ 'accuracy' ]) history = model . fit ( df_train , train_labels , batch_size = 32 , epochs = 100 , validation_split = 0.2 , shuffle = True ) With this model we can achieve a training accuracy of over 97%, but a validation accuracy of only about 60%. In the graphic below we can se...

Real-time data update in chart.js using Socket.io

Image
  Real-time data update in chart.js using Socket.io Github link =>  https://github.com/jpssasadara/Realtime_chart_AngNodeSocketio Ref             => https://morioh.com/p/a523f0dd4669

WebSocket vs Socket.io

Image
WebSocket vs Socket.io Difference Between WebSocket and Socket.io WebSocket  is the communication Protocol which provides bidirectional communication between the Client and the Server over a TCP connection, WebSocket remains open all the time so they allow the real-time data transfer. When clients trigger the request to the Server it does not close the connection on receiving the response, it rather persists and waits for Client or server to terminate the request. Socket.IO  is a library which enables real-time and full duplex communication between the Client and the Web servers. It uses the WebSocket protocol to provide the interface. Generally, it is divided into two parts, both WebSocket vs Socket.io are event-driven libraries Client Side: it is the library that runs inside the browser Server Side: It is the library for Node.js WebSocket Below are the features: Key features of WebSocket  WebSocket helps in real-time communication between the Client and the web ser...

ACID vs CAP -- jpssasadara

Image
  ACID vs CAP ACID - set of properties that define the quality of database transactions. CAP - Consistency, Availability, Partition Tolerance 3 basic properties or requirements for distributed System. Assuming a Distributed Database system, where data is distributed/partitioned across nodes/servers All 3 properties is hard to achieve. So at least a combination 2 properties from the above is acceptable.