Questions tagged [machine-learning]

Machine learning provides computer algorithms that automatically discover patterns in data and make intelligent decisions from them.

Filter by
Sorted by
Tagged with
80
votes
1answer
3k views

Siamese neural network

I have been studying the architecture of the Siamese neural network introduced by Yann LeCun and his colleagues in 1994 for the recognition of signatures ("Signature verification using a Siamese time ...
24
votes
1answer
1k views

Backpropagation in simple Neural Network

I've been working on a simple neural network implemented in python. Currently, it seems to be learning, but unfortunately it doesn't seem to be learning effectively. The graph below shows the output ...
19
votes
4answers
36k views

Simple Self-Learning AI

This is a programming challenge I set for myself a while back to create an AI that starts with no knowledge of anything whatsoever, and learns as you talk to it. (It can learn stuff like your name, ...
13
votes
1answer
2k views

Clojure Neural Network

After reading this article about Neural Networks I was inspired to write my own implementation that allows for more than one hidden layer. I am interested in how to make this code more idiomatic - ...
12
votes
3answers
19k views

Simple chat bot

I made a chat bot, that, as you talk to it, it learns to respond. But the way it speaks is strange, so if you have any ideas on how to make its response any more human, then please say so. Anyway, ...
12
votes
1answer
425 views

Make a summary from a larger text-file

This code makes summaries from larger texts. I have searched around for an algorithm and found the following: Associate words with their grammatical counterparts. (e.g. "city" and "cities") ...
11
votes
1answer
2k views

Modified Taylor diagrams

There is a type of diagram summarizing how well predictions from numerical models fit expectations; one obvious use case is comparing machine-learning regression models. Modified Taylor diagrams are ...
11
votes
1answer
3k views

A CNN in Python WITHOUT frameworks

Here's some code that I've written for implementing a Convolutional Neural Network for recognising handwritten digits from the MNIST dataset over the last two days (after a lot of research into ...
11
votes
1answer
262 views

Using Support Vector Machine algorithm to analyze satellite image [closed]

I am using Support Vector Machine (SVM) algorithm to perform a classification. The satellite image I am using is really big (5GB) that's why I am trying to take advantage of ...
9
votes
2answers
281 views

Univariate linear regression from scratch in Python

I am relatively new to machine learning and I believe one of the best ways for me to get the intuition behind most algorithms is to write them from scratch before using tons of external libraries. ...
8
votes
2answers
261 views

Trending Machine Learning topics for Alexa

I've created a small Flash Briefing Alexa skill that reports the top 5 trending topics in Machine Learning from the My Bridge service. The feed for the Flash Briefing skill can be pointed to an ...
8
votes
2answers
1k views

Using Viterbi algorithm to analyze sentences

I've probably done some pretty horrendous things here, but I'm throwing it out for people to give me some feedback that I can start using to immediately improve my Clojure coding style. Additional ...
8
votes
2answers
2k views

Python neural network: arbitrary number of hidden nodes

I'm trying to write a neural network that only requires the user to specify the dimensionality of the network. Concretely, the user might define a network like this: ...
8
votes
1answer
738 views
8
votes
1answer
1k views

Genetic algorithm for playing Tetris

Readme.md Tetris In my quest to building a Tetris game, where you can challenge an AI, I have created and trained an AI that plays Tetris all by himself. Github link I think the easiest way to run ...
8
votes
1answer
301 views

Implementation of a new algorithm for sklearn

In the Python library, sklearn is implemented the algorithm for SparsePCA. I have written the code for a another version of this algorithm that is much faster in some situations. I have not enough ...
7
votes
2answers
3k views

K-nearest neighbours in C# for large number of dimensions

I'm implementing the K-nearest neighbours classification algorithm in C# for a training and testing set of about 20,000 samples and 25 dimensions. There are only two classes, represented by ...
7
votes
1answer
825 views

Implementation of linear regression in Python

I wrote an implementation for multivariate linear regression in Python, for data in this link: http://www-bcf.usc.edu/~gareth/ISL/Advertising.csv My main focus is to avoid loops as much as possible ...
7
votes
1answer
81 views

Random Weighted Classifier in R

I am computing a random weighted classifier based on the rates at which 3 labels appear in a "train" set. I want to use this RWC as a baseline for other classifiers. I'm doing this over 1000 ...
7
votes
1answer
156 views

Portfolio optimization using genetic algorithm

I'm working on a (naïve) algorithm for portfolio optimization using GA. It takes a list of stocks, calculates its expected returns and the covariance between all of them and then it returns the ...
7
votes
1answer
6k views

k-means clustering algorithm implementation

Here is my personal implementation of the clustering k-means algorithm. ...
7
votes
1answer
651 views

Similarity research : K-Nearest Neighbour(KNN) using a linear regression to determine the weights

I have a set of houses with categorical and numerical data. Later I will have a new house and my goal will be to find the 20 closest houses. The code is working fine, and the result are not so bad but ...
7
votes
0answers
144 views

Multithreaded HD Image Processing + Logistic reg. Classifier + Visualization

[I'm awaiting suggestions for improvement/optimization/more speed/general feedback ...] This code takes a label and a folder path of subfolders as input that have certain labels ex: trees, cats with ...
6
votes
2answers
1k views

Simple Java Neural Network

I've written a toy neural network in Java. I ran it several million times with the same outputs with only the randomized weights changing from run to run. The average of all of the outputs is not 0.5, ...
6
votes
1answer
308 views

Random forest and machine learning

I am quite new to using python for machine learning. I come from a background of programming in Fortran, so as you may imagine, python is quite a leap. I work in chemistry and have become involved in ...
6
votes
1answer
78 views

Simple neural network implementation in Python

A simple neural network I wrote in Python without libraries. I avoided implementing it in matrix form because I sought to get a basic understanding of the way NN's work first. For that reason I'm ...
6
votes
1answer
329 views

Python Perceptron

This is my finished perceptron written in python. Is there anything that I can improve/suggestions? I'm a beginner with python so anything would be helpful! ...
6
votes
1answer
3k views

Calculate conditional probabilities and perform naive Bayes classification on a given data set

I wrote a class that I'm using to calculate conditional probabilities of a given distribution as well as perform naive Bayes classification. I'd like to get a code review done to tell me if there is ...
6
votes
1answer
1k views

ANFIS network based on Sugeno model I

I've been learning Common Lisp lately and I've implemented ANFIS network based on Sugeno model I. Network layout and details can be read in these slides by Adriano Oliveira Cruz. I use sigmoid as the ...
6
votes
1answer
165 views

Python class for organizing images for machine learning

I built a class to help me handle image data to use in machine learning. I thought that there would be a pre-existing package that did what I wanted but I couldn't find it so I wrote this. I am not ...
6
votes
3answers
8k views

Gradient descent for linear regression using numpy/pandas

I currently follow along Andrew Ng's Machine Learning Course on Coursera and wanted to implement the gradient descent algorithm in python3 using ...
5
votes
1answer
350 views

Classification tree in Swift

As an effort to teach myself Swift as well as to get familiar with machine learning algorithms, I've been trying to implement common algorithms, starting with a Random Forest. This is, for the moment ...
5
votes
1answer
138 views

Implementation of Logistic Regression

Is this kind of vectorized operations the most efficient way to do this in matlab? Any critics about my code? Am I doing something wrong (i tested several times, I think it works). Notice that I use J ...
5
votes
1answer
11k views

Simple Neural Network in Java

I had an assignment some weeks ago that consisted of making a simple McCulloch-Pitts neural network. I ended up coding it in a pretty OO style (or the OO style I've been taught), and I felt that my ...
5
votes
2answers
2k views

C++ Feed-Forward Neural Network

After a few days of reading articles, watching videos and bugging my head around neural networks, I have finally managed to understand it just so I could write my own feed-forward implementation in C++...
5
votes
1answer
433 views

Performing machine learning

I've written the code below to do some work on machine learning in R. I'm not overly happy with some bits of it, and I suspect I could improve it quite a bit. Bits I'm specifically interested in ...
5
votes
1answer
6k views

Apriori algorithm in Python 2

This takes in a dataset, the minimum support and the minimum confidence values as its options, and returns the association rules. I'm looking for pointers towards better optimization, documentation ...
5
votes
1answer
332 views

Reinforcement Learning for Flappy Bird in JavaScript

To give a bit of a background, I'm organizing a small session about reinforcement-learning, specifically Q-learning, to a group of high school students in the ...
5
votes
1answer
13k views

Different neural network activation functions and gradient descent

I've implemented a bunch of activation functions for neural networks, and I just want have validation that they work correctly mathematically. I implemented sigmoid, tanh, relu, arctan, step function, ...
5
votes
1answer
158 views

Random Forest Code Optimization

I am new to Python. I have built a model with randomforest in python. But I think my code is not optimized. Please look into my code and suggest if I have deviated from best practices. Overview about ...
5
votes
1answer
92 views

Designing a circuit of gates in Clojure and doing forward and backpropagation

I am reading Hacker's guide to Neural Networks. Since I am also learning Clojure, I tried to implement them in Clojure. I would like the feedback about what could be more idiomatic and better in the ...
5
votes
1answer
283 views

Facial recognition tool

I created a small library and an example application in Python for learning about facial recognition and experimenting with it. Right now though, I am loading a list of file names into memory and then ...
5
votes
2answers
643 views

Defensive programming type-checking

I have issues with dynamically typed languages, and I tend to worry about type a lot. Numpy has different behaviour depending on if something is a matrix or a plain ndarray, or a list. I didn't ...
5
votes
1answer
2k views

Why does the LR on spark run so slowly?

Because the MLlib does not support the sparse input, I ran the following code, which supports the sparse input format, on spark clusters. The settings are: 5 nodes, each node with 8 cores (all the ...
5
votes
1answer
6k views

Alternative to Python's Naive Bayes Classifier for Twitter Sentiment Mining

I am doing sentiment analysis on tweets. I have code that I developed from following an online tutorial (found here) and adding in some parts myself, which looks like this: ...
5
votes
1answer
66 views

Simple SVM in MATLAB

I'm studying SVMs and wrote a demo in MATLAB (because I couldn't get a quadratic programming package to work correctly in Python). Right now it's simple and can only do linearly-separable cases (...
5
votes
1answer
216 views

Linear Regression on random data

Wrote a simple script to implement Linear regression and practice numpy/pandas. Uses random data, so obviously weights (thetas) have no significant meaning. Looking for feedback on Performance Python ...
5
votes
0answers
137 views

Deep learning CNN for image recognition using tensor flow

This algorithm is a convolutional deep neural network used for image recognition. I used the MNIST data set, which is a bunch of images from 0 to 9. As of right now, I have trained this image with ...
5
votes
0answers
182 views

Code for training machine learning linear regression and SVM

Ok , for my final year project I've wrote this piece of code to train my machine learning model on a this dataset , here the code i used ...
5
votes
0answers
654 views

Low accuracy of LSTM model tensorflow [closed]

I am trying to learn LSTM model for sentiment analysis using Tensorflow, I have gone through the LSTM model. Following code (create_sentiment_featuresets.py) generates the lexicon from 5000 positive ...