All Questions
Tagged with numpy machine-learning
25 questions
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...