Last active
April 20, 2018 19:15
-
-
Save freedomtowin/4c71ba34afb4d593228ef8d1e6b0bf3b to your computer and use it in GitHub Desktop.
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
X = train[['bedrooms','bathrooms']].values | |
y = (train['sqft_living'] > np.mean(train['sqft_living'])).reshape(len(train),1) | |
model = linear_model.LogisticRegression() | |
model.fit(X, y) | |
X = train[['bedrooms','bathrooms']].values | |
start_time = time.time() | |
model = kernel_optimizer(X,y,liklihood_loss,num_param=3) | |
model.add_intercept() | |
model.adjust_bias_parameters(n_parameter_updates=100,random_sample_num=100) | |
model.adjust_variance_parameters(select_n_parameters=100) | |
model.kernel_optimize_(optimizer=pid_linear_combination) | |
end_time = time.time() | |
print("time:",time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment