Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [machine-learning]

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

2
votes
0answers
60 views

Plant pest detection using CNN

I am doing a project in plant pest detection using CNN. There are four classes each having about 1400 images. While training the model using Convolution Neural Network, there is a smooth curve for ...
4
votes
1answer
89 views

Simple decision tree in Haskell

I've been trying to get better at Haskell for a while, and have recently been working on a lot of small projects with it. This constructs a binary decision tree. The command to run it is: ...
1
vote
0answers
31 views

Modified and created a new python class for generating a report of metrics for machine learning

I initially posted a question on SO. I have come up with an answer for the same. Basically, given two dicts of models and parameters, user can create an object, and get the report in 5 steps. ...
5
votes
1answer
31 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 (...
1
vote
0answers
93 views

Chess Agent using reinforcement learning with monte carlo tree search

I wanted to ask if this project is valid to state on a resume for entry-level python developer and if the code is presentable to say a job interviewer. github link: full project (If this is not the ...
2
votes
1answer
52 views

User-Interactive Data Cleaning Program in Python

I'm trying to develop a program in Python that allows the user to import datasets and perform operations on them using pandas and numpy so she/he can skip writing all the preprocessing code her/...
0
votes
1answer
37 views

A simple clusterness measure of data in one dimension using Java

Problem definition Given \$X = (x_1, \dots, x_n)\$ such that \$x_1 \leq x_2 \leq \dots \leq x_n \$. Let \$x_{\min} = \min X = x_1\$, \$x_{\max} = \max X = x_n\$ and \$r = x_{\max} - x_{\min}\$. Also, ...
0
votes
1answer
151 views

Predicting credit card default

I have this code for predicting credit card default and it works perfectly, but I am checking here to see if anybody could make it more efficient or compact. It is pretty long though, but please bear ...
3
votes
0answers
80 views

A simple toy ResNet model and its implementation

I want to understand how resnet works also called us residual networks and I understand it better when I code one myself. I tried to find a simple implementation of resnet in the web but most I found ...
1
vote
0answers
46 views

Posterior collapses in an RNN variational auto-encoder - PyTorch

I am trying to implement and train an RNN variational auto-encoder as the one explained in "Generating Sentences from a Continuous Space". Although I apply their proposed techniques to mitigate ...
4
votes
1answer
50 views

Set of one-hot encoders in Python

In the absence of feature-complete and easy-to-use one-hot encoders in the Python ecosystem I've made a set of my own. This is intended to be a small library, so I want to make sure it's as clear and ...
1
vote
0answers
33 views

Custom Vector and Matrix classes in python for machine learning

I am creating a machine learning tool set from scratch in python. I have never done something of this kind and I don't usually use python but I thought it would be good to expand my horizons. I am ...
1
vote
0answers
84 views

Tensorflow model for predicting dice game decisions

For my first ML project I have modeled a dice game called Ten Thousand, or Farkle, depending on who you ask, as a vastly over-engineered solution to a computer player. You can find the complete game, ...
1
vote
0answers
43 views

Get stacked game state in NHWC format

After reading this, I decided to transition my DQN code from the keras library to tf.keras library (code is located in this repo) and my original code used NCHW format, as it was faster with GPUs. As ...
3
votes
0answers
372 views

Auto classification of my bank transactions

This is my first Machine Learning algorithm using Python and SkLearn. The code works, which is pretty awesome. I'm getting about 65-70% of accuracy after training it with about 4k rows of data. ...
5
votes
1answer
188 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 ...
2
votes
0answers
87 views

Simple Neural Network from scratch using NumPy (Python)

I added learning rate and momentum to a neural network implementation from scratch I found at: https://towardsdatascience.com/how-to-build-your-own-neural-network-from-scratch-in-python-68998a08e4f6 ...
2
votes
0answers
156 views

Principal Component Analysis in Tensorflow

To learn the low-level API of Tensorflow I am trying to implement some traditional machine learning algorithms. The following Python script implements Principal Component Analysis using gradient ...
3
votes
1answer
972 views

k-means using numpy

This is k-means implementation using Python (numpy). I believe there is room for improvement when it comes to computing distances (given I'm using a list comprehension, maybe I could also pack it in a ...
2
votes
0answers
56 views

Simple linear regression of two variables

This is the code I built to implement a simple linear regression to check the impact of variable A on B. I am not interested in predicting that's why the statistical approach is important for me to ...
3
votes
1answer
227 views

BipedalWalker-v2 one-step actor-critic agent trains slow

I'm trying to solve the OpenAI BipedalWalker-v2 by using a one-step actor-critic agent. I'm implementing the solution using python and tensorflow. My question is whether the code is slow because of ...
6
votes
1answer
76 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 ...
6
votes
1answer
67 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 ...
2
votes
0answers
47 views

How to make my neural network train faster

I'm trying to train my neural network and for the most part it's going well. However, I'd like it if it could train faster and was wondering if anyone could give some advice. I'm trying mostly to ...
6
votes
0answers
132 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 ...
2
votes
1answer
45 views

Basic Single Header statistics and ml libray for C++ - Scikit-Learn like implementation

I am developing scikit-learn like implementation for C++ it is in the initial stage while developing I've started doubt myself that is this the correct implementation, since here accuracy is more ...
1
vote
0answers
93 views

Neural Network Backpropagation

My neural network is buggy somewhere. However, the reason I am posting here and not Stack Overflow is because a buggy neural network can still be trained to some degree and will compile/perform better ...
9
votes
2answers
208 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. ...
2
votes
0answers
879 views

Logistic Regression using PyTorch

I want to get familiar with PyTorch and decided to implement a simple neural network that is essentially a logistic regression classifier to solve the Dogs vs. Cats problem. I move 5000 random ...
1
vote
0answers
69 views

Predicting Disaster (Titanic)

Intro I have started a new course (Analyzing Big Data with Microsoft R) and have an exam soon. So I wanted to test my skills, and a nice way to do this was by doing a Kaggle competition Titanic: ...
4
votes
1answer
253 views

Naive Bayesian Algorithm in Python with cross-validation

I've wrote this code to evaluate a Machine Learning - the classification problem for digits recognition as in the figure below: For more details and to check the whole code, check the GitHub ...
8
votes
1answer
651 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 ...
2
votes
0answers
156 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 with ...
4
votes
0answers
316 views

Tic Tac Toe engine in Python for Deep Learning

I'm implementing a Tic Tac Toe engine that will work with deep learning. I'm using a 3x3 numpy array of floats to represent the board. +1.0 represents an X, ...
4
votes
0answers
237 views

Linear Regression in Tensorflow

I am a machine learning newbie and recently I implemented (or at least tried to implement) a linear regression model in tensorflow. I would love to know how I can improve my code: ...
5
votes
1answer
196 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 ...
3
votes
2answers
82 views

Inefficient Regularized Logistic Regression with Numpy

I am a machine learning noob attempting to implement regularized logistic regression via Newton's method. The example data have two features which are to be expanded to 28 through finding all ...
1
vote
0answers
108 views

Chainer - Python - Logistic Regression

I created a simple Logistic Regression model using Python and Chainer. I would like to optimize the code for which I like to get some help. One restriction: interchanging the implemented ...
0
votes
1answer
156 views

Greedy adaptive dictionary (GAD) for supervised machine learning [closed]

For my project in machine learning supervised, I have to simplify a training-data and I have to use this technique at page 5 of the document. Pseudocode algorithm My code (numbers are the steps): <...
3
votes
0answers
318 views

PCA, LDA and Logistic Regression

Based on the great blog by Joel Grus, I implemented LogisticRegression, PCA, and LDA. I'd appreciate feedback as I'm not sure that the logistic classifier is good enough (as it supposed to achieve ...
5
votes
1answer
236 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
0answers
130 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 ...
3
votes
0answers
3k views

Code for Training a Handwriting Recognition Model

I just made my machine learning code work a few days ago and I would like to know if there's a way to improve my code. Before I get to the implementation of the tasks at hand, I would like to ...
2
votes
0answers
641 views

Optimize GPU usage for real-time object detection from camera with TensorFlow GPU and OpenCV

Trying to recognize objects real time using TensorFlow Object Detection API OpenCV using ssd_mobilenet_v1_coco_11_06_2017 model in GPU. ...
1
vote
0answers
34 views

NER and its F Measure Calculation

I am trying to write one Name Entity Recognition in Hindi. I have primarily used NLTK of Python. I have used HMM Module with its supervised training. The data is annotated and saved in .pos files ...
5
votes
0answers
163 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 ...
1
vote
0answers
306 views

Training MLP classifier with TensorFlow on notMNIST dataset

I am new to TensorFlow and I would really appreciate if someone could look at my code to see whether things are done efficiently and suggest improvements. This code works okay and achieves around 91....
3
votes
0answers
227 views

Weighted logistic regression in Julia

I'm trying to estimate a weighted logistic regression as part of a bigger project. I have an implementation in Matlab2015b, but I wanted to give Julia a try to see if I could speed up the estimation ...
7
votes
1answer
762 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 ...
3
votes
0answers
42 views

Sklearn: Regularized ridge regression for predicting fantasy football performance from several sources' projections

I've been working on trying to predict fantasy performance of players in this upcoming NFL season based on projections from several experts/sources. I trained the data on projections from last year ...