Skip to content

Commit

Permalink
convolution work and added pylint ignore on import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
carmelgafa committed Oct 12, 2024
1 parent 839d7b1 commit 6806ebc
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 78 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# ml_algorithms

solved machine learning algorithms

1 change: 0 additions & 1 deletion activate.bat

This file was deleted.

1 change: 0 additions & 1 deletion deactivate.bat

This file was deleted.

65 changes: 0 additions & 65 deletions environment_creator.py

This file was deleted.

Empty file removed ml_algorithms/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions ml_algorithms/src/algorithms/cnn/conv2d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

#pylint: disable = E0401
import torch

input_list = [[1, 6, 2],
Expand Down
16 changes: 10 additions & 6 deletions ml_algorithms/src/algorithms/cnn/image_convolution.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import matplotlib.pyplot as plt

#pylint: disable = E0401
import os
import cv2
import matplotlib.pyplot as plt

def process_image(image_path):
'''load and convert image to grayscale'''
Expand All @@ -12,12 +15,13 @@ def process_image(image_path):

plt.imshow(image, cmap='gray')
plt.show()
return image



if __name__ == '__main__':
image_path = 'bud.jpg'
image = process_image(image_path)
cv2.imshow('image', image)
cv2.waitKey(0)
bud_path = 'bud.jpg'

bud_image = process_image(bud_path)
cv2.imshow('image', bud_image)
cv2.waitKey(0)
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@


#pylint: disable = E0401
import os
import pandas as pd
import sys

from univariate_gd_analysis import plot_univariate_gd_analysis
from algorithms.linear_regression.univariate_gd_analysis import plot_univariate_gd_analysis



Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

#pylint: disable = E0401
import os
import pandas as pd

Expand All @@ -17,6 +19,7 @@
print(df_data['y'].std())


normalized_data_path = os.path.join(os.path.dirname(__file__),'..', 'data_generation', 'data_1f_norm.csv')
normalized_data_path = os.path.join(
os.path.dirname(__file__),'..', 'data_generation', 'data_1f_norm.csv')

df_data.to_csv(normalized_data_path, header=True, index=False)
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
'''script to plot the cost surface and the gradient descent points'''

#pylint: disable = E0401
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

#pylint: disable = E0401
import pandas as pd
import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

#pylint: disable = E0401
import numpy as np
import matplotlib.pyplot as plt

Expand Down
2 changes: 2 additions & 0 deletions ml_algorithms/src/algorithms/logistic_regression/lr_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

#pylint: disable = E0401
import numpy as np
import h5py
import os
Expand Down
2 changes: 0 additions & 2 deletions setup.py

This file was deleted.

0 comments on commit 6806ebc

Please sign in to comment.