class LogAnalysis

Constants

DATA_PATH
JAR_FILE_PATH
MAP_URI_FILE_PATH
RULE_FILE_PATH
TRANSFORM_DATA_PATH
VERSION

Attributes

conf[RW]

Your code goes here…

match_uri[RW]

Your code goes here…

origin_data[RW]

Your code goes here…

path[RW]

Your code goes here…

sup[RW]

Your code goes here…

type[RW]

Your code goes here…

Public Class Methods

new(path, type = nil) click to toggle source
# File lib/log_analysis.rb, line 16
def initialize(path, type = nil)
  @path         = path
  @type         = type
  @origin_data  = LoadingData.input(path, type)
end

Public Instance Methods

data_mining() click to toggle source
# File lib/log_analysis.rb, line 43
def data_mining
  data    = transformation
  @conf ||= 0.5
  @sup  ||= 60
  DataMining.execute(data, @conf, @sup) unless data.nil? || data.empty?
end
intepretation() click to toggle source
# File lib/log_analysis.rb, line 50
def intepretation
  data = data_mining
  Intepretation.execute(data) unless data.nil? || data.empty?
end
preprocessing_data() click to toggle source
# File lib/log_analysis.rb, line 28
def preprocessing_data
  data = selecting_data
  return if data.nil? || data.empty?

  filter  = data.select { |record| record.status_200? && record.method_get? && record.uri_without_data && !record.robot? }
  user    = UserIdentification.execute(filter)
  session = SessionIdentification.execute(user)
  session
end
selecting_data() click to toggle source
# File lib/log_analysis.rb, line 22
def selecting_data
  return @origin_data if @match_uri.nil?

  @origin_data.select { |record| record.uri.match?(@match_uri) }
end
transformation() click to toggle source
# File lib/log_analysis.rb, line 38
def transformation
  data = preprocessing_data
  Transformation.execute(data) unless data.nil? || data.empty?
end