-
-
Save marcosatanaka/4daabfd34304455a8dbabe3e723ee6c3 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
# Cria um regressor (DecisionTree) com o parâmetro 'max_depth | |
# otimizado para os dados de treinamento | |
regressor = fit_model(X_train, y_train) | |
print "O parâmetro 'max_depth' otimizado " \ | |
"para o modelo é {}.\n".format(regressor.get_params()['max_depth']) | |
client_data = [[5, 17, 15], # Imóvel 1 | |
[4, 32, 22], # Imóvel 2 | |
[8, 3, 12]] # Imóvel 3 | |
# Mostra as estimativas | |
for i, price in enumerate(regressor.predict(client_data)): | |
print "Preço estimado para o imóvel {}: ${:,.2f}".format(i+1, price) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment