As of May 31, 2023, we have updated our Code of Conduct.

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
1 answer
109 views

ANN with Backpropagation for MINST data set

I am learning about ANN and tried it for the MINST data sets. Now I am supposted to create a neural network (ANN) with backpropagation. The structure for the neural network I have is this the input ...
zellez's user avatar
  • 47
1 vote
0 answers
64 views

Train a Keras model to recognize and predict speech in real-time using microphone as audio source

Please help me optimize this script. I'm running it in Google Colab GPU runtime. I've implemented many optimizations but they worsened it. I need serious help. I have to submit my project in 3 days!. ...
Mayur Sinalkar's user avatar
1 vote
1 answer
44 views

Optimize an algorithm for preparing a dataset for machine learning

I'm learning how to use R coming from a python background. I'm following Andrej Karpathy's zero-to-hero course, reimplementing it in R. We start with a list of 32033 names. These names have to be ...
plaffont's user avatar
1 vote
0 answers
187 views

Object detection YOLO v1 loss function implementation with Python 3 and TensorFlow 2.x

About the code Object detection YOLO v1 loss function implementation with Python + TensorFlow 2.x. It based on the Pytorch implementations below and re-implemented with TensorFlow based on my ...
mon's user avatar
  • 111
1 vote
0 answers
47 views

Improving AI model for categorical outcome predictions

I am a novice and would appreciate some guidance. I have been trying to create a machine learning code that will correlatate 10+ binary variable and maybe a couple continuous variables to a binary ( ...
Parker Car's user avatar
2 votes
0 answers
72 views

neural network that determines the gender of a word

I wrote a neural network in python using pytorch, which determines the gender of a word in Russian. As a training set: a file containing a word and a number from 0 to 2 (0-masculine,1- feminine and 2-...
Андрей С.'s user avatar
0 votes
0 answers
67 views

How to efficiently store and compute forecasting curves?

Let PD be a Plane/Date couple. For each PD, I would like to predict the forecasted booking curve, i.e. the cumuled amount of bookings registered each day between X days before departure and departure. ...
Doe Jowns's user avatar
1 vote
1 answer
64 views

Plotting correlation matrix with Seaborn and pandas

I try to plot the correlation matrix of a Pandas DataFrame. As the diagonal elements are always ones, and the matrix is symmetrical, so I can get rid of most than a half of the squares without loosing ...
Arpad Horvath's user avatar
1 vote
0 answers
26 views

Machine learning: user-based collaborative filtering

Task: What to fix in the class, just as a beginner it's hard for me to understand where I messed up? Code: Model: ...
DarMaster's user avatar
0 votes
0 answers
28 views

program which select's the ROI from un-stabilized video and Extract the ROI in diff window as stabilized ROI, wants to increase its computation speed

The problem is, program is really lengthy and computationally expensive. So is there any way to make this program faster or any other way to write this code? (I am beginner in python and would love ...
Shubham Mahadik's user avatar
5 votes
1 answer
969 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
1 vote
0 answers
41 views

Implementation of K-Neighbor Algorithm in Python

I would like to get some feedback of my K-Neighbors Implementation using Abalone Dataset and cross-fold validation. How can I make it more efficient? (No sklearn library allowed) Where do you see any ...
matt.aurelio's user avatar
1 vote
1 answer
81 views

Decision Tree for classification tasks in Python

I've decided to implement the ID3 Decision Tree algorithm in Python based on what I've learned from George F. Luger's textbook on AI (and other secondary readings). As far as I know, the code is ...
AndersonFreixo's user avatar
1 vote
0 answers
27 views

RESNET machine learning code with TensorFlow

I am a PhD student working on a machine learning project with binary classification and RESNET architecture in TensorFlow. I believe I have done everything correctly but I am looking for some ...
karl-gardner's user avatar
2 votes
0 answers
51 views

CodeReview: CycleGAN Implementation Using Keras FunctionalAPI

Okay So I Am Here Implementing the cyclegan architecture with using keras api from scratch. For Those who Wanna Know More About Cyclegan seehere The CycleGan Compose of Two Phase Architecture Like ...
CallMeAaishaa's user avatar
1 vote
0 answers
80 views

Logistic Regression on Titanic Dataset - Sklearn

The goal of my program is to calculate the chances of a person to survive during Titanic accident, after receiving information such as person's age, class, sex, etc. There's a dataset full of ...
irtexas19's user avatar
  • 163
1 vote
1 answer
64 views

Linear Regression in Scikit_learn

I have 2 datasets (one for training and the other for testing) containing information about days temperature and humidity; My programm should process the training dataset and find a relation between ...
irtexas19's user avatar
  • 163
3 votes
1 answer
128 views

Machine Learning Loss Functions In C++

I was looking for C++ versions of the machine learning metrics implemented in Python's sklearn, but they were surprisingly hard to find. I came across a website that had most of the loss functions ...
craftycroft's user avatar
1 vote
0 answers
103 views

Binary classification with pytorch

I wrote a simple neural network binary classification algorithm using Pytorch. It uses the dataset from https://www.kaggle.com/pritsheta/heart-attack, which consists of a table with 300 rows and 14 ...
user3053216's user avatar
3 votes
1 answer
79 views

libsvm++ : Rewritten libsvm in newer C++

The most famous library for Support Vector Machine (SVM) algorithm is libsvm (https://github.com/cjlin1/libsvm/), but I felt that its code style is too old, I rewrote in newer C++ as a hobby project. ...
frozenca's user avatar
  • 1,683
4 votes
2 answers
769 views

C++: Linear Regression and Polynomial Regression

I wrote a simple linear/polynomial regressor based on my previous matrix project (https://github.com/frozenca/Ndim-Matrix). ...
frozenca's user avatar
  • 1,683
2 votes
1 answer
139 views

Generating a matrix with each row having normalized weights

I just asked this question over Stack Over Flow on how to improve my code and reposting it here as someone on Stack Overflow recommended this platform. I have written two python functions and they are ...
AulwTheo's user avatar
4 votes
1 answer
75 views

Unsupervised competitive learning algorithm from scratch in javascript

I'm a mathematician who is new to programming and I'm currently reading the book "Theory of Neural Networks" by Rojas. To become better, I try to program every algorithm that is described in ...
Giuliano Cantina's user avatar
2 votes
0 answers
99 views

Logistic Regression for Fashion MNIST T-shirt vs. Shirt

I wrote a Logistic Regression for Fashion MNIST to classify T-shirt vs. Shirt. here is the class ...
AlbertJ's user avatar
  • 199
2 votes
0 answers
61 views

xagents - implementations of reinforcement learning algorithms

Description It is valid to say, this work started and evolved from a standalone DQN implementation, which I included in an old question, to a mini-library xagents, housing 7 re-usable tensorflow-based ...
watch-this's user avatar
1 vote
0 answers
42 views

The best tensorflow neural net I got so far for iris dataset

Compared to my another post Logistic Regression for non linearly separable data which uses one-layer net, i.e. Logistic Regression to classify the iris data set, this post is to discuss the tensorflow ...
AlbertJ's user avatar
  • 199
0 votes
1 answer
81 views

Logistic Regression for non linearly separable data

Iris Data Set consists of three classes in which versicolor and virginica are not linearly separable from each other. I constructed a subset for these two classes, here is the code ...
AlbertJ's user avatar
  • 199
2 votes
0 answers
51 views

DQN implementation

I just wrote my pong DQN. It seems to work. I'm looking for a performance based review on anything that might slow down the training in complex models. main.py: ...
Machine Learning Diary's user avatar
2 votes
2 answers
78 views

Updated version of my first neural network in c++

I got lot of suggestions for optimizing my neural network last post I made, now I wanted to post updated version of it were I got rid of most of performance eaters, now I would really appriciate ...
G.Azma's user avatar
  • 31
8 votes
3 answers
724 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
0 votes
0 answers
30 views

Logistic regression using Sklearn in Python

I'm trying to learn how to use logistic regression with Sklearn. After learning the theory, I tried implementing it using the Heart Attack Analysis datasheet from Kaggle. Here's a snippet of the data: ...
sangstar's user avatar
  • 193
2 votes
1 answer
111 views

a prototype of finding the (almost) best learning rate and initial weights so that a perceptron converges with the minimal iteration

First of all, I chose the nearest data points/training examples ...
AlbertJ's user avatar
  • 199
2 votes
1 answer
69 views

A simple clusterness measure of data in one dimension using Java - follow-up 2

(See the previous version here.) This time, I have encorporated all the suggestions made by Marc. Also, I changed the type of points from Double to ...
coderodde's user avatar
  • 26.7k
1 vote
1 answer
53 views

A simple clusterness measure of data in one dimension using Java - follow-up

(See the previous version here.) (See the next version here.) This time, I have incorporated all the suggestions made by Roman; my new version follows. ...
coderodde's user avatar
  • 26.7k
7 votes
1 answer
83 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
0 votes
0 answers
55 views

Keras: Using Autoencoders for prediction

I have a dataset which I divided into two sections horizontally. Column A of first section is the input variable and Column A of second section is the target variable. I am trying to build a Denoising ...
Animeartist'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,683
0 votes
0 answers
32 views

Stacking Classifier Implementation

I was going through the book Hands on Machine Learning With Scikit-Learn & Tensorflow. In one of the chapters, the author mentioned ...
theProgrammer's user avatar
3 votes
1 answer
285 views

Pandas replace rare values in a pipeline

A common preprocessing in machine learning consists in replacing rare values in the data by a label stating "rare". So that subsequent learning algorithms will not try to generalize a value ...
RUser4512's user avatar
  • 993
1 vote
0 answers
69 views

validation and test loss for a variety of PyTorch time series forecasting models

Hi everyone I'm trying to reduce the complexity of some of my Python code. The function below aims to compute the validation and test loss for a variety of PyTorch time series forecasting models. I ...
igodfried's user avatar
  • 111
0 votes
2 answers
52 views

Machine Learning Program

I've written a program that finds the difference between data and gives output. Here's the code: ...
UCYT5040's user avatar
  • 101
1 vote
0 answers
831 views

Model Pipeline to run multiple Classifiers for ML Classification

As a general rule of thumb, it is required to run baseline models on the dataset. I know H2O- AutoML and other AutoML packages do this. But I want to try using Scikit-learn Pipeline, Here is what I ...
Pluviophile's user avatar
0 votes
2 answers
331 views

Multithreaded implementation of K-means clustering algorithm in Java

Hello I have written a multi-threaded implementation of the K-means clustering algorithm. The main goals are correctness and scalable performance on multi-core CPUs. I expect to code to not have race ...
Teodor Dyakov's user avatar
2 votes
0 answers
48 views

Looping over files to create a dataframe

As part of my NLP project at work, I want to loop over all files that are either PDF of docx in the same directory. The end purpose is to create a dataframe with text content of the files in one ...
Sam.H's user avatar
  • 43
2 votes
0 answers
44 views

Optimize binary classification model

I've created binary classification model from scratch, just to understand intuition behind that. However when I compare my implementation to model from tensorflow/pytorch with the same parameters and ...
mikolaj semeniuk's user avatar
1 vote
0 answers
34 views

Industrial Practices for Time-Series Forecasting

Hi I have wrote a code here for predicting temperature across months. This is the dataset that I was using: https://www.kaggle.com/sumanthvrao/daily-climate-time-series-data I have used a SARIMA model ...
Jasper Tan's user avatar
2 votes
1 answer
166 views

Calculation of the Distance Matrix in the K-Means Algorithm in MATLAB

Purpose of the code : To assign the corresponding label of the centroids to the points which are close to it. Below is a graphical (2D) example. Variable X is a matrix, rows represent the points, ...
the_illuminated2003's user avatar
2 votes
0 answers
24 views

Transfer learning CNNs for image classification in TensorFlow

This code works, and I'm pretty sure it's mathematically/algorithmically correct: ...
A T's user avatar
  • 495
2 votes
0 answers
22 views

Implementation of Policy Gradient Reward Design paper

I've implemented the first experiment from the Reward Design via Online Gradient Ascent paper. I don't have any specific concerns, but it's my first time using multiprocessing or doing reinforcement ...
seed's user avatar
  • 121
2 votes
0 answers
851 views

Playing pong (atari game) using a DQN agent

I trained a DQN agent using tensorflow and OpenAI gym Atari environment called PongNoFrameskip-v4, but this code should be compatible with any ...
watch-this's user avatar

1
2 3 4 5