Classification using Tensorflow

Neural networks can also be designed to classify data. As with the previous classifier, they can generate a probability of belonging to a class, and as such, we can use the threshold we want for the precision we require.

This example will be our first real dive into neural networks. Just as for the previous case, we will use placeholders, but instead of explicitly setting variables, we will use standard Tensorflow functions to create them.

Just as before, we will use the same data with all our current features:

X = np.asarray([get_features(aid, ['LinkCount', 'NumCodeLines',                                    'NumTextTokens', 'AvgSentLen',                                    'AvgWordLen', 'NumAllCaps',                                    'NumExclams']) for aid in all_answers])Y = np.asarray([meta[aid]['Score'] ...

Get Building Machine Learning Systems with Python - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.