back propagation algorithm
back propagation algorithm
% Rules
sibling(A, B) :- parent(P, A), parent(P, B), A \= B. % A and B are siblings if they share a parent and are
not the same person
% Rules
sibling(A, B) :- parent(P, A), parent(P, B), A \= B. % A and B are siblings if they share a parent and are
not the same person
% Rules
sibling(A, B) :- parent(P, A), parent(P, B), A \= B. % A and B are siblings if they share a parent and are
not the same person
grandparent(G, C) :- parent(G, P), parent(P, C). % G is a grandparent of C if G is a parent of P and P is
a parent of C
% Rules
sibling(A, B) :- parent(P, A), parent(P, B), A \= B. % A and B are siblings if they share a parent and are
not the same person
sibling(A, B) :- parent(P, A), parent(P, B), A \= B. % A and B are siblings if they share a parent and are
not the same person
import numpy as np
import pandas as pd
iris = load_iris()
X = iris.data # Features
y = iris.target # Labels
clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
# Evaluate the model
print(export_text(clf, feature_names=iris.feature_names))
plt.figure(figsize=(12, 8))
plt.show()