#How To Implement Naive Bayes From Scratch in Python #http://machinelearningmastery.com/naive-bayes-classifier-scratch-python/ #Dataset #https://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data import csv import math import random #Handle data def loadCsv(filename): lines = csv.reader(open(filename, "r")) dataset = list(lines) for i in range(len(dataset)): dataset[i] = [float(x) for x in dataset[i]] return dataset #Test handling data """ filename = 'pima-indians-diabetes.data.csv' SomeDataset = loadCsv(filename) print("Loaded data file {0:s} with {1:5d} rows".format(filename,len(SomeDataset))) """ #Split dataset with ratio def splitDataset(dataset, splitRatio): trainSize = int(len(dataset) * splitRatio) trainSet = [] copy = list(dataset) while len(trainSet) < trainSize: index = random.randrange(len(cop...
John McCarthy John McCarthy was an American computer scientist and cognitive scientist. McCarthy was one of the founders of the discipline of artificial intelligence. John McCarthy (September 4, 1927 – October 24, 2011) was an American computer scientist and cognitive scientist. McCarthy was one of the founders of the discipline of artificial intelligence. He coined the term " artificial intelligence " ( AI ), developed the Lisp programming language family, significantly influenced the design of the ALGOL programming language, popularized timesharing, and was very influential in the early development of AI. McCarthy received many accolades and honors, such as the Turing Award for his contributions to the topic of AI, the United States National Medal of Science, and the Kyoto Prize. John McCarthy is one of the "founding fathers" of artificial intelligence, together with Marvin Minsky, Allen Newell and Herbert A. Simon. McCarthy coined the term "artifi...
When I started blogging with Blogspot, I'm 15 year old. Then later I know how to monetize my blog with Google AdSense. But there are lots and lots of Google terms and conditions there. One of them is, you should be 18 year of age to create a AdSense account . Now, What should I do ? Simple create the account in the name of your father, mother or your elder brother. Or anyone you can trust, ofcourse your friends. So don't worry about setting up your AdSense account with someone else name. Google don't care.