Skip to content

Commit

Permalink
happy new year
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Nikolaev committed Sep 17, 2017
1 parent e6b5569 commit b8c88c3
Show file tree
Hide file tree
Showing 9 changed files with 1,179 additions and 0 deletions.
Binary file added ML17-fall/.DS_Store
Binary file not shown.
Binary file added ML17-fall/homeworks-practice/.DS_Store
Binary file not shown.

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions ML17-fall/homeworks-practice/homework-practice-01/functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
def prod_non_zero_diag(x):
"""Compute product of nonzero elements from matrix diagonal.
input:
x -- 1-d numpy array
output:
product -- integer number
Not vectorized implementation.
"""

pass


def are_multisets_equal(x, y):
"""Return True if both vectors create equal multisets.
input:
x, y -- 1-d numpy arrays
output:
True if multisets are equal, False otherwise -- boolean
Not vectorized implementation.
"""

pass


def max_after_zero(x):
"""Find max element after zero in array.
input:
x -- 1-d numpy array
output:
maximum element after zero -- integer number
Not vectorized implementation.
"""

pass


def run_length_encoding(x):
"""Make run-length encoding.
input:
x -- 1-d numpy array
output:
elements, counters -- integer iterables
Not vectorized implementation.
"""

pass

def convert_image(img, coefs):
"""Sum up image channels with weights from coefs array
input:
img -- 3-d numpy array (H x W x 3)
coefs -- 1-d numpy array (length 3)
output:
img -- 2-d numpy array
Not vectorized implementation.
"""

pass


def pairwise_distance(x, y):
"""Return pairwise object distance.
input:
x, y -- 2d numpy arrays
output:
distance array -- 2d numpy array
Not vectorized implementation.
"""

pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import numpy as np

def prod_non_zero_diag(x):
"""Compute product of nonzero elements from matrix diagonal.
input:
x -- 1-d numpy array
output:
product -- integer number
Vectorized implementation.
"""

pass


def are_multisets_equal(x, y):
"""Return True if both vectors create equal multisets.
input:
x, y -- 1-d numpy arrays
output:
True if multisets are equal, False otherwise -- boolean
Vectorized implementation.
"""

pass


def max_after_zero(x):
"""Find max element after zero in array.
input:
x -- 1-d numpy array
output:
maximum element after zero -- integer number
Vectorized implementation.
"""

pass


def run_length_encoding(x):
"""Make run-length encoding.
input:
x -- 1-d numpy array
output:
elements, counters -- integer iterables
Vectorized implementation.
"""

pass

def convert_image(img, coefs):
"""Sum up image channels with weights from coefs array
input:
img -- 3-d numpy array (H x W x 3)
coefs -- 1-d numpy array (length 3)
output:
img -- 2-d numpy array
Vectorized implementation.
"""

pass


def pairwise_distance(x, y):
"""Return pairwise object distance.
input:
x, y -- 2d numpy arrays
output:
distance array -- 2d numpy array
Vctorized implementation.
"""

pass

Large diffs are not rendered by default.

Binary file added ML17-fall/homeworks-theory/.DS_Store
Binary file not shown.
Binary file not shown.
169 changes: 169 additions & 0 deletions README-16-17.md

Large diffs are not rendered by default.

0 comments on commit b8c88c3

Please sign in to comment.