Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

balanced test set

In the blog whose title is "How to Train a Machine Learning Model in JASP: Classification", and according to the paragraph below, we must create a balanced test set. Can you show me how?

"To ensure we compute reliable performance statistics for our model later on, we created a balanced test set consisting of an equal number of non-churning and churning customers. To do this, we added a custom made indicator called testIndicator that represents 20% of the data that contains an equal proportion of churning to non-churning customers. The middle and right panel of Figure 1 shows the distribution of churning in the indicated equal data, and in the remainder of the data respectively."

Comments

  • I've asked the team

  • edited October 2023

    Hi may01dz,

    You cannot do this in the machine learning module directly but requires the manual inspection of the data and specification of a variable in the data set that indicates which observations belong to the test set (indicated by 1, you have manually balanced these across classes) and which observations belong to the training set (indicated by 0). You can then use this balanced test set for training the model.

    Note that a balanced test set is an ideal scenario, but is often impractical since one class may occur in the data naturally much more often (e.g., sick vs. healthy people, fraud vs non-fraud).

    Hope that clarifies a little!

  • I believe I have grasped your instructions and have executed the following steps:

    I duplicated the data contained within the 'Churn' column and pasted it into a new column which I designated as 'testIndicator.' I have then proceeded to select a representative sample comprising ten percent of customers classified as 'NO,' and an additional ten percent classified as 'YES.' I have represented these selections within the Colum as '1', whereas the remaining eighty percent of customers were represented as '0.'

    I kindly request your confirmation on the correctness of my approach. The file is attached for your reference.

  • Yes, this looks good! You now have a balanced test set and you can use the 'testIndicator' variable as the 'Test set indicator' (as shown below) to index the test set when training any of the algorithms in the machine learning module!


  • Thanks, that's what I did.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games