我对 Python 很陌生。我想得到像 R 中的逻辑回归的摘要。我已经创建了变量 x_train 和 y_train,我正在尝试进行逻辑回归
import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model
clf = linear_model.LogisticRegression(C=1e5)
clf.fit(x_train, y_train)
Run Code Online (Sandbox Code Playgroud)
我得到的是:
LogisticRegression(C=100000.0, class_weight=None, dual=False,
fit_intercept=True, intercept_scaling=1, max_iter=100,
multi_class='ovr', n_jobs=1, penalty='l2', random_state=None,
solver='liblinear', tol=0.0001, verbose=0, warm_start=False)
Run Code Online (Sandbox Code Playgroud)
我想要一个具有重要级别的摘要,R2 ecc。
我编写了这段代码,该代码通过数据验证列表并在新工作簿中复制工作表.我想保存它,但我不能t. The loop doesn给我一个错误,并继续复制和粘贴新的工作簿,但它实际上从来没有在我设置的目录中保存工作簿的副本
Dim ValidationList As Range
Set ValidationList = Range("BF1:BF13")
VCount = ValidationList.Count
For i = 1 To VCount
FolderPath = "C:\Users\A734810\Desktop\Efficiency"
namesheet = Cells(i, 58)
Path = FolderPath & namesheet & "\*.xlsx"
Filename = Dir(Path)
Range("A8") = Cells(ValidationList(i).Row, ValidationList.Column)
ThisWorkbook.Sheets("Professionals comparative").Copy
ActiveWorkbook.SaveCopyAs Filename:=Filename
Next
Run Code Online (Sandbox Code Playgroud)