Softwarearchitektur Meetup, Hamburg, Januar 2019
if age < 25:
if speed > 140:
return red # young people, fast cars: high risk
else:
return yellow # young people: medium risk
if age > 75:
return red # old people: high risk
if miles_per_year > 30:
return red # a lot of driving: high risk
if miles_per_year > 20:
return yellow # a bit of driving: medium risk
return green # otherwise: low risk
Looking at the problem from the perspective of our data
Training
from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier()
clf.fit(X_train, y_train)
Prediction
y_pred = clf.predict(input)
https://scikit-learn.org/stable/modules/classes.html
Network Setup
model = keras.Sequential()
model.add(Dense(100, name='hidden1', activation='relu', input_dim=3))
model.add(Dense(100, name='hidden2', activation='relu'))
model.add(Dense(3, name='softmax', activation='softmax'))
Training Score
Test Score
Training and test scores clearly divert
Model
model.add(Dense(units=50, input_dim=3))
model.add(Dense(units=3, activation='softmax'))
model.compile(loss='categorical_crossentropy')
Training
model.fit(X_train, y_train, epochs=1000, batch_size=1000)
Prediction
y_pred = model.predict([[100, 47, 10]])
https://colab.research.google.com/github/djcordhose/ai/blob/master/notebooks/tensorflow/nn-training.ipynb
Consciousness or autonomous learning
does not exit in machines
AI and machine learning is not like super-humans
Softwarearchitektur Meetup - Machine Learning: Das Ende der Businesslogik?
Oliver Zeigermann / @DJCordhose /
embarc GmbH
http://bit.ly/hh-arch-ml