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
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "time" | |
| ) |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| ) | |
| const TOKEN = "TOKEN" |
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 graphviz as gv | |
| path = ['Purchase order', | |
| 'Approved', | |
| 'RELEASED (5% delta possible)', | |
| 'Goods Reciept', | |
| 'Invoice Reciept (Logistics invoice) blocked', | |
| 'Invoice Reciept header updated', | |
| 'Invoice Reciept item updated', | |
| 'Invoice Reciept item updated', |
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
| OLS Regression Results | |
| ============================================================================== | |
| Dep. Variable: price R-squared: 0.663 | |
| Model: OLS Adj. R-squared: 0.662 | |
| Method: Least Squares F-statistic: 1307. | |
| Date: Thu, 24 May 2018 Prob (F-statistic): 0.00 | |
| Time: 01:15:33 Log-Likelihood: -18811. | |
| No. Observations: 2000 AIC: 3.763e+04 | |
| Df Residuals: 1997 BIC: 3.764e+04 | |
| Df Model: 3 |
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
| OLS Regression Results | |
| ============================================================================== | |
| Dep. Variable: price R-squared: 0.668 | |
| Model: OLS Adj. R-squared: 0.667 | |
| Method: Least Squares F-statistic: 2078. | |
| Date: Thu, 24 May 2018 Prob (F-statistic): 0.00 | |
| Time: 02:44:43 Log-Likelihood: -2.8798e+06 | |
| No. Observations: 319973 AIC: 5.760e+06 | |
| Df Residuals: 319663 BIC: 5.764e+06 | |
| Df Model: 309 |
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
| *Тип продоцва* | |
| * seller_privat -205444.22101121597 | |
| * seller_gewerblich -205673.3093386303 | |
| *Тип автомобиля* | |
| vehicleType_cabrio -44260.151805165566 | |
| vehicleType_suv -44576.076239830596 | |
| vehicleType_coupe -45335.92636625235 | |
| vehicleType_bus -45359.941105251564 | |
| vehicleType_limousine -45458.52066895459 |
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
| targets_path = "/Users/nikitakrutoy/playground/ml-practice-homework/hw5/data/svmlin/targets" | |
| objects_path = "/Users/nikitakrutoy/playground/ml-practice-homework/hw5/data/svmlin/objects" | |
| # svmlight data | |
| train_path = "/Users/nikitakrutoy/playground/ml-practice-homework/hw5/data/svmlin/train" | |
| with open(train_path, "r") as f: | |
| objects_file = open(objects_path, "w") | |
| targets_file = open(targets_path, "w") | |
| while True: |
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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| namespace Homework | |
| { | |
| class Pathway{ | |
| private char _begin; | |
| private char _end; |
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
| reload(hw3code) | |
| print("No cut") | |
| bias, variance = hw3code.compute_bias_variance(DecisionTreeRegressor(), np.sin) | |
| print("Bias %5f Variance %5f" % (bias, variance)) | |
| print() | |
| reload(hw3code) | |
| print("Depth 2") | |
| bias, variance = hw3code.compute_bias_variance(DecisionTreeRegressor(max_depth=2), np.sin) | |
| print("Bias %5f Variance %5f" % (bias, variance)) |
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
| def compute_bias_variance(regressor, dependence_fun, x_generator=np.random.uniform, noise_generator=np.random.uniform, | |
| sample_size=300, samples_num=300, objects_num=200, seed=1234): | |
| """ | |
| После генерации всех необходимых объектов, должна вызываться функция compute_bias_variance_fixed_samples. | |
| Рекомендации: | |
| * Создайте вектор объектов для оценивания интеграла по $x$, затем вектор зашумленных правильных ответов. | |
| Оцените мат. ожидание шума с помощью генерации отдельной шумовой выборки длины objects_num. | |
| * Проверить правильность реализации можно на примерах, которые разбирались на семинаре и в домашней работе. |
NewerOlder