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
23 views

Distinguish between handwritten subtraction and compound fraction

I am working in a project name "Handwritten Math Evaluation" SO what basically happen in this is that there are 11 classes of (0 - 9) and (+,-) each containing 50 clean handwritten digits in ...
8
votes
1answer
180 views
+100

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 ...
1
vote
0answers
23 views

How to speed up this numba based decision tree?

In order to improve the performance of this code fragment, I have speeded up some code fragments by using the numba. However, a frustrating thing is that the performance of this decision tree is bad. ...
10
votes
1answer
232 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 ...
3
votes
1answer
54 views

A Tiny Nearest Neighbor Classification Implementation in C#

I am practicing to implement the KNN classification tool in C#. The basic point structure is constructed by the class Point, and there are two members in ...
81
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 ...
4
votes
0answers
120 views

A Very Simple Support Vector Machine with SMO Algorithm Implementation

Context. I was looking for some simple implementation of SVM with the SMO algorithm that can be used as an in-class problem together with a simple mathematical explanation of how it works. The problem ...
1
vote
0answers
23 views

Machine Learning Implementation when dealing with high variance data

I'm am trying to classify MLB (Baseball) games whose score go over the total based on the total and the number of people who have bet the over. The total is a number set by Vegas and a bettor can ...
1
vote
0answers
46 views

A program that performs logistic regression based on Iris dataset

I am a newcomer in Machine Learning and I have wrote a simple program for logistic regression based on Iris dataset. I would like for experts to tell me about its drawbacks and bugs, and if it can be ...
6
votes
1answer
510 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, ...
5
votes
0answers
60 views

Machine Learning Implementation

I am new to ML and I wanted to implement a Linear Regression to predict a golfer's scores based on certain feature supplied to my model. I would like a review to see if I'm implementing this correctly ...
2
votes
1answer
159 views

Smart Tic Tac Toe, a reinforcement learning approach

I'm currently familiarizing myself with reinforcement learning (RL). For convenience, instead of manually entering coordinates in the terminal, I created a very simple UI for testing trained agents ...
5
votes
1answer
72 views

Yolov3 Real Time Object Detection in tensorflow 2.2

Note As there are a lot of related modules in the project, I recently posted several similar posts(because all content cannot fit due to character limit) and someone indicated that this might be ...
0
votes
1answer
57 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, ...
4
votes
1answer
86 views

C++: k-Nearest Neighbours with Lambdas and Priority Queues

I implemented getting the \$k\$-nearest neighbours of an origin point to a set of points in C++17. I tried to use some more modern C++ lambda techniques and was looking for feedback on use of lambdas, ...
5
votes
1answer
85 views

C++ - Logistic Regression Backpropagation with Gradient Descent

I implemented binary logistic regression for a single datapoint trained with the backpropagation algorithm to calculate derivatives for a gradient descent optimizer. I am primarily looking for ...
3
votes
0answers
48 views

Nvidia Energy Consumption Watcher

The idea was to write a context manager that would calculate energy consumption for the given machine learning pipeline running on a GPU. It does it by polling the current power consumption using the ...
0
votes
0answers
43 views

VGG-16 encoder - decoder implementation

I've just started with Python and Tensorflow and I wondering if you can check my VGG-16 encoder - decoder implementation. I'm using Python 3.7.7 and Tensorflow 2.1.0. ...
2
votes
1answer
585 views

Keras stacked LSTM model for multiclass classification

I am working on a multiple classification problem and after dabbling with multiple neural network architectures, I settled for a stacked LSTM structure as it yields the best accuracy for my use-case. ...
5
votes
2answers
193 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: ...
3
votes
0answers
39 views

Doing image compression with Neural Network AutoEncoders

I wanted to create an image compressor using Machine Learning and started work on an "AutoEncoder". This is a type of Neural Network which takes in the image and creates a compressed vector form. It ...
2
votes
0answers
22 views

One Class SVM algorithm taking too long

The data bellow shows part of my dataset, that is used to detect anomalies ...
1
vote
1answer
34 views

Tensorflow Python ML to Detect Emotion [closed]

I've created an application to predict emotions. But I think the application is being over fitted. And I cannot figure out how to solve the overfitting. I'm using a small data set of 107 images spread ...
2
votes
0answers
22 views

Implementation of calculation of gamma for RBF SVM

I have implemented the calculation of gamma value for RBF SVM as described in Liu et al (2012) [https://ieeexplore.ieee.org/abstract/document/6246300]. Here's a snapshot of the example from the paper: ...
2
votes
0answers
47 views

ML text generating code with Python and Tensorflow

I wanted a simple code review for improvement to increase the efficiency of my text generating model. This model is taken from the official TensorFlow site but is being trained on different datasets. ...
2
votes
0answers
34 views

simple neural network in python

I've spent the last few days learning the beginnings of how to implement a simple neural network. I've gone through chapters 1 and 2 of this book and have tried to write my own NN with referrals to ...
2
votes
1answer
65 views

Manual Regression Tree using Python

I wrote a code to create a regression tree for a synthetic train data of size Np. The idea is, first I have the source node (which consists of all set of points) ...
3
votes
1answer
29 views

Creating generator object with image augmentation to train Convolutional Neural Networks with Keras

I am currently self-studying on Python generator object and use it to generate training data and do augmentation on-the-fly, then feed it into Convolutional Neural Networks. Could anyone please help ...
2
votes
1answer
76 views

Java Neural Network Implementation

I have recently tried to get a better grip on machine learning from a point of implementation - not statistics. I've read several explanations of an implementation of a Neural Network via pseudocode ...
2
votes
0answers
31 views

Sklearn Custom Imputer from prediction

I asked this question on Stackoverflow, but thought it might be a better fit here. I'm playing around with the titanic dataset, and wanted to create a custom imputer to fill in missing ...
2
votes
0answers
36 views

Get most similar element in an array of string with another string

I have a code to get most similar element in an array of categories of jobs to another job using Google's Universal Sentence Encoder. ...
3
votes
0answers
101 views

PPE object detection with tensorflow and opencv with rtsp streams

I am working on an object detection API implemented in Tensorflow 1.14 and OpenCV 4.1, where my task is to recognize personal protection equipment (PPE) worn by workers at various construction site ...
3
votes
1answer
67 views

Estimation of min_samples for DBSCAN

I'm attempting to speed up some python code that is supposed to automatically pick the minimum samples argument in DBSCAN. Currently the execution time grows exponentially as the number of training ...
2
votes
1answer
39 views

Re-write custom feature encoding function python

I have a question regarding code quality and best practices. My task - to write a feature encoding function that will encode categorical labels, boolean labels as one-hot encoding, timestamps for ...
3
votes
1answer
147 views

Implementation of K-means

I have recently built a class that is an implementation of kMeans from scratch. I believe there is room for improvement and I would happily receive some feedback. The project can be found at: https://...
2
votes
1answer
49 views

Optimizing a TFxIDF vectorization - Python 3.x [closed]

I am attempting to train many classifiers to test their performance with classifying tweets as being from a political bot, or not (a binary 0 or 1 classifier). My ...
2
votes
0answers
80 views

Multi-threaded HD Image classifier using a neural network

This is a follow up to the code found here: Multithreaded HD Image Processing + Logistic reg. Classifier + Visualization Description: This code takes a label and a folder path of subfolders as ...
2
votes
1answer
56 views

Forecasting stock market data using Support Vector Regression

I coded this Support Vector Regression (SVR) myself following some equations in a journal (see here, or here (not in English)). The loss function used by the journal and the code below is mean ...
7
votes
0answers
148 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 ...
0
votes
0answers
22 views

Sequential learning function running slowly

I'm new to Python and made this Sequential Learning function but it runs slowly. Do you know why this runs slowly and how to improve it? ...
3
votes
1answer
71 views

Slow python code that automatically selects k for KNNG

This code is used to select K for a K-nearest neighbor graph [KNNG] from a dataset with an unknown number of centroids (which is not the same as K-means clustering). Suppose that you have a dataset ...
3
votes
1answer
158 views

Gradient Descent Algorithm using Pandas + GIF Visualization

Happy new year everyone, Following Andrew NG's course on coursera here's my implementation for the gradient descent algorithm(univariate linear regression) in Python using pandas, matplotlib with ...
2
votes
0answers
71 views

GRU-Autoencoder training

I'm training a GRU auto-encoder and my current code is very slow.I believe it's predict_captions function that takes most the time. Any suggestion to optimize this code? ...
7
votes
1answer
371 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 ...
6
votes
1answer
344 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! ...
1
vote
0answers
78 views

Homemade web-scraper that feeds perceptron with hidden layer [closed]

I’d like to start by apologising for the mess that is my code. I know that it’s really hard to parse, inefficient, and probably not idiomatic. I just don’t know how to fix it which is why I'm here. ...
1
vote
0answers
67 views

condensed nearest centroid classifier in numpy

This is my attempt to write a numpy-optimized version of a nearest centroid classifier to classify some images from the MNIST data set of handwritten digits. I am ...
-1
votes
1answer
43 views

How to write a multivariate multi-step forecasting from a multivariate single step [closed]

I'm trying to implement a multi-variate, multiple-step model to forecast the day ahead electricity prices (h+1,h+2,...,h+24). I know how to do one forecast, but I'm confused with how to implement a ...
2
votes
1answer
54 views

K_nearest_neighbors from scratch [closed]

I wanted to create a script that will perform the k_nearest_neighbors algorithm on the well-known iris dataset. This was mainly for me to better understand the algorithm and process. I think it works, ...
1
vote
0answers
74 views

Recommender system accuracy testing using GridSearchCV [closed]

I'm trying to improve my Alternating Least Squares (ALS) model performance by testing using different model parameters, but the model performance is seemingly very low. Since the Alternating Least ...

1
2 3 4 5