Machine learning provides computer algorithms that automatically discover patterns in data and make intelligent decisions from them.
4
votes
0answers
48 views
Modified Taylor diagrams
There is a type of diagram summarizing how well predictions from numerical models fit expectations; one obvious use case is comparing machine-learning regression models. Modified Taylor diagrams are ...
3
votes
2answers
30 views
loopification of highly procedureal, though fully functional, multiclass perceptron
I've implemented the multiclass perceptron in the one vs. all style.
I just thought about it and tried to implement it in the most basic way. I think it's correct though my f_measure is a bit low. ...
3
votes
1answer
42 views
Perceptron algorithm
This is the Perceptron algorithm, I wrote this implementation with my friend. It gets the job done, but it's quite dirty, perhaps one of you stylish hackers might help me beautify this beast.
This ...
1
vote
0answers
16 views
Implementation of Logistic Regression
Is this kind of vectorized operations the most efficient way to do this in matlab? Any critics about my code? Am I doing something wrong (i tested several times, I think it works). Notice that I use J ...
2
votes
1answer
43 views
ANFIS network based on Sugeno model I
I've been learning Common Lisp lately and I've implemented ANFIS network based on Sugeno model I.
Network layout and details can be read in these slides by Adriano Oliveira Cruz.
I use sigmoid as the ...
4
votes
1answer
44 views
Generate and store hypernyms for all words in a hashmap
I have a system which reads in a clause in the form of a prolog "fact", i.e. 'is'('a sentence', 'this').. I want to generalize this up into higher-order classes and ...
4
votes
2answers
101 views
Inefficient hash map operation provokes OutOfMemory: Java heap space error
I know I can increase the size of the heap but that seems like a poor solution.
This program runs correctly on small files but when run on large data sets it crashes with the OutOfMemory: Java heap ...
0
votes
0answers
60 views
Simple k-means implemention using Python3 and Pandas
Is there anything I can improve? The distance function is Pearson correlation.
...
0
votes
1answer
51 views
Linear regression with visualization
I have created a small script that:
Creates a lot of random points.
Runs a small brute force search to find a rect that has a low error, that is a good fit for the data.
Runs a linear regression on ...
2
votes
3answers
68 views
Refactor jaccard similarity the “Scala way”
I'm trying to pick Scala up. This is a simple heuristic that checks a similarity value between two sets. I've done this a million times in Java or Python. The function works, but I'm certain I am not ...
6
votes
1answer
186 views
K-nearest neighbours in C# for large number of dimensions
I'm implementing the K-nearest neighbours classification algorithm in C# for a training and testing set of about 20,000 samples and 25 dimensions.
There are only two classes, represented by ...
2
votes
0answers
108 views
Implementation of a new algorithm for sklearn
In the Python library, sklearn is implemented the algorithm for SparsePCA.
I have written the code for a another version of this algorithm that is much faster in some situations. I have not enough ...
0
votes
0answers
289 views
Stochastic gradient descent squared loss
I have implemented stochastic gradient descent in matlab and I would like to compare my results with another source but the error I am getting is higher (I am using squared error). I am worried I am ...
1
vote
1answer
65 views
Compute logistic regression on tweet objects
Is my approach good to naming variables and exception handling? I would like to make this code more robust and maintainable. I need advice on exception handling, var naming and comments.
...
5
votes
2answers
166 views
Defensive programming type-checking
I have issues with dynamically typed languages, and I tend to worry about type a lot.
Numpy has different behaviour depending on if something is a matrix or a plain ndarray, or a list. I didn't ...
10
votes
1answer
1k views
Clojure Neural Network
After reading this article about Neural Networks I was inspired to write my own implementation that allows for more than one hidden layer.
I am interested in how to make this code more idiomatic - ...
5
votes
1answer
757 views
Why does the LR on spark run so slowly?
Because the MLlib does not support the sparse input, I ran the following code, which supports the sparse input format, on spark clusters. The settings are:
5 nodes, each node with 8 cores (all the ...
7
votes
2answers
491 views
Python neural network: arbitrary number of hidden nodes
I'm trying to write a neural network that only requires the user to specify the dimensionality of the network. Concretely, the user might define a network like this:
...
4
votes
1answer
3k views
Alternative to Python's Naive Bayes Classifier for Twitter Sentiment Mining
I am doing sentiment analysis on tweets. I have code that I developed from following an online tutorial (found here) and adding in some parts myself, which looks like this:
...
5
votes
1answer
895 views
Simple Neural Network in Java
I had an assignment some weeks ago that consisted of making a simple McCulloch-Pitts neural network. I ended up coding it in a pretty OO style (or the OO style I've been taught), and I felt that my ...
3
votes
2answers
326 views
C++ and STL - Machine Learning Problem
I would like to get some general comments on style and use of STL in particular. This is some code I wrote to do machine learning classification (logistic regression). Any suggestions would be very ...
8
votes
2answers
881 views
Using Viterbi algorithm to analyze sentences
I've probably done some pretty horrendous things here, but I'm throwing it out for people to give me some feedback that I can start using to immediately improve my Clojure coding style.
Additional ...
5
votes
1answer
229 views
Performing machine learning
I've written the code below to do some work on machine learning in R. I'm not overly happy with some bits of it, and I suspect I could improve it quite a bit. Bits I'm specifically interested in ...