请以Python代码的形式回答使用Scikit-learn库计算随机森林模型的准确性。
user
```python
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import numpy as np

# 假设我们有一些数据
X = np.random.rand(100, 10)  # 100样本，10特征
y = np.random.randint(2, size=100)  # 二分类目标变量

# 将数据分为训练集和测试集
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# 创建随机森林分类器
clf = RandomForestClassifier(n_estimators=100, random_state=42)

# 训练模型
clf.fit(X_train, y_train)

# 预测测试集
y_pred = clf.predict(X_test)

# 计算准确性
accuracy = accuracy_score(y_test, y_pred)
print(f"模型准确性: {accuracy * 100:.2f}%")
```
assistant