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
from decimal import Decimal, getcontext | |
import numpy as np | |
from math import isfinite | |
EPS = np.finfo(float).eps | |
class ComplexDecimal(object): | |
def __init__(self, real, imag): |
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 matplotlib.pyplot as plt | |
import pandas as pd | |
import numpy as np | |
from sklearn.preprocessing import Imputer | |
from sklearn.feature_selection import ( | |
SelectKBest, MutualInfoSelector, f_regression) | |
from sklearn.linear_model import RidgeCV | |
from sklearn.model_selection import cross_val_score | |
data = pd.read_csv('communities.data', header=None) |
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 matplotlib.pyplot as plt | |
import numpy as np | |
from sklearn.datasets import load_digits | |
from sklearn.feature_selection import RFE, MutualInfoSelector | |
from sklearn.preprocessing import minmax_scale | |
from sklearn.svm import LinearSVC | |
from sklearn.model_selection import cross_val_score | |
digits = load_digits() | |
X = minmax_scale(digits.data) |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import load_diabetes, load_boston | |
from sklearn.ensemble import RandomForestRegressor | |
from sklearn.model_selection import cross_val_score | |
from sklearn.feature_selection import (SelectKBest, MutualInfoSelector, | |
f_classif, f_regression) | |
from sklearn.pipeline import make_pipeline | |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import (load_digits, load_breast_cancer, | |
load_diabetes, load_boston) | |
from sklearn.linear_model import RidgeCV | |
from sklearn.preprocessing import minmax_scale | |
from sklearn.model_selection import cross_val_score | |
from sklearn.feature_selection import (SelectKBest, MutualInfoSelector, | |
f_classif, f_regression) | |
from sklearn.svm import LinearSVC |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import (load_digits, load_breast_cancer, | |
load_diabetes, load_boston) | |
from sklearn.linear_model import RidgeCV | |
from sklearn.preprocessing import minmax_scale | |
from sklearn.model_selection import cross_val_score | |
from sklearn.feature_selection import (SelectKBest, MutualInfoSelector, | |
f_classif, f_regression) | |
from sklearn.svm import LinearSVC |
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
from __future__ import print_function | |
import numpy as np | |
from leastsqbound import leastsqbound | |
def fun(x): | |
return np.array([10 * (x[1] - x[0]**2), (1 - x[0])]) | |