from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import VotingRegressor
from sklearn.metrics import mean_squared_error

# Load the California housing dataset
california = fetch_california_housing()

# Split the data into training and test sets
X_train, X_test, y_train, y_test = train_test_split(california.data, california.target, test_size=0.2, random_state=42)

# Create the individual regression models
lr = LinearRegression()
dt = DecisionTreeRegressor()

# Create the voting regressor by combining the individual models
vr = VotingRegressor([('lr', lr), ('dt', dt)])

# Train the voting regressor on the training data
vr.fit(X_train, y_train)

# Make predictions on the test data using the voting regressor
y_pred = vr.predict(X_test)

# Evaluate the performance of the voting regressor
mse = mean_squared_error(y_test, y_pred)
print("Mean squared error:", mse)