mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-29 19:06:23 +02:00
drop old schema import
This commit is contained in:
parent
d84e9cae2c
commit
44334c0c9a
2 changed files with 6 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import numpy as np
|
||||
import pandas as pd
|
||||
from sklearn.impute import SimpleImputer
|
||||
from sklearn.preprocessing import LabelEncoder
|
||||
from sklearn.preprocessing import MaxAbsScaler
|
||||
|
|
@ -9,7 +10,6 @@ from sklearn.preprocessing import RobustScaler
|
|||
from sklearn.preprocessing import StandardScaler
|
||||
|
||||
from metagpt.tools.functions.libs.base import MLProcess
|
||||
from metagpt.tools.functions.schemas.data_preprocess import *
|
||||
|
||||
|
||||
class FillMissingValue(MLProcess):
|
||||
|
|
@ -141,7 +141,10 @@ def get_column_info(df: pd.DataFrame) -> dict:
|
|||
for i in df.columns:
|
||||
nan_freq = float("%.2g" % (df[i].isna().mean() * 100))
|
||||
n_unique = df[i].nunique()
|
||||
data.append([i, df[i].dtype, nan_freq, n_unique])
|
||||
data_type = str(df[i].dtype).replace("dtype('", "").replace("')", "")
|
||||
if data_type == "O":
|
||||
data_type = "object"
|
||||
data.append([i, data_type, nan_freq, n_unique])
|
||||
|
||||
samples = pd.DataFrame(
|
||||
data,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
import itertools
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from joblib import Parallel, delayed
|
||||
from pandas.api.types import is_numeric_dtype
|
||||
|
|
@ -15,7 +16,6 @@ from sklearn.model_selection import KFold
|
|||
from sklearn.preprocessing import PolynomialFeatures, KBinsDiscretizer
|
||||
|
||||
from metagpt.tools.functions.libs.base import MLProcess
|
||||
from metagpt.tools.functions.schemas.feature_engineering import *
|
||||
|
||||
|
||||
class PolynomialExpansion(MLProcess):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue