Techblog For Learner

Mp neuron model

This is the 2nd post of blog post series ‘Deep Learning and Machine Learning’.

MP Neuron model

The McCulloch-Pitts Neuron model relates to the theory developed in the 90s where Walter McCulloch and Warren Pitts put forward the idea. It is similar to a human neuron in Biology consisting of Axons, Soma etc. These are mapped to the functioning of the neural network.

1) Data

The MP neuron takes binary input and gives binary output. If the input data is not binary it can be compacted to binary before it can be feeded to the model.

2) Classification

The classification is also binary which is 0 or 1. The model can give a yes or no answer based on the input and the threshold.

3) Model

It consists of a function with a single parameter. The input is aggregated(g). There is a threshold value which is decided. If the value of the function is equal to or greater than the threshold value, it gives a positive output and vice versa.

site: One Fourth Labs

The MP Neuron model basically draws a line where positive values lie on the line or above the line whereas the negative values below the line.

4) Loss function

The squared loss function is applied. It finds the difference between the predicted value and the actual prediction as a square.

5) Learning

site: One Fourth Labs

Learning in MP Neuron consists of finding the threshold value with lowest error for prediction. This is done with brute force for a single parameter.

6) Accuracy

Accuracy is given by the standard matrix of the division of the number of right predictions by the total number of predictions.

The MP Neuron basically helps to find a line that separates the positive value from the negative ones.

The disadvantages of MP Neuron are-

  1. Boolean input and output.
  2. Fixed slope
  3. Few intercepts possible
  4. Fixed parameters
  5. Less flexible
  6. Less variety of Inputs.

3rd post will be out soon.. (Keep Scrolling).

Thank you for reading my post.

Linear algebra for ml

This is the 1st post of blog post series ‘Deep Learning and Machine Learning’.

Are you looking forward to learning Linear Algebra for Machine Learning?

General Idea

istock Different Classifications (site: One Fourth Labs)

We will look at Linear Algebra definition, and how it relates to vectors and matrices. Then we look through what vectors and matrices are and how to work with them and its related classifiction.

We would learn about the interrelation between Linear Algebra and Machine Learning.

What is Linear Algebra?

istock site: istock

Linear Algebra is a sub-field of mathematics concerned with vectors, matrices, and linear transforms. It is a key foundation to the field of Machine Learning, from notations used to describe the operation of algorithms to the implementation of algorithms in code.

Linear Algebra for Machine Learning

Machine Learning addresses the question of how to build computers that improve automatically through experience. It is one of today’s most rapidly growing technical fields, lying at the intersection of computer science and statistics, and at the core of artificial intelligence and data science.

The recent development in Machine Learning has been driven both by the development of new learning algorithms and theory and by the ongoing explosion in the availability of online data and low-cost computation.

ml site: unsplash

The adoption of data-intensive machine-learning methods can be found throughout science, technology, and commerce, leading to more evidence-based decision-making across many walks of life, including healthcare, manufacturing, education, financial modelling, policing, and marketing.

Thank you for reading my post. (Keep Scrolling)*.

Plotting in python

Using Matplotlib and Seaborn library’s

Matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc.It is useful in producing publication quality figures in interactive environment across platforms.To know more about this library, check this link.

Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics.o know more about this library, check this link.

Before Plotting you need to import dataset first.

Various Types of Plots

1. Histogram: The hist() function automatically generates histograms and returns the bin counts or probabilities.

GQL

2. Pie charts: the pie() function allows you to create pie charts. Optional features include auto-labeling the percentage of area, exploding one or more wedges from the center of the pie, and a shadow effect.

GQL

3. Bar charts: Use the bar() function to make bar charts, which includes customizations such as error bars.

GQL

4. Scatter plots: the scatter() function makes a scatter plot with (optional) size and color arguments. This example plots changes in Google’s stock price, with marker sizes reflecting the trading volume and colors varying with time. Here, the alpha attribute is used to make semitransparent circle markers.

GQL

More Sources to find various plots.

matplotlib , analyticsvidhya ,data-visualization

Thanks for reading it.

Github for website deployment

unspash

Many moons ago, MediaTemple’s databases running WordPress were compromised. Word on the street was that they were hacked months before users even heard about it. That happened to me. To deal with it, I had to dig through countless files and lines of code to remove all the bullshit and fix the problems this caused. What a broken experience all around.

Fast forward to today, and enter GitHub.

github github.(unspash)

Github is an amazing service. At first, I just started using it freely to track awesome libraries of code, but after awhile, I leveled up and ponied up the cash for a paid account. With private repos, my site deployment–and in this case, redeployment–is unbelievably easy and an amazing tool to have.

But why use GitHub, or even anything else like it? Because version controlled websites last longer (in bed). If your site or host gets hacked, like MediaTemple did, you’re bound to have a shitstorm to clean up after. Instead of combing through files, just do a fresh git pull and you’re pretty much set. There’s more to dealing with hacked servers, but this setup works well for updating code, replacing code, and resolving any and all problems you might encounter in code.

Beyond that, having an external service hosting my code means it’s safe and secure if my laptop crashes. It doesn’t get much better than GitHub deployment.

Thanks for reading it.

Blogs by Kunal is maintained by Kunal Sharma.
Designed and Developed by Kunal in with and 💻 .

.