1. Învăţa
  2. /
  3. Courses
  4. /
  5. Python으로 배우는 Market Basket Analysis

Connected

exercise

conviction으로 eBook 프로모션 살펴보기

이전 연습 문제에서는 conviction을 계산하는 함수를 정의했어요. 그 함수를 goodreads-10k 데이터셋의 모든 두 책 순열에 적용하라는 요청이 있었죠. 이번 연습에서는 이전에 사용했던 가장 인기 있는 세 권의 책, The Hunger Games, Harry Potter, Twilight에 그 함수를 적용해 테스트해 보겠습니다.

함수는 이미 정의되어 있으며 conviction으로 제공됩니다. 이 함수는 전건(antecedent)과 후건(consequent) 두 개의 인수를 받는다는 점을 기억하세요. 또한 이전 연습에서 사용한 books DataFrame의 열들은 각각 별도의 DataFrame으로 제공되며, 이름은 potter, twilight, hunger입니다.

Instrucţiuni

100 XP
  • {Twilight} \(\rightarrow\) {Potter}와 {Potter} \(\rightarrow\) {Twilight}의 conviction을 계산하세요.
  • {Twilight} \(\rightarrow\) {Hunger}와 {Hunger} \(\rightarrow\) {Twilight}의 conviction을 계산하세요.
  • {Potter} \(\rightarrow\) {Hunger}와 {Hunger} \(\rightarrow\) {Potter}의 conviction을 계산하세요.