我正在为scikit-learn库添加一个新的估算器,但make命令总是退出并显示以下错误消息:
public class Main {
public static void main(String[] args) {
int sum = 0;
int t = 3;
while (sum < 1000) {
if (sum % 3 == 0)
sum += t;
}
int sum2 = 0;
int f = 5;
while (sum2 < 1000) {
if (sum % 5 == 0)
sum += f;
}
int sum3 = sum + sum2;
System.out.println(sum3);
}
}
问题是什么以及如何解决?
错误日志:
AssertionError: Estimator PCR should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.
答案 0 :(得分:0)
有关如何在scikit-learn中使用random_state的详细讨论,请访问以下链接:http://scikit-learn.org/dev/developers/contributing.html#random-numbers。我能够通过它完成解决方案。