2022 Developer Survey is open! Take survey.

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
-3 votes
1 answer
52 views

Database design for a recommendation system [closed]

I am new to databases and I am trying to design a database for a project that I am currently working on, so I wanted to know if this design is good or not. knowing that the database should serve a ...
user avatar
  • 35
1 vote
1 answer
65 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 ...
user avatar
1 vote
0 answers
21 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 ...
user avatar
2 votes
0 answers
34 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 ...
user avatar
0 votes
0 answers
28 views

MNIST classifier and autoencoder: 2 in 1 deal

I built an autoencoder with a latent space of dimension 10 that doubles as a classifier (the predicted digit is the argmax of the latent space). This was obtained by optimizing both the digit ...
user avatar
  • 27k
0 votes
0 answers
25 views

Recurrent neural network producing the same output for all predictions

I've been trying to create a toxic comment 'rater' from this Kaggle challenge. The training data consists of a number of comments with scorers on whether it was toxic, severely toxic, obscene, a ...
user avatar
  • 151
1 vote
0 answers
22 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 ...
user avatar
  • 163
1 vote
1 answer
56 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 ...
user avatar
  • 163
3 votes
1 answer
91 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 ...
user avatar
1 vote
0 answers
57 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 ...
user avatar
3 votes
1 answer
48 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. ...
user avatar
  • 1,151
4 votes
2 answers
496 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). ...
user avatar
  • 1,151
2 votes
1 answer
61 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 ...
user avatar
4 votes
1 answer
56 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 ...
user avatar
0 votes
0 answers
30 views

To scale or not to scale in regression and classification algorithms

I'm a new DS student, and I get the basic concept of Standardisation, whilst I was learning we used StandardScaler in some algorithms, and not in others on the same dataset, and I'm still confused as ...
user avatar
  • 125
1 vote
0 answers
62 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 ...
user avatar
  • 189
2 votes
0 answers
49 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 ...
user avatar
0 votes
0 answers
66 views

Implement the XOR Gate using a 2-layer neural net with just Python & NumPy

I wrote a 2-layer neural net with just Python & NumPy to implement the XOR Gate, here is the code ...
user avatar
  • 189
1 vote
0 answers
38 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 ...
user avatar
  • 189
0 votes
1 answer
37 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 ...
user avatar
  • 189
0 votes
0 answers
75 views

Logistic Regression for MNIST binary classification

I wrote a Logistic Regression model that classifies MNIST digits. I used tensorflow & keras only for import the dataset. ...
user avatar
  • 189
0 votes
0 answers
10 views

Ratio of intra-class scatter by inter-class scatter is getting minimised by linear discrimination process

This question is complicated (at least for me who is new in machine learning and image processing). I need help in understanding, why my iterative process is minimising the ratio of inter-class ...
user avatar
2 votes
0 answers
28 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: ...
user avatar
0 votes
0 answers
18 views

Predicting with multiple independent hot-encoded variables

My attempt at multiple linear regression. I am trying to make a qualified guess about a user's rating of a movie, through machine learning. I am new to this, so my judgement isn't the best. And I am ...
user avatar
  • 101
2 votes
2 answers
72 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 ...
user avatar
  • 31
8 votes
3 answers
705 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 ...
user avatar
0 votes
0 answers
25 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: ...
user avatar
  • 151
2 votes
1 answer
104 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 ...
user avatar
  • 189
2 votes
1 answer
65 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 ...
user avatar
  • 25.3k
1 vote
1 answer
49 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. ...
user avatar
  • 25.3k
7 votes
1 answer
74 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 ...
user avatar
  • 173
0 votes
0 answers
37 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 ...
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! ...
user avatar
  • 1,151
0 votes
0 answers
23 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 ...
user avatar
3 votes
1 answer
169 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 ...
user avatar
  • 983
1 vote
0 answers
50 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 ...
user avatar
  • 111
0 votes
2 answers
45 views

Machine Learning Program

I've written a program that finds the difference between data and gives output. Here's the code: ...
user avatar
  • 101
1 vote
0 answers
394 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 ...
user avatar
0 votes
2 answers
221 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 ...
user avatar
2 votes
0 answers
42 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 ...
user avatar
  • 43
2 votes
0 answers
41 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 ...
user avatar
1 vote
0 answers
29 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 ...
user avatar
2 votes
1 answer
122 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, ...
user avatar
3 votes
0 answers
23 views

Transfer learning CNNs for image classification in TensorFlow

This code works, and I'm pretty sure it's mathematically/algorithmically correct: ...
user avatar
  • 503
2 votes
0 answers
19 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 ...
user avatar
  • 121
3 votes
0 answers
592 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 ...
user avatar
4 votes
0 answers
79 views

Using VAE for reconstructing images

Article: https://arxiv.org/pdf/2009.07047v1.pdf Full Code: https://colab.research.google.com/drive/1KZZuIa7Lk13ImZLJ3b-kxMfcveOPaWvN#scrollTo=XhdMfBFtzaEH Dataset: https://drive.google.com/file/d/...
user avatar
  • 41
1 vote
0 answers
71 views

Implementing Convolutional Neural Network

Context I was making a Convolutional Neural Network from scratch in Python. I completed making it .... It works fine ... The only thing is that it takes a lot of time as the size of the input grows. ...
user avatar
3 votes
2 answers
283 views

C++ performance: Linear regression in other way

Here is the code that can be used for calculation of mathematical function, like ax^2 + bx + c. It is fast enough if you choose small length, otherwise if ...
user avatar
  • 197
1 vote
0 answers
52 views

How to handle overfitting in Random Forest

I have a random forest model I built to predict if NFL teams will score more combined points than the line Vegas has set. The features I use are Total - the total ...
user avatar

1
2 3 4 5 6