-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from numpy.linalg import norm | |
| class Kmeans: | |
| '''Implementing Kmeans algorithm.''' | |
| def __init__(self, n_clusters, max_iter=100, random_state=123): | |
| self.n_clusters = n_clusters | |
| self.max_iter = max_iter |