Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
85 votes
1 answer
4k 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 ...
DavideChicco.it's user avatar
25 votes
1 answer
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 ...
penalosa's user avatar
  • 269
19 votes
3 answers
45k 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, ...
Eli's user avatar
  • 293
13 votes
1 answer
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 - ...
matio2matio's user avatar
12 votes
3 answers
20k 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, ...
xXxK3vin_Spac3yxXx's user avatar
12 votes
1 answer
732 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") ...
Nilzone-'s user avatar
  • 1,426
12 votes
1 answer
4k 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 ...
coldspeed's user avatar
  • 395
11 votes
1 answer
3k 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 ...
Laurence Billingham's user avatar
11 votes
1 answer
317 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 ...
user143195's user avatar
10 votes
1 answer
343 views

K-means function in Python

I have written a k-means function in Python to understand the methodology. I am trying to use this on a more complex dataset with a larger value for k, but it is running super slow. Does anyone have ...
NotApplicable's user avatar
10 votes
2 answers
361 views

Convert an English sentence to German using Bahdanau Attention

Context I am following this tutorial . My mission is to convert an English sentence to a German sentence using Bahdanau Attention. Summary of the Code I first took the whole English and German ...
NITIN AGARWAL's user avatar
9 votes
4 answers
2k views

C++20 : Simple Softmax classifier for MNIST dataset

I wrote a simple softmax classifier to classify MNIST digit handwriting data set. Feel free to comment anything! ...
frozenca's user avatar
  • 1,703
8 votes
2 answers
276 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 ...
alecxe's user avatar
  • 17.3k
8 votes
3 answers
743 views

My first functional naive neural network in C++

I just wrote my first standard neural network with SGD gradient descent in c++, I am really interested if I have done anything wrong or inefficient, suggestions would help me a ton (There is lots of ...
NameThatDisplays's user avatar
8 votes
2 answers
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 ...
toofarsideways's user avatar
8 votes
2 answers
487 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. ...
maufcost's user avatar
  • 379
8 votes
2 answers
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: ...
rookie's user avatar
  • 1,233
8 votes
1 answer
874 views

Machine learning tic-tac-toe implementation

...
vho's user avatar
  • 183
8 votes
1 answer
2k 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 ...
Ludisposed's user avatar
  • 11.6k
8 votes
1 answer
334 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 ...
Donbeo's user avatar
  • 181
7 votes
2 answers
4k 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 ...
ubuntunoob's user avatar
7 votes
1 answer
959 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 ...
Algo's user avatar
  • 339
7 votes
1 answer
669 views

Remove hot-spots from picture without touching edges

In the picture below there are some regions which are very bright (i.e. more white). Some bright regions are wide and some are narrow or thin. The red box covers one such wide bright spot, and blue ...
S. M.'s user avatar
  • 173
7 votes
1 answer
94 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 ...
Julio's user avatar
  • 291
7 votes
1 answer
91 views

Optimize K-Mean for large number of clusters

I am writing a Python code for KMeans clustering. The aim of this post is to find out how I can make my below mentioned code optimal when the number of clusters is very large. I am dealing with data ...
Ling Guo's user avatar
  • 173
7 votes
1 answer
1k 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 ...
Heathcliff's user avatar
7 votes
1 answer
6k views

k-means clustering algorithm implementation

Here is my personal implementation of the clustering k-means algorithm. ...
Daniyal Shahrokhian's user avatar
7 votes
1 answer
9k views

Implementation of Single Layer Perceptron Learning Algorithm in C

I have implemented a working version of perceptron learning algorithm in C. Right now, it only works on single layer perceptrons and only takes two inputs. I plan on making it work with more than two ...
user91656's user avatar
  • 383
7 votes
1 answer
670 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 ...
mitsi's user avatar
  • 73
6 votes
2 answers
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, ...
Jack's user avatar
  • 163
6 votes
1 answer
997 views

Simple neural network in c++

I have implemented a neural network in C++. But I'm not sure whether my implementation is correct or not. My code of the implementation of neural networks given bellow. As an inexperienced programmer, ...
Sharif Hasan's user avatar
6 votes
1 answer
334 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 ...
James's user avatar
  • 163
6 votes
1 answer
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 ...
Dawny33's user avatar
  • 295
6 votes
1 answer
660 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 ...
nellex's user avatar
  • 163
6 votes
1 answer
125 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 ...
3xi's user avatar
  • 121
6 votes
1 answer
435 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! ...
iamPres's user avatar
  • 63
6 votes
1 answer
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 ...
j.jerrod.taylor's user avatar
6 votes
1 answer
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 ...
Th30n's user avatar
  • 161
6 votes
1 answer
179 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 ...
watch-this's user avatar
6 votes
1 answer
1k 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 ...
jss367's user avatar
  • 476
6 votes
3 answers
10k 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 ...
Hericks's user avatar
  • 351
6 votes
0 answers
7k views

Simple Neural Network in C

A neural network is a structure of connections and nodes that takes input and generates an output. It can be "taught"(adjusting weights and biases of connections) from a teacher data set ...
J. H's user avatar
  • 189
5 votes
1 answer
1k views

Remove background from a directory of JPEG images

I wrote a code to remove the background of 8000 images but that whole code is taking approximately 8 hours to give the result. How to improve its time complexity? As I have to work on a larger dataset ...
Hyphen's user avatar
  • 51
5 votes
1 answer
167 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 ...
Manoel Ribeiro's user avatar
5 votes
2 answers
1k views

Polynomial regression with Gradient Descent: Python

Just for the sake of practice, I've decided to write a code for polynomial regression with Gradient Descent Code: ...
Stokolos Ilya's user avatar
5 votes
1 answer
396 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 ...
Gerome Pistre's user avatar
5 votes
1 answer
12k 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 ...
Guildenstern's user avatar
5 votes
2 answers
3k 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++...
user avatar
5 votes
1 answer
462 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 ...
robintw's user avatar
  • 163
5 votes
1 answer
105 views

Making sklearn's decision trees easier to traverse

scikit-learn's decision tree structure is difficult for me to navigate. I would prefer to have functionality like tree.left, ...
Steven Gubkin's user avatar

1
2 3 4 5 6