blob: 9b33dbda2574dfea0f15e780bee9fb50d034889d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Fri Apr 14 22:11:35 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FileDataModel (Mahout Map-Reduce 0.13.0 API)</title>
<meta name="date" content="2017-04-14">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FileDataModel (Mahout Map-Reduce 0.13.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":9,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FileDataModel.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model.file"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html" target="_top">Frames</a></li>
<li><a href="FileDataModel.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.mahout.cf.taste.impl.model.file</div>
<h2 title="Class FileDataModel" class="title">Class FileDataModel</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model">org.apache.mahout.cf.taste.impl.model.AbstractDataModel</a></li>
<li>
<ul class="inheritance">
<li>org.apache.mahout.cf.taste.impl.model.file.FileDataModel</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common">Refreshable</a>, <a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model">DataModel</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">FileDataModel</span>
extends <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractDataModel</a></pre>
<div class="block"><p>
A <a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model"><code>DataModel</code></a> backed by a delimited file. This class expects a file where each line
contains a user ID, followed by item ID, followed by optional preference value, followed by
optional timestamp. Commas or tabs delimit fields:
</p>
<p><code>userID,itemID[,preference[,timestamp]]</code></p>
<p>
Preference value is optional to accommodate applications that have no notion of a
preference value (that is, the user simply expresses a
preference for an item, but no degree of preference).
</p>
<p>
The preference value is assumed to be parseable as a <code>double</code>. The user IDs and item IDs are
read parsed as <code>long</code>s. The timestamp, if present, is assumed to be parseable as a
<code>long</code>, though this can be overridden via <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#readTimestampFromString-java.lang.String-"><code>readTimestampFromString(String)</code></a>.
The preference value may be empty, to indicate "no preference value", but cannot be empty. That is,
this is legal:
</p>
<p><code>123,456,,129050099059</code></p>
<p>But this isn't:</p>
<p><code>123,456,129050099059</code></p>
<p>
It is also acceptable for the lines to contain additional fields. Fields beyond the third will be ignored.
An empty line, or one that begins with '#' will be ignored as a comment.
</p>
<p>
This class will reload data from the data file when <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#refresh-java.util.Collection-"><code>refresh(Collection)</code></a> is called, unless the file
has been reloaded very recently already.
</p>
<p>
This class will also look for update "delta" files in the same directory, with file names that start the
same way (up to the first period). These files have the same format, and provide updated data that
supersedes what is in the main data file. This is a mechanism that allows an application to push updates to
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model.file"><code>FileDataModel</code></a> without re-copying the entire data file.
</p>
<p>
One small format difference exists. Update files must also be able to express deletes.
This is done by ending with a blank preference value, as in "123,456,".
</p>
<p>
Note that it's all-or-nothing -- all of the items in the file must express no preference, or the all must.
These cannot be mixed. Put another way there will always be the same number of delimiters on every line of
the file!
</p>
<p>
This class is not intended for use with very large amounts of data (over, say, tens of millions of rows).
For that, a JDBC-backed <a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model"><code>DataModel</code></a> and a database are more appropriate.
</p>
<p>
It is possible and likely useful to subclass this class and customize its behavior to accommodate
application-specific needs and input formats. See <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#processLine-java.lang.String-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-boolean-"><code>processLine(String, FastByIDMap, FastByIDMap, boolean)</code></a> and
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#processLineWithoutID-java.lang.String-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-"><code>processLineWithoutID(String, FastByIDMap, FastByIDMap)</code></a></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../../serialized-form.html#org.apache.mahout.cf.taste.impl.model.file.FileDataModel">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#DEFAULT_MIN_RELOAD_INTERVAL_MS">DEFAULT_MIN_RELOAD_INTERVAL_MS</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#FileDataModel-java.io.File-">FileDataModel</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#FileDataModel-java.io.File-boolean-long-">FileDataModel</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile,
boolean&nbsp;transpose,
long&nbsp;minReloadIntervalMS)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#FileDataModel-java.io.File-boolean-long-java.lang.String-">FileDataModel</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile,
boolean&nbsp;transpose,
long&nbsp;minReloadIntervalMS,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;delimiterRegex)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#FileDataModel-java.io.File-java.lang.String-">FileDataModel</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;delimiterRegex)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model">DataModel</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#buildModel--">buildModel</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#determineDelimiter-java.lang.String-">determineDelimiter</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;line)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getDataFile--">getDataFile</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.html" title="interface in org.apache.mahout.cf.taste.impl.common">LongPrimitiveIterator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getItemIDs--">getItemIDs</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastIDSet.html" title="class in org.apache.mahout.cf.taste.impl.common">FastIDSet</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getItemIDsFromUser-long-">getItemIDsFromUser</a></span>(long&nbsp;userID)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getMaxPreference--">getMaxPreference</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getMinPreference--">getMinPreference</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getNumItems--">getNumItems</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getNumUsers--">getNumUsers</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getNumUsersWithPreferenceFor-long-">getNumUsersWithPreferenceFor</a></span>(long&nbsp;itemID)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getNumUsersWithPreferenceFor-long-long-">getNumUsersWithPreferenceFor</a></span>(long&nbsp;itemID1,
long&nbsp;itemID2)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/PreferenceArray.html" title="interface in org.apache.mahout.cf.taste.model">PreferenceArray</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getPreferencesForItem-long-">getPreferencesForItem</a></span>(long&nbsp;itemID)</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/PreferenceArray.html" title="interface in org.apache.mahout.cf.taste.model">PreferenceArray</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getPreferencesFromUser-long-">getPreferencesFromUser</a></span>(long&nbsp;userID)</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getPreferenceTime-long-long-">getPreferenceTime</a></span>(long&nbsp;userID,
long&nbsp;itemID)</code>
<div class="block">Retrieves the time at which a preference value from a user and item was set, if known.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getPreferenceValue-long-long-">getPreferenceValue</a></span>(long&nbsp;userID,
long&nbsp;itemID)</code>
<div class="block">Retrieves the preference value for a single user and item.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.html" title="interface in org.apache.mahout.cf.taste.impl.common">LongPrimitiveIterator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#getUserIDs--">getUserIDs</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#hasPreferenceValues--">hasPreferenceValues</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#processFile-org.apache.mahout.common.iterator.FileLineIterator-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-boolean-">processFile</a></span>(<a href="../../../../../../../../org/apache/mahout/common/iterator/FileLineIterator.html" title="class in org.apache.mahout.common.iterator">FileLineIterator</a>&nbsp;dataOrUpdateFileIterator,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;?&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps,
boolean&nbsp;fromPriorData)</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#processFileWithoutID-org.apache.mahout.common.iterator.FileLineIterator-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-">processFileWithoutID</a></span>(<a href="../../../../../../../../org/apache/mahout/common/iterator/FileLineIterator.html" title="class in org.apache.mahout.common.iterator">FileLineIterator</a>&nbsp;dataOrUpdateFileIterator,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastIDSet.html" title="class in org.apache.mahout.cf.taste.impl.common">FastIDSet</a>&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps)</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#processLine-java.lang.String-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-boolean-">processLine</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;line,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;?&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps,
boolean&nbsp;fromPriorData)</code>
<div class="block">
Reads one line from the input file and adds the data to a <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common"><code>FastByIDMap</code></a> data structure which maps user IDs
to preferences.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#processLineWithoutID-java.lang.String-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-">processLineWithoutID</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;line,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastIDSet.html" title="class in org.apache.mahout.cf.taste.impl.common">FastIDSet</a>&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps)</code>&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#readItemIDFromString-java.lang.String-">readItemIDFromString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Subclasses may wish to override this if ID values in the file are not numeric.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#readTimestampFromString-java.lang.String-">readTimestampFromString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Subclasses may wish to override this to change how time values in the input file are parsed.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#readUserIDFromString-java.lang.String-">readUserIDFromString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Subclasses may wish to override this if ID values in the file are not numeric.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#refresh-java.util.Collection-">refresh</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common">Refreshable</a>&gt;&nbsp;alreadyRefreshed)</code>
<div class="block">
Triggers "refresh" -- whatever that means -- of the implementation.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#reload--">reload</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#removePreference-long-long-">removePreference</a></span>(long&nbsp;userID,
long&nbsp;itemID)</code>
<div class="block">See the warning at <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#setPreference-long-long-float-"><code>setPreference(long, long, float)</code></a>.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#setPreference-long-long-float-">setPreference</a></span>(long&nbsp;userID,
long&nbsp;itemID,
float&nbsp;value)</code>
<div class="block">Note that this method only updates the in-memory preference data that this <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model.file"><code>FileDataModel</code></a>
maintains; it does not modify any data on disk.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractDataModel">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.mahout.cf.taste.impl.model.<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractDataModel</a></h3>
<code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html#setMaxPreference-float-">setMaxPreference</a>, <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html#setMinPreference-float-">setMinPreference</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_MIN_RELOAD_INTERVAL_MS">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_MIN_RELOAD_INTERVAL_MS</h4>
<pre>public static final&nbsp;long DEFAULT_MIN_RELOAD_INTERVAL_MS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../../constant-values.html#org.apache.mahout.cf.taste.impl.model.file.FileDataModel.DEFAULT_MIN_RELOAD_INTERVAL_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="FileDataModel-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FileDataModel</h4>
<pre>public&nbsp;FileDataModel(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dataFile</code> - file containing preferences data. If file is compressed (and name ends in .gz or .zip
accordingly) it will be decompressed as it is read)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code> - if dataFile does not exist</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if file can't be read</dd>
</dl>
</li>
</ul>
<a name="FileDataModel-java.io.File-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FileDataModel</h4>
<pre>public&nbsp;FileDataModel(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;delimiterRegex)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>delimiterRegex</code> - If your data file don't use '\t' or ',' as delimiter, you can specify
a custom regex pattern.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="FileDataModel-java.io.File-boolean-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FileDataModel</h4>
<pre>public&nbsp;FileDataModel(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile,
boolean&nbsp;transpose,
long&nbsp;minReloadIntervalMS)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>transpose</code> - transposes user IDs and item IDs -- convenient for 'flipping' the data model this way</dd>
<dd><code>minReloadIntervalMS</code> - the minimum interval in milliseconds after which a full reload of the original datafile is done
when refresh() is called</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#FileDataModel-java.io.File-"><code>FileDataModel(File)</code></a></dd>
</dl>
</li>
</ul>
<a name="FileDataModel-java.io.File-boolean-long-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FileDataModel</h4>
<pre>public&nbsp;FileDataModel(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dataFile,
boolean&nbsp;transpose,
long&nbsp;minReloadIntervalMS,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;delimiterRegex)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>delimiterRegex</code> - If your data file don't use '\t' or ',' as delimiters, you can specify
user own using regex pattern.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getDataFile--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataFile</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getDataFile()</pre>
</li>
</ul>
<a name="reload--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reload</h4>
<pre>protected&nbsp;void&nbsp;reload()</pre>
</li>
</ul>
<a name="buildModel--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildModel</h4>
<pre>protected&nbsp;<a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model">DataModel</a>&nbsp;buildModel()
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="determineDelimiter-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>determineDelimiter</h4>
<pre>public static&nbsp;char&nbsp;determineDelimiter(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;line)</pre>
</li>
</ul>
<a name="processFile-org.apache.mahout.common.iterator.FileLineIterator-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processFile</h4>
<pre>protected&nbsp;void&nbsp;processFile(<a href="../../../../../../../../org/apache/mahout/common/iterator/FileLineIterator.html" title="class in org.apache.mahout.common.iterator">FileLineIterator</a>&nbsp;dataOrUpdateFileIterator,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;?&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps,
boolean&nbsp;fromPriorData)</pre>
</li>
</ul>
<a name="processLine-java.lang.String-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processLine</h4>
<pre>protected&nbsp;void&nbsp;processLine(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;line,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;?&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps,
boolean&nbsp;fromPriorData)</pre>
<div class="block"><p>
Reads one line from the input file and adds the data to a <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common"><code>FastByIDMap</code></a> data structure which maps user IDs
to preferences. This assumes that each line of the input file corresponds to one preference. After
reading a line and determining which user and item the preference pertains to, the method should look to
see if the data contains a mapping for the user ID already, and if not, add an empty data structure of preferences
as appropriate to the data.
</p>
<p>
Note that if the line is empty or begins with '#' it will be ignored as a comment.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>line</code> - line from input data file</dd>
<dd><code>data</code> - all data read so far, as a mapping from user IDs to preferences</dd>
<dd><code>fromPriorData</code> - an implementation detail -- if true, data will map IDs to
<a href="../../../../../../../../org/apache/mahout/cf/taste/model/PreferenceArray.html" title="interface in org.apache.mahout.cf.taste.model"><code>PreferenceArray</code></a> since the framework is attempting to read and update raw
data that is already in memory. Otherwise it maps to <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>s of
<a href="../../../../../../../../org/apache/mahout/cf/taste/model/Preference.html" title="interface in org.apache.mahout.cf.taste.model"><code>Preference</code></a>s, since it's reading fresh data. Subclasses must be prepared
to handle this wrinkle.</dd>
</dl>
</li>
</ul>
<a name="processFileWithoutID-org.apache.mahout.common.iterator.FileLineIterator-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processFileWithoutID</h4>
<pre>protected&nbsp;void&nbsp;processFileWithoutID(<a href="../../../../../../../../org/apache/mahout/common/iterator/FileLineIterator.html" title="class in org.apache.mahout.common.iterator">FileLineIterator</a>&nbsp;dataOrUpdateFileIterator,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastIDSet.html" title="class in org.apache.mahout.cf.taste.impl.common">FastIDSet</a>&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps)</pre>
</li>
</ul>
<a name="processLineWithoutID-java.lang.String-org.apache.mahout.cf.taste.impl.common.FastByIDMap-org.apache.mahout.cf.taste.impl.common.FastByIDMap-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processLineWithoutID</h4>
<pre>protected&nbsp;void&nbsp;processLineWithoutID(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;line,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastIDSet.html" title="class in org.apache.mahout.cf.taste.impl.common">FastIDSet</a>&gt;&nbsp;data,
<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastByIDMap.html" title="class in org.apache.mahout.cf.taste.impl.common">FastByIDMap</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&gt;&nbsp;timestamps)</pre>
</li>
</ul>
<a name="readUserIDFromString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUserIDFromString</h4>
<pre>protected&nbsp;long&nbsp;readUserIDFromString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block">Subclasses may wish to override this if ID values in the file are not numeric. This provides a hook by
which subclasses can inject an <a href="../../../../../../../../org/apache/mahout/cf/taste/model/IDMigrator.html" title="interface in org.apache.mahout.cf.taste.model"><code>IDMigrator</code></a> to perform
translation.</div>
</li>
</ul>
<a name="readItemIDFromString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readItemIDFromString</h4>
<pre>protected&nbsp;long&nbsp;readItemIDFromString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block">Subclasses may wish to override this if ID values in the file are not numeric. This provides a hook by
which subclasses can inject an <a href="../../../../../../../../org/apache/mahout/cf/taste/model/IDMigrator.html" title="interface in org.apache.mahout.cf.taste.model"><code>IDMigrator</code></a> to perform
translation.</div>
</li>
</ul>
<a name="readTimestampFromString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readTimestampFromString</h4>
<pre>protected&nbsp;long&nbsp;readTimestampFromString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block">Subclasses may wish to override this to change how time values in the input file are parsed.
By default they are expected to be numeric, expressing a time as milliseconds since the epoch.</div>
</li>
</ul>
<a name="getUserIDs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserIDs</h4>
<pre>public&nbsp;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.html" title="interface in org.apache.mahout.cf.taste.impl.common">LongPrimitiveIterator</a>&nbsp;getUserIDs()
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all user IDs in the model, in order</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getPreferencesFromUser-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferencesFromUser</h4>
<pre>public&nbsp;<a href="../../../../../../../../org/apache/mahout/cf/taste/model/PreferenceArray.html" title="interface in org.apache.mahout.cf.taste.model">PreferenceArray</a>&nbsp;getPreferencesFromUser(long&nbsp;userID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userID</code> - ID of user to get prefs for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>user's preferences, ordered by item ID</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchUserException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchUserException</a></code> - if the user does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getItemIDsFromUser-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemIDsFromUser</h4>
<pre>public&nbsp;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/FastIDSet.html" title="class in org.apache.mahout.cf.taste.impl.common">FastIDSet</a>&nbsp;getItemIDsFromUser(long&nbsp;userID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userID</code> - ID of user to get prefs for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>IDs of items user expresses a preference for</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchUserException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchUserException</a></code> - if the user does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getItemIDs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemIDs</h4>
<pre>public&nbsp;<a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.html" title="interface in org.apache.mahout.cf.taste.impl.common">LongPrimitiveIterator</a>&nbsp;getItemIDs()
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.html" title="interface in org.apache.mahout.cf.taste.impl.common"><code>LongPrimitiveIterator</code></a> of all item IDs in the model, in order</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getPreferencesForItem-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferencesForItem</h4>
<pre>public&nbsp;<a href="../../../../../../../../org/apache/mahout/cf/taste/model/PreferenceArray.html" title="interface in org.apache.mahout.cf.taste.model">PreferenceArray</a>&nbsp;getPreferencesForItem(long&nbsp;itemID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>itemID</code> - item ID</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all existing <a href="../../../../../../../../org/apache/mahout/cf/taste/model/Preference.html" title="interface in org.apache.mahout.cf.taste.model"><code>Preference</code></a>s expressed for that item, ordered by user ID, as an array</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchItemException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchItemException</a></code> - if the item does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getPreferenceValue-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferenceValue</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</a>&nbsp;getPreferenceValue(long&nbsp;userID,
long&nbsp;itemID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html#getPreferenceValue-long-long-">DataModel</a></code></span></div>
<div class="block">Retrieves the preference value for a single user and item.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userID</code> - user ID to get pref value from</dd>
<dd><code>itemID</code> - item ID to get pref value for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>preference value from the given user for the given item or null if none exists</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchUserException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchUserException</a></code> - if the user does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getPreferenceTime-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferenceTime</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&nbsp;getPreferenceTime(long&nbsp;userID,
long&nbsp;itemID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html#getPreferenceTime-long-long-">DataModel</a></code></span></div>
<div class="block">Retrieves the time at which a preference value from a user and item was set, if known.
Time is expressed in the usual way, as a number of milliseconds since the epoch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userID</code> - user ID for preference in question</dd>
<dd><code>itemID</code> - item ID for preference in question</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>time at which preference was set or null if no preference exists or its time is not known</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchUserException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchUserException</a></code> - if the user does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getNumItems--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumItems</h4>
<pre>public&nbsp;int&nbsp;getNumItems()
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>total number of items known to the model. This is generally the union of all items preferred by
at least one user but could include more.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getNumUsers--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumUsers</h4>
<pre>public&nbsp;int&nbsp;getNumUsers()
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>total number of users known to the model.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getNumUsersWithPreferenceFor-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumUsersWithPreferenceFor</h4>
<pre>public&nbsp;int&nbsp;getNumUsersWithPreferenceFor(long&nbsp;itemID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>itemID</code> - item ID to check for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of users who have expressed a preference for the item</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="getNumUsersWithPreferenceFor-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumUsersWithPreferenceFor</h4>
<pre>public&nbsp;int&nbsp;getNumUsersWithPreferenceFor(long&nbsp;itemID1,
long&nbsp;itemID2)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>itemID1</code> - first item ID to check for</dd>
<dd><code>itemID2</code> - second item ID to check for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of users who have expressed a preference for the items</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="setPreference-long-long-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPreference</h4>
<pre>public&nbsp;void&nbsp;setPreference(long&nbsp;userID,
long&nbsp;itemID,
float&nbsp;value)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<div class="block">Note that this method only updates the in-memory preference data that this <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model.file"><code>FileDataModel</code></a>
maintains; it does not modify any data on disk. Therefore any updates from this method are only
temporary, and lost when data is reloaded from a file. This method should also be considered relatively
slow.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userID</code> - user to set preference for</dd>
<dd><code>itemID</code> - item to set preference for</dd>
<dd><code>value</code> - preference value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchItemException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchItemException</a></code> - if the item does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchUserException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchUserException</a></code> - if the user does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="removePreference-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePreference</h4>
<pre>public&nbsp;void&nbsp;removePreference(long&nbsp;userID,
long&nbsp;itemID)
throws <a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></pre>
<div class="block">See the warning at <a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html#setPreference-long-long-float-"><code>setPreference(long, long, float)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userID</code> - user from which to remove preference</dd>
<dd><code>itemID</code> - item to remove preference for</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchItemException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchItemException</a></code> - if the item does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/NoSuchUserException.html" title="class in org.apache.mahout.cf.taste.common">NoSuchUserException</a></code> - if the user does not exist</dd>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/TasteException.html" title="class in org.apache.mahout.cf.taste.common">TasteException</a></code> - if an error occurs while accessing the data</dd>
</dl>
</li>
</ul>
<a name="refresh-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refresh</h4>
<pre>public&nbsp;void&nbsp;refresh(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common">Refreshable</a>&gt;&nbsp;alreadyRefreshed)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html#refresh-java.util.Collection-">Refreshable</a></code></span></div>
<div class="block"><p>
Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that any
<a href="../../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common"><code>Refreshable</code></a> should always leave itself in a consistent, operational state, and that the refresh
atomically updates internal state from old to new.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>alreadyRefreshed</code> - <a href="../../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common"><code>Refreshable</code></a>s that are known to have already been
refreshed as a result of an initial call to a {#refresh(Collection)} method on some
object. This ensure that objects in a refresh dependency graph aren't refreshed twice
needlessly.</dd>
</dl>
</li>
</ul>
<a name="hasPreferenceValues--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasPreferenceValues</h4>
<pre>public&nbsp;boolean&nbsp;hasPreferenceValues()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this implementation actually stores and returns distinct preference values;
that is, if it is not a 'boolean' DataModel</dd>
</dl>
</li>
</ul>
<a name="getMaxPreference--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxPreference</h4>
<pre>public&nbsp;float&nbsp;getMaxPreference()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html#getMaxPreference--">getMaxPreference</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model">DataModel</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html#getMaxPreference--">getMaxPreference</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractDataModel</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the maximum preference value that is possible in the current problem domain being evaluated. For
example, if the domain is movie ratings on a scale of 1 to 5, this should be 5. While a
<a href="../../../../../../../../org/apache/mahout/cf/taste/recommender/Recommender.html" title="interface in org.apache.mahout.cf.taste.recommender"><code>Recommender</code></a> may estimate a preference value above 5.0, it
isn't "fair" to consider that the system is actually suggesting an impossible rating of, say, 5.4 stars.
In practice the application would cap this estimate to 5.0. Since evaluators evaluate
the difference between estimated and actual value, this at least prevents this effect from unfairly
penalizing a <a href="../../../../../../../../org/apache/mahout/cf/taste/recommender/Recommender.html" title="interface in org.apache.mahout.cf.taste.recommender"><code>Recommender</code></a></dd>
</dl>
</li>
</ul>
<a name="getMinPreference--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinPreference</h4>
<pre>public&nbsp;float&nbsp;getMinPreference()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html#getMinPreference--">getMinPreference</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html" title="interface in org.apache.mahout.cf.taste.model">DataModel</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html#getMinPreference--">getMinPreference</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractDataModel</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../../org/apache/mahout/cf/taste/model/DataModel.html#getMaxPreference--"><code>DataModel.getMaxPreference()</code></a></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FileDataModel.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../../../../org/apache/mahout/cf/taste/impl/model/file/FileIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model.file"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/apache/mahout/cf/taste/impl/model/file/FileDataModel.html" target="_top">Frames</a></li>
<li><a href="FileDataModel.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>