Skip to main content

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
4 votes
1 answer
362 views

Machine Learning Model to Predict the Type of Variable Star from Light Curve

I've created this machine learning model that predicts the type of variable star based on the light curve. A variable star is a type of star whose luminosity changes over time. My model predicts ...
Astrovis's user avatar
  • 161
2 votes
1 answer
121 views

Time Series Forecasting

I'm currently working on a project involving time series analysis and have written the following code for the train-test split section. I'm particularly concerned about the correctness of the ...
user avatar
0 votes
1 answer
53 views

Low Validation and Test Accuracy with Random Forest on ECG signals

I'm working on a project involving ECG data classification using a Random Forest model. Unfortunately, my model's performance is significantly lower than expected, and I'm struggling to understand why....
MEJRI Rawaa's user avatar
1 vote
0 answers
50 views

A machine learning model for predicting bit strings in Java

I have this GitHub repository (BitPredictor.java). Basically, I tried to harness a machine learning model for predicting bit strings. I have implemented it to the best of my understanding and have ...
coderodde's user avatar
  • 29.1k
3 votes
1 answer
86 views

Pytorch code running slow for Deep Q learning (Reinforcement Learning)

I'm a new student in reinforcement learning. Below is the code that I wrote for deep Q learning: ...
Jahid Chowdhury Choton's user avatar
3 votes
1 answer
66 views

Python sklearn rolling yearly validation

I am trying to implement a simple modelling pipeline with rolling c.v., making use of the TimeSeries split. The code is provided below with a working example dataset. (please don't pay too much ...
Lucas Morin's user avatar
4 votes
2 answers
174 views

Matrix Factorisation class packaging methods for factorisation of explicit & implicit data matrices using Gradient Descent, SGD and ALS

Attached below, and also as this GitHub gist, is code for a Python class I wrote as part of a personal learning/portfolio project on collaborative-filtering recommender systems via matrix ...
Cosmic Fan's user avatar
5 votes
1 answer
110 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
2 votes
2 answers
337 views

Minimal AlphaGo algorithm implementation for game 2048, connect4

I'm writing tutorial code to help high school students understand the MuZero algorithm. There are two main requirements for this code. The code needs to be simple and easy for any student to ...
user281935's user avatar
1 vote
1 answer
110 views

Custom neural network implementation in TensorFlow to compare normalisation vs. no normalisation on data

I am performing a sports prediction multi-class classification problem, and wanted to compare the differences in model performance between normalised and non-normalised data. You can see the 2 ...
pastybake2002's user avatar
3 votes
1 answer
212 views

Machine learning training, hyperparameter tuning and testing with 3 different models

I am trying to solve a multi-class classification involving prediction the outcome of a football match (target variable = Win, Lose or Draw). With a dataset of 2280 rows, which is 6 seasons of ...
pastybake2002's user avatar
3 votes
1 answer
141 views

Keras Tuner Subclass for Time Series Cross-Validation

Custom Keras Tuner with Time Series Cross-Validation I have written my own subclass of the default Keras tuner Tune class. Objective: I needed a way to incorporate ...
Furkan Öztürk's user avatar
1 vote
0 answers
128 views

Convolutional Neural Network (CNN) in Julia

I wrote an n-dimensional convolutional neural network from scratch in Julia (check out the GitLab repo or the GitHub repo). It implements the following layer types: ...
Andy Sukowski-Bang's user avatar
0 votes
0 answers
22 views

Efficiently computing a batch of results given a batch assignment vector and series of corresponding matrices

I have a 1D tensor of tokens that belong to different batches. The batch sizes here are uneven. Each batch needs to be multiplied with a corresponding weight matrix. My current approach is using a ...
sidnb13's user avatar
-2 votes
1 answer
185 views

Design an algorithm to predict words based on a skeleton from a given dictionary

The model I'm building first selects a secret word at random from a list. The model which uses an API then returns a row of underscores (space separated)—one for each letter in the secret word—and ...
driver's user avatar
  • 232
1 vote
0 answers
49 views

Recurrent Neural Network loss is NAN

I am training a neural network to use approximately 600 features (4103rd to last column of a df) to predict approximately 4000 values (7th to 4102nd column of the same df). I have standardized the ...
Manas Garg's user avatar
2 votes
1 answer
197 views

Movie genre classification using machine learning

could you review my below code to train a machine learning model to classify movie genres? I've used the data from Kaggle ...
Thirupathi Thangavel's user avatar
7 votes
1 answer
683 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
2 votes
1 answer
138 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 ...
zellez11's user avatar
1 vote
0 answers
113 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
66 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
841 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
50 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
84 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-...
user avatar
1 vote
1 answer
214 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
39 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
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
1 vote
0 answers
43 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
104 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 ...
frix's user avatar
  • 357
1 vote
0 answers
34 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
72 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
104 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
  • 173
1 vote
1 answer
75 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
  • 173
3 votes
1 answer
238 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
158 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
123 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,713
4 votes
2 answers
1k 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,713
2 votes
1 answer
208 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
78 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
127 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
67 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
45 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
104 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
58 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
87 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
745 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
1 vote
1 answer
65 views

Logistic regression using Sklearn

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
  • 203
2 votes
1 answer
121 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
  • 29.1k
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
  • 29.1k

1
2 3 4 5 6