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
2
votes
0answers
60 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
305 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 ...
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 ...
6
votes
1answer
75 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 ...
3
votes
2answers
105 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
1answer
157 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
46 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
109 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
275 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
1k 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
76 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
444 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
998 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 ...
3
votes
0answers
2k 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
345 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
257 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
215 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
91 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
118 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
173 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
362 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
278 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
134 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
4k 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
729 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
35 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
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 ...
1
vote
0answers
329 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
235 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
819 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
67 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 ...
3
votes
0answers
480 views

Sklearn custom transformer (label encoder and imputer)

I have a pandas.Dataframe with a single (new) record and the following function: ...
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 ...
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 ...
11
votes
1answer
260 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 ...
1
vote
1answer
798 views

MemoryError for a small-ish dataset with RandomForestClassifier()

I have a not-so-big dataset having 100,000 rows and 6k columns and I'm using the following code to fit a Random Forest to it: ...
1
vote
0answers
224 views

sklearn request: pipeline for regression analysis on entering student data

My jupyter notebook is here. I would love to hear any feedback about any problems that may be occurring in my data pipeline. I already know that I still need to develop the following features: ...
5
votes
0answers
648 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 ...
2
votes
1answer
245 views

Predicting outliers in network data [closed]

I'm implementing KNN algorithm to predict outliers in network data which contains the following columns: source IP address, source port number, protocol and total bytes transferred. To achieve this, I'...
2
votes
0answers
701 views

Implementing Adagrad in Python

I'm trying to implement Adagrad in Python. For learning purposes, I am using matrix factorisation as an example. I'd be using Autograd for computing the gradients. My main question is if the ...
3
votes
0answers
59 views

Time calculation for NLTK tagging

I am trying to calculate the time required to tag one sentence/file by one trained NLTK HMM Tagger. To do this I am writing the following code, please suggest if I need to revise anything here. ...
1
vote
0answers
130 views

Naïve Bayes classifier to group questions by intent

I am trying to train a question-answer system, where I am trying to group similar questions, and identify the most apt response. The program should identify the intent/focus. To do it, I have tagged ...
5
votes
0answers
3k views

Calculate relationship between 2 categorical variables in a pandas Dataset with chi square test

I'm working on a Machine Learning project and I'm in Data Exploration step, and my dataset has both categorical and continuous attributes. I decided to compute a chi square test between 2 categorical ...
1
vote
0answers
77 views

Bare minimum neural network, random weight update etc

I'm trying to understand that how a simple neural network works. The program below (that I wrote to test my understanding) aims to train a network that will eventually be able to distinguish whether ...
0
votes
1answer
206 views

Python code to parse JSON data from CuckooML, involving many file operations

I have written a code that will parse JSON file from a cuckoo report. The issue is am not a good coder. I have got the program to give me the desired output. The real challenge that I am facing is I ...
5
votes
0answers
6k 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 ...
5
votes
0answers
120 views

Stacking and folding machine-learning algorithm

I am trying to use the code of this guy. Written in 2013 but it is a bit obsolete on some points. Basically, the idea is to create folders from 1 dataset to train several models independently on the ...
0
votes
1answer
325 views

Reinforcement learning example (chap. 1) from Sutton's book

I ported the Lisp Tic Tac Toe code from Chapter 1. to Haskell. The original code repo is down for some reason. I believe I have completely rewritten that in Haskell (Less functional than one would ...
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++...
4
votes
1answer
2k views

Keras: multiclass classification with Recurrent Neural Network

Dataset: Labelled epidemic data consisting of number of infectious individuals per unit time. Challenge: Use supervised classification via a recurrent neural network to classify each epidemic as ...