Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Silhouette Coefficient | |
s = \frac{b - a}{\max\{a,b\}} | |
Zakres wartośći | |
s = \begin{cases} | |
1-a/b, & \mbox{jeśli } \,\,\,a < b \\ | |
0, & \mbox{jeśli } \,\,\,a = b \\ | |
b/a-1, & \mbox{jeśli } \,\,\,a > b \\ | |
\end{cases} |
This file contains 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
# Java | |
sudo add-apt-repository ppa:webupd8team/java | |
# Enter | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# Enter | |
# Enter | |
# Yes | |
# Spark |
This file contains 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 pandas as pd | |
import numpy as np | |
dataTrain = pd.DataFrame({'county': ['Cochice', 'Pima', 'Santa Cruz', 'Maricopa', 'Yuma']}) | |
dummiesTrain = pd.get_dummies(dataTrain) | |
dataLive = pd.DataFrame({'county': ['Santa Cruz','Poznań', 'Pima']}) | |
dummiesLive = pd.get_dummies(dataLive) |
This file contains 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
for pollutant in pollutants: | |
print pollutant | |
scores = [] | |
inputData = oneHour[[pollutant, "lat", "long"]] | |
predictData = inputData[~pd.notnull(inputData[pollutant])] | |
trainData = inputData[pd.notnull(inputData[pollutant])] | |
X = trainData[["lat", "long"]] | |
y = trainData[pollutant] | |