<commit_before>package org.grouplens.reflens.knn.item;

import static org.junit.Assert.assertNotNull;

import org.grouplens.reflens.RecommenderBuilder;
import org.grouplens.reflens.RecommenderService;
import org.grouplens.reflens.baseline.ItemUserMeanPredictor;
import org.grouplens.reflens.data.ExpensiveRatingDataTest;
import org.junit.Before;
import org.junit.Test;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;


/**
 * Test that the item-item recommender can be built against a real data set.
 * @author <NAME> <<EMAIL>>
 *
 */
public class TestItemItemRecommenderWithData extends ExpensiveRatingDataTest {
	private ItemRecommenderModule module;
	@Before
	public void createModule() {
		module = new ItemRecommenderModule();
	}
	
	@Test
	public void testItemItemBuild() {
		Injector inj = Guice.createInjector(module);
		RecommenderBuilder builder = inj.getInstance(RecommenderBuilder.class);
		RecommenderService rec = builder.build(dataSource);
		assertNotNull(rec);
		assertNotNull(rec.getRatingPredictor());
		assertNotNull(rec.getRatingRecommender());
	}
	
	@Test
	public void testItemItemWithBaseline() {
		module.setBaseline(ItemUserMeanPredictor.class);
		Injector inj = Guice.createInjector(module);
		RecommenderBuilder builder = inj.getInstance(RecommenderBuilder.class);
		RecommenderService rec = builder.build(dataSource);
		assertNotNull(rec);
		assertNotNull(rec.getRatingPredictor());
		assertNotNull(rec.getRatingRecommender());
	}
}<commit_msg>Clean up item-item torture test<commit_after>package org.grouplens.reflens.knn.item;

import static org.junit.Assert.assertNotNull;

import org.grouplens.reflens.RecommenderBuilder;
import org.grouplens.reflens.RecommenderService;
import org.grouplens.reflens.baseline.UserMeanPredictor;
import org.grouplens.reflens.data.ExpensiveRatingDataTest;
import org.junit.Before;
import org.junit.Test;

import com.google.inject.Guice;
import com.google.inject.Injector;


/**
 * Test that the item-item recommender can be built against a real data set.
 * @author <NAME> <<EMAIL>>
 *
 */
public class TestItemItemRecommenderWithData extends ExpensiveRatingDataTest {
	private ItemRecommenderModule module;
	@Before
	public void createModule() {
		module = new ItemRecommenderModule();
	}
	
	@Test
	public void testItemItemBuild() {
		Injector inj = Guice.createInjector(module);
		RecommenderBuilder builder = inj.getInstance(RecommenderBuilder.class);
		RecommenderService rec = builder.build(dataSource);
		assertNotNull(rec);
		assertNotNull(rec.getRatingPredictor());
		assertNotNull(rec.getRatingRecommender());
	}
	
	@Test
	public void testItemItemWithBaseline() {
		module.setBaseline(UserMeanPredictor.class);
		Injector inj = Guice.createInjector(module);
		RecommenderBuilder builder = inj.getInstance(RecommenderBuilder.class);
		RecommenderService rec = builder.build(dataSource);
		assertNotNull(rec);
		assertNotNull(rec.getRatingPredictor());
		assertNotNull(rec.getRatingRecommender());
	}
}
{'fraction_non_alphanumeric': 0.10089315249751903, 'fraction_numerical': 0.0, 'mean_word_length': 6.217183770883055, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3408663', 'n_tokens_mistral': 1005, 'n_tokens_neox': 935, 'n_words': 176}