Package org.apache.mahout.cf.taste.impl.common

Examples of org.apache.mahout.cf.taste.impl.common.FixedRunningAverageAndStdDev


      stmt.setLong(2, itemID2);
      stmt.setLong(3, itemID2);
      stmt.setLong(4, itemID1);
      log.debug("Executing SQL query: {}", getDiffSQL);
      rs = stmt.executeQuery();
      return rs.next() ? new FixedRunningAverageAndStdDev(rs.getDouble(2), rs.getDouble(3), rs.getInt(1)) : null;
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
View Full Code Here


          // result[i] is null for these values of i
        }
        if (i == size) {
          break;
        }
        result[i] = new FixedRunningAverageAndStdDev(rs.getDouble(2), rs.getDouble(3), rs.getInt(1));
        i++;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
      throw new TasteException(sqle);
View Full Code Here

      if (rs.next()) {
        double average = rs.getDouble(2);
        if (flipped) {
          average = -average;
        }
        return new FixedRunningAverageAndStdDev(average, rs.getDouble(3), rs.getInt(1));
      } else {
        return null;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
View Full Code Here

          // result[i] is null for these values of i
        }
        if (i == size) {
          break;
        }
        result[i] = new FixedRunningAverageAndStdDev(rs.getDouble(2), rs.getDouble(3), rs.getInt(1));
        i++;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
      throw new TasteException(sqle);
View Full Code Here

      if (rs.next()) {
        double average = rs.getDouble(2);
        if (flipped) {
          average = -average;
        }
        return new FixedRunningAverageAndStdDev(average, rs.getDouble(3), rs.getInt(1));
      } else {
        return null;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
View Full Code Here

          // result[i] is null for these values of i
        }
        if (i == size) {
          break;
        }
        result[i] = new FixedRunningAverageAndStdDev(rs.getDouble(2), rs.getDouble(3), rs.getInt(1));
        i++;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
      throw new TasteException(sqle);
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.impl.common.FixedRunningAverageAndStdDev

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.