New answers tagged

0

I'm not aware of anything similar in the literature, this might be too specific but I don't know everything. Anyway I think your approach makes sense. I'm not sure if it would help but conditional entropy is also an option for calculating the discriminative power of the individual features. Assuming the training of a model is not too long, you could consider ...


0

You can normalize your data manually by setting absolute min and max values that go beyond the training and real world values. For instance, if the maximum of a training feature is 1500, and the maximum in real world data is 3000 but it could be 3500 as great maximum in the future, you should take 3500 for the training. absolute_max_A = 3500 training_data_A ...


0

I'm really not sure to understand what you need ? Do you need just 3 separate df, one for each class ? If so : df = *Your Origin Data, in Pandas Dataframe* df1 = df[df['Class'] == 1] df2 = df[df['Class'] == 2] df3 = df[df['Class'] == 3] This code is a way to select what you want in the dataframe. In df1 = df[df['Class'] == 1], you select all rows with Class ...


0

If your goal is to predict consumption yearly, I'd really go with option 2. You pointed out well the "only" issue with this opetion : you have to be sure lines from the same building are on the same set, either way you'd over-estimate your model performance. Another thing, not directly linked to your question : Year of construction is not a good ...


0

It depends on "differ from each other only slightly" means. One option is to use common data augmentation techniques to vary any images by: Horizontal and vertical shift Horizontal and vertical flip Rotation Brightness Zoom


1

Following your comment, I'll detail here (too long for comments basically) Acuracy may not be a good way to measure your model's performance. Imagine a problem with 99 '0' and 1 '1'. A model always gessing '0' will have 99% accuracy, and is useless, since you want to detect the '1'. A model giving you 10 '1' including the real one is way better, and have a ...


2

If your predictors have nothing to do with the outcome, you should not be able to build a model that works out-of-sample. This is a feature, not a bug, of machine learning. For instance, do you consider what time I set my alarm in the morning to be predictive whether or not you have cereal for breakfast? Features can, however, have just a small relationship ...


0

Try: df.set_index("id").stack().reset_index().rename(columns = {"level_1":"pivot_name",0:"pivot_value"}) Output:


0

This is often called the cold start problem. There are many options to initialize: Random suggestions Domain expert suggestions Most popular suggestions from another platform Content-based recommendation


0

For the word extraction from the image you can use one of the OCR such as Tesseract then try to clean the extracted dataset in order to use it to train the model


0

There are tons of image datasets. Wikipedia has a great list to get you started: https://en.wikipedia.org/wiki/List_of_datasets_for_machine-learning_research#Image_data A few very popular datasets: CIFAR-10 and CIFAR-100 ImageNet Open Images


1

No the cleanest solution but it works currentyear = 2021 df["Vals"] = df.apply(lambda x: x["column1"] if x["y1"] == currentyear else x["column2"] if x["y2"] == currentyear else x["column3"], axis = 1) Hope it helps


0

I think this should work df['vals'] = [x1 if y1 == currentyear else x2 if y2 == currentyear for x1, x2, y1, y2 in zip(df['col1'],df['col2'],df['y1'],df['y2'])]


0

#txt is your phone number that you get from your dataset filterTxt = list(filter(str.isdigit, txt)) formatTxt='' for index,number in enumerate(filterTxt) : if index==0: formatTxt+='('+number elif index==2: formatTxt+=number+') ' elif index==5: formatTxt+=number+'-' else: formatTxt+=number Ok let me explain my code. First of all we want to ...


1

The BIO format (and its variants) is a standard format for training a sequence labeling model, in particular a Named Entity Recognition (NER) model. Sequence labeling consists in assigning a label to every token in the sequence, so at the "low level" stages of training and predicting the system must deal with the token and its label, as well as (...


0

Random Forest can work good here since it is a decision tree. Before you call RandomForest, you will have to OneHotEncode your categorical variables e.g. Butter Flour Eggs ... because the Regressor or Classifier (whichever you fancy) cannot work with string and NaN values. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble....


0

This might helps you Before loading the data make sure check the file format. Load the required libraries First read the excel file using 'pd.read' function save the file into csv format using function 'to_csv' . example: pp = pd.read_excel('paul_palmer.xlsx') pp.to_csv('paul_palmer.csv', index=False)


0

Another solution is to use pandas to read the file and then export it to an excel form as following: import pandas as pd df = pd.read_csv("file.data", sep=",", header=None) df.to_excel("output.xlsx") You could read more here


1

There are several ways of doing this. Examples are: Binary classifier Train a separate binary classifier for Known vs Unknown, using supervised learning. The Known data would come from your dataset, and the Unknown dataset be a large set of samples from a diverse dataset like AudioSet et.c Anomaly detector Train an anomaly / out-of-distribution model, using ...


2

If you don't have any way to obtain negative instances, the standard option is one-class classification: one-class classification (OCC), also known as unary classification or class-modelling, tries to identify objects of a specific class amongst all objects, by primarily learning from a training set containing only the objects of that class. I think the ...


1

File systems are good enough for data storage up to a point. As data becomes more complex, it often makes sense to move to a database. A relationship database will allow for database normalization, storing a single, canonical value for each entity. This will greatly reduce the size of the data and allow for different combinations of train, dev, and test ...


1

There are three common approaches to deal with imbalanced datasets: Collect more data for the minority class (usually not feasible) Adding weights to datasets for error calculation by giving a higher penalty for the minority class. Make Synthetic samples for minority classes - this needs knowing about the distribution of the data for the minority class (...


Top 50 recent answers are included