I was trying to use "spawn" from "child_process" to talk to the "ssh" utility (Ubuntu 20, bash 5.0, node 19.6), but got the message "Pseudo-terminal will not be allocated because stdin is not a terminal" (using "-t -t" made it bypass stdout and print directly to the terminal). In this case I can probably just use a dedicated module, but I doubt that it is the only program that is fussy about where its input is coming from and I'd like to avoid this issue in the future.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/kKRYGa3
So, I am trying to predict the model but its throwing error like it has 10 features but it expacts only 1. So I am confused can anyone help me with it? more importantly its not working for me when my friend runs it. It works perfectly fine dose anyone know the reason about it? cv = KFold(n_splits = 10) all_loss = [] for i in range(9): # 1st for loop over polynomial orders poly_order = i X_train = make_polynomial(x, poly_order) loss_at_order = [] # initiate a set to collect loss for CV for train_index, test_index in cv.split(X_train): print('TRAIN:', train_index, 'TEST:', test_index) X_train_cv, X_test_cv = X_train[train_index], X_test[test_index] t_train_cv, t_test_cv = t[train_index], t[test_index] reg.fit(X_train_cv, t_train_cv) loss_at_order.append(np.mean((t_test_cv - reg.predict(X_test_cv))**2)) # collect loss at fold all_loss.append(np.mean(loss_at_order)) # collect loss at order plt.plot(np.log(al...
Comments
Post a Comment