write a python finction

sedang Berlangsung Dipasang 5 tahun yang lalu Dibayar saat pengiriman
sedang Berlangsung Dibayar saat pengiriman

The problem was that a certain dataset was very skewed and had many many more instances of good loans than bad loans (<5%) and the objective was to predict bad loans.

Implement a generic function (that would work on any such dataset) with comments that takes n splits from the dataset such that each split is unique and contains an almost equal number of bad loans (target=0) and good loans (target=1)

1) implement such a function that takes a csv and outputs several dataframes (for example 10 folds), each of which is a unique split with equal amounts of good and bad loans?

2) The rare class (target =1) (bad loans) can be reused but the abundant class must be unique in all splits (no row should be used more than once)

3) The size of each split should be random

ie suppose we have 800,000 loans where 40,000 are bad loans and 760,000 are good loans. We can make 10 different splits with equal number of good and bad for example: split 1, bad = 20,000 good = 22,000. Split 2 another 10,000 bad loans and like 10,555 good loans. Split 3: Good = 40,000 Bad=40,000 ….

You can use the following dataset:

[login to view URL]

Pemrograman Database PHP Programming Python Pengembangan Perangkat Lunak

ID Proyek: #17647804

Tentang proyek

14 proposal Proyek online Aktif 5 tahun yang lalu

Diberikan kepada:

Techiedev

I have good experiences developing code in Python Programming language for scientific computing , data science and machine learning. I think your task can be done easily with using numpy packages especially random met Lebih banyak

€19 EUR dalam 1 hari
(32 Ulasan)
4.9

14 freelancer rata-rata menawar €52 untuk pekerjaan ini

LiveExperts

.................................................................................................................................................

€444 EUR dalam 1 hari
(57 Ulasan)
7.4
damilareisaac

Hi there, I have read the project description. I will be looking forward to work with you on this project. Please contact me on PM for details.

€30 EUR dalam 1 hari
(52 Ulasan)
6.1
DarkKnight2206

Hello!\nI am a python developer.\nI looked at your project and it seems interesting.\nI have all necessary skills required for this project.\nPing me to discuss in detail.

€30 EUR dalam 2 hari
(39 Ulasan)
5.6
pkouzouglidis

Hello, i have finished the function. I implemented a function named get_next_split(class_size) where you put as an argument the size of each class that you want for the next split. They it returns a dataframe containin Lebih banyak

€20 EUR dalam 1 hari
(28 Ulasan)
4.1
Ashw1nBhat

I have been doing machine learning for two years and this is an easy project i can complete in one day. I asked for three days just so i can test the code. Otherwose it is easy

€24 EUR dalam 3 hari
(3 Ulasan)
2.7
dangphap

Hello, I am a Python programmer with data science background. I could write code in Python that implement random module to select the sample as your requirements. Please pm me for further discussion. Thank you!

€19 EUR dalam 2 hari
(4 Ulasan)
2.1
AssistSW

I am very much interested in doing job. I can do this for you very quickly. Please let me know. I have 3 years of python experience.

€29 EUR dalam 1 hari
(1 Ulasan)
1.7
alimirzavw

Hi, I actually dealt with a similar problem you describe. Have you tried considering stratified k-fold splitting? Its practically the same thing you are asking. Plus if you plan to use a model for training do def Lebih banyak

€29 EUR dalam 2 hari
(0 Ulasan)
0.0
korolvl

MSc in Statistics at London School of Economics with good programming skills and knowledge of predictive modelling.

€12 EUR dalam 2 hari
(0 Ulasan)
0.0
rushabhsudame

Hello SIr, I am a Professional Python Developer. I think I can help you with this project. Let me know if you are interested so that we can discuss further about the project. Thank You.

€23 EUR dalam 1 hari
(0 Ulasan)
1.0