Posts

Creating Neural Network using Keras

This blog gives step by step procedure for creating your own neural network using Keras in Python.Some prerequisites for this procedure are: Data is available in csv(comma separated Values) file format. python 3.x is installed on system and includes packages keras, pandas and numpy.  The steps are as follows: Load Data: import statement: import pandas as pd data = pd.read_csv(filename.csv) Processing Data: There are different possible steps to make data in the form we want to provide to neural network for training as well as for its functionality.But here most commonly used steps are mentioned. One Hot Encoding:  Represents all categorical variables as binary vectors. Each integer value is represented as binary vector where index of integer is marked as 1 while other values are marked as zeroes syntax is: processedData = pd.get_dummies(DataToEncode, ColumnNameWithWhichToEncode)  Normalise all data to make sure that all values are in between 0 and 1. ...

Supervised ML - Naive Bayes

Steps for Naive Bayes using sklearn(Python): Import GaussianNB: from sklearn.naivebayes import GaussianNB  Create classifier: clf = GaussianNB() Fit the classifier: clf.fit(FeatureTrainingSet,LabelTrainingSet) Prediction for testing data clf.predict(FeatureTestingSet) Accuracy is one of the metrics to check fitting of model over available dataset.There are 3 ways to check accuracy Manually calculating number of correctly predicted data set upon all dataset. Using accuracy_score metrics: import statement should be: from sklearn_metrics import accuracy_score wherever you want to check accuracy : print accuracy_score(NumpyArrayToBePredicted, labelledArray) Advantage is that you can use other available metrics as well.   Using Classifier Score: clf.score(FeatureDataTobePredicted,labelledArray) It will calculate predictions for provided data and then calculates accuracy for that data. Advantage is that you don't need to calculate predictions separa...

AI- Dual Process Theory

Image
         I just came across with new theory regarding artificial intelligence and its progress.It might be old one, but I just came across with it.It is the presentation given with regarding the problem, we the researcher in AI faced. Even though I am still understanding the concept and I am not fully grabbing it, But I guess it gives us some different perceptive regarding development of Artificial General Intelligence.Here I am just providing a brief overview of what I understood from this.          Human Brain works in 2 disparate modes, the first one is Understanding and the other one is Reasoning.Mostly even the best of the nowadays algorithm deals with reasoning kind of problems, like playing chess and rocket science.But if we need to develop a machine which needs to meet day to day problems, it should be dealing with understanding of the Vast and Complex  real time situation which we, as human...