How To Rotate A Numpy Matrix | Python Tutorial

preview_player
Показать описание
In this video I show you how to rotate a Numpy matrix in Python

#python #pythontutorial #pythontutorialforbeginners #codingforbeginners #pythonai #pythonforbeginners #coding #pythonautomation #ai #pandas #numpy #datascience #compsci #coding #numpyarray #matrix #calculus
Рекомендации по теме
Комментарии
Автор

In my ML class we're studying decision trees. At any internal node in a decision tree, a test is executed on a set of data that partitions it into groups based on the values of at an index along the rows. For example:

[[ 1, 2, 'cat'],
[ 3, 4, 'dog'],
[ 5, 6, 'dog'],
[ 7, 8, 'giraffe]]

partitioned on index 3 would produce 3 groups of attribute vectors:
[[ 1, 2, 'cat']],
[[ 3, 4, 'dog'], [ 5, 6, 'dog']],
[[ 7, 8, 'giraffe]]

How would you do this in python? I've been stuck with this for a while😅

sorenschultz