Skip to main content

All Questions

Tagged with
1 vote
0 answers
57 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
220 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
2 votes
0 answers
56 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
1 answer
281 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 ...
watch-this's user avatar
2 votes
1 answer
91 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 ...
Ihsanul's user avatar
  • 23
6 votes
1 answer
189 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 ...
watch-this's user avatar
2 votes
1 answer
120 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, ...
Keagan McNew's user avatar
1 vote
0 answers
206 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 ...
Grayscale's user avatar
  • 127
2 votes
1 answer
2k views

Simple Genetic Algorithm in Python

For past few months I was trying to understand genetic algorithms (GA) and most of the materials availble in the web was not always easy for me. Then I came across this article written by Ahmed Gad ...
Eka's user avatar
  • 349
4 votes
1 answer
119 views

Set of one-hot encoders in Python

In the absence of feature-complete and easy-to-use one-hot encoders in the Python ecosystem I've made a set of my own. This is intended to be a small library, so I want to make sure it's as clear and ...
Felix's user avatar
  • 293
5 votes
1 answer
6k views

k-means using numpy

This is k-means implementation using Python (numpy). I believe there is room for improvement when it comes to computing distances (given I'm using a list comprehension, maybe I could also pack it in a ...
Adel Redjimi's user avatar
8 votes
2 answers
501 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. ...
maufcost's user avatar
  • 379
4 votes
1 answer
300 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 ...
Vivek Jha's user avatar
  • 297
3 votes
2 answers
121 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 ...
user avatar
6 votes
3 answers
10k 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 ...
Hericks's user avatar
  • 351

15 30 50 per page