Live data from Hacker News

Using Machine Learning and Node.js to detect the gender of Instagram Users

totems.co

31–40 of 56 posts

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#31
post #29
post #8

Earlier quoted context omitted.

@yid. I'd be curious to understand why you think they would ban us? For using the tokens this way? Well they know everything about our usage of these tokens, and any analytics tool out there behave similarly, right?

> For using the tokens this way? Well they know everything about our usage of these tokens, and any analytics tool out there behave similarly, right? Yes, for using what are intended as per-user activity tokens for public scraping (which the user who has been issued the token has not requested). As you said, you can assemble a firehose using this method, and if they'd wanted apps to access a firehose, they'd have com…

> if they'd wanted apps to access a firehose, they'd have come up with an API for it.

This is a quite idealistic view of the problem. But it probably holds some truth I have to admit.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#32
Neural networks have their place, but are probably the most complicated and opaque machine learning tool. They are also hard to set up: so many parameters! Given that, I found it really strange that they went straight for a neural network (and then implemented one themselves!). Surely the place to start would be Naive Bayes, followed up with regularized logistic regression (through something like glmnet). Heck, even random forests would do quite well on this task I imagine, although thats getting closer to on the complexity and opaqueness spectrum towards NN.

There is also no evidence of doing cross-validation, and in another comment they say they used entire data set to do variable selection - a pretty bad mistake. They justify by saying they aren't in an academic environment, but thats kind of a bad excuse, as given the way they've done it I'm very unsure whether they actually are getting the accuracy they think they are.

I also worry that they sunk two man-months into this when they could probably have achieved similar if not better results with off-the-shelf and battled-tested tools. Sets off a lot of warning bells.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#33
post #2

It's unusual to see a coherent, from-first-principles explanation of a neural network. Especially one that's commercially valuable (i presume) to Totems. Mildly alarmed to learn I'm only .039 probability male, though - better bloke it up on Instagram.

What's so alarming about being thought female?

That's a very binary take on gender.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#34
post #2

It's unusual to see a coherent, from-first-principles explanation of a neural network. Especially one that's commercially valuable (i presume) to Totems. Mildly alarmed to learn I'm only .039 probability male, though - better bloke it up on Instagram.

that's okay, I'm only male with a probability of 0.01. Hint: I'm male.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#36

This is a great example of how privacy is not optional, even in "opt-in" systems such as Instagram and FB. That Instagram does not require you to have a Facebook profile, and Facebook does not require you to list gender means very little in terms of your own privacy. Merely choosing to withhold information about yourself does not insulate you from a breach of privacy. That others do disclose such information allows 3…

> There's a strange morality here: at what point is it unethical to voluntarily disclose data about oneself, if it could be used in a way to harm someone else's privacy?

At what point is it unethical to exhale, given that carbon dioxide is toxic to humans and is a greenhouse gas? At what point is it unethical to vote, given that you might influence an election in a way that is bad for society or some subset of society?

It's true that nearly every (and the "nearly" is just a hedge) action we take has some negative externality. I personally don't lose sleep over the ones that are virtually impossible to measure.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#37
post #35

PROBABILITY FEMALE: 0.003 PROBABILITY MALE: 0.999 Errr, so it's out of 1.002?

On many machine learning algorithms, the pattern matcher doesn't return probabilities, rather confidences on a range of 0 to 1. The higher confidence wins.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#38
Your implementation of momentum seems off, you just add a multiple of last error, instead of adding exponentially declining contributions from the past. I think you want

    double dW = alpha_ * val_[l][j] * D_[l+1][i] + beta_ * dW_[l+1][i][j];
    W_[l+1][i][j] += dW;
If you want to get an output class probability, softmax is the standard way. Minimize KL-divergence instead of squared error.

You don't seem to be doing any regularization. It could maybe give you better generalization.

I think you could get a speedup by doing your linalg with blas, I guess this would complicate the code though, making it a tradeof.

Training on multiple threads and averaging is a nice touch. It would be interesting to hear if (how much) it improved your results.

Re: Using Machine Learning and Node.js to detect the gender of Instagram Users

#40
post #2

It's unusual to see a coherent, from-first-principles explanation of a neural network. Especially one that's commercially valuable (i presume) to Totems. Mildly alarmed to learn I'm only .039 probability male, though - better bloke it up on Instagram.

What's so alarming about being thought female?

If you're looking to avoid disclosing personal data, then it's a positive. On the other hand, if you're actually making use of a service, then it would probably lead to a lot of unwanted targeted information. Then, assuming a future of ambient intelligence where most people don't question machine mined data (I'd say an inevitability), you'd probably have a lot of awkward moments ensue, especially if public and private institutions hold data to be sacrosanct.
Post reply on HN