<jupyter_start><jupyter_text>**boston house regression ann model**<jupyter_code>from keras.models import Sequential
from keras.layers import Dense
import numpy as np
from sklearn.datasets import load_boston 
from sklearn.preprocessing import StandardScaler,OneHotEncoder
from sklearn.model_selection import train_test_split
bhouse=load_boston()
print(bhouse.feature_names)
print(bhouse.DESCR)
input_data=bhouse.data
target_class=bhouse.target 
scaler = StandardScaler()
input_scaled = scaler.fit_transform(input_data)
print(input_scaled)
x_train,x_test,y_train,y_test = train_test_split(input_scaled,target_class,test_size=0.3)
print(x_train)

model = Sequential()
h1=model.add(Dense(50, activation='relu'))
h2=model.add(Dense(100, activation='relu'))
h3=model.add(Dense(50, activation='relu'))
o=model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='adam',metrics=['accuracy'])
model.fit(x_train,y_train,batch_size=10,epochs=1000,shuffle=True,verbose=2)
model.summary()
score = model.evaluate(x_test,y_test, verbose=0)
print('Test loss:', score[0])
print('Test accuracy:', score[1])
prediction = model.predict(x_test)
y_0 = prediction[0][0]
print('Prediction with scaling - {}',format(y_0))
y_0 -= added
y_0 /= multiplied_by
print("Housing Price Prediction  - ${}".format(y_0))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13650075414781296, 'fraction_numerical': 0.02262443438914027, 'mean_word_length': 10.15126050420168, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '238818', 'license': 'MIT', 'n_tokens_mistral': 499, 'n_tokens_neox': 484, 'n_words': 79, 'path': 'boston_house_regression_ann_model.ipynb', 'repo_name': 'parul21/data_analyrics', 'size': '1326'}