我正在看安德鲁·吴教授讲授的斯坦福机器学习讲座系列的第2讲,并且对我认为可能相当简陋的事情提出了一个问题,但并没有点击我的脑袋.因此,让我们考虑两个向量θ和x,其中两个向量都包含实数.
设h(x)是一个函数(在这个特定情况下称为假设),但让它成为一些函数,表示为:
h(x) = "summation from i = 0 to i = n" of ?(i)*x(i) = ?(transpose)*x
Run Code Online (Sandbox Code Playgroud)
我不明白最后一部分,他说h(x)也等于θ(转置)*x.
如果有人能为我澄清这个概念,我将非常感激.
嘿,我有一个任务要执行,这基本上是以某种方式检索与特定领域有关的powerpoint演示文稿或pdf文档.假设我想要检索有关生物信息学领域的ppt和pdf讲义.我想知道是否可以通过使用神经网络训练的神经机器人的方法来实现这个任务?我想在进一步实施之前确认这种方法并非完全错误.
如果有人想知道为什么在这种情况下需要神经网络或任何学习算法,这里是我的计划(这可能是错误的或者可能有更简单的方法来实现这一点,所以请随时纠正我):
我生成由神经网络训练的神经机器人(不确定这种训练是如何发生的,我假设通过使用某些ppt和pdf文件的样本训练集的监督学习)然后这些机器人检索与他们通过他们学到的相似的页面他们的训练.
那么上述方法是完成此任务的正确方法吗?
information-retrieval machine-learning web-crawler neural-network genetic-algorithm
我尝试在html5中包含width和height属性来操纵我视频帧的尺寸,但它似乎没有与控制条成比例地变大或变小.我的意思是,似乎是视频的控制条(具有播放/暂停和音量控制的那个)比实际的视频帧宽得多,看起来很尴尬,所以我想知道我是怎么做的可以使控制栏和视频帧同样宽.我认为一些屏幕截图可以让我更清楚地解决我遇到的问题.


我为凌乱的代码道歉,但如果有帮助,我已经把它包括在内.
<!DOCTYPE html>
<html style="height:100%; width=1200px;margin:0;padding:0;">
<body style="height:100%;width=100%;margin:0;padding:0;">
<div id="container" style="background-color:#FFA500;height:100%;width:100%;position:relative;min-height:800px;min-width:1000px;" >
<div id="logo_login_pass" style="border:1px solid black; height:25%;width:94%;background-color:white;position:relative;float:right;min-height:150px;min-width:700px;">
<div id="logo" style="border:1px solid black; height:80%; width:30%; background-color:green; position:absolute;bottom:14px;min-height:90px;min-width:340px;">
For Logo
</div>
<div id="login_pass_form" style="border:1px solid black; height:40%;width:50%;background-color:blue;min-height:60px; min-width:300px;position:relative;float:right;bottom:-30px;">
For Login and Password
</div>
</div>
<div id="video" style="border:0px solid white; height:40%;width:49.844%;background-color:indigo;position:relative;float:left;">
<video width="450px" height="190px" controls="controls" style="position:absolute;top:30px;right:170px;">
<source src="sampleVid.mp4" type="video/mp4">
<source src="sampleVid.ogv" type="video/ogv">
<source src="sampleVid.webm" type="video/webm">
Your browser does not support the video tag.
</video>
</div>
<div id="user_registration_form" style="border:0px solid white; height:74%;width:50%;background-color:purple;position:reltive;float:right;min-height:448px;"> …Run Code Online (Sandbox Code Playgroud) 这是一个相当基本的问题,但我对此有点疑虑.假设我有一个A类,它有方法method1,method2,method3,method4和main方法.
method2仅由method1调用; method4仅由method3调用.
解决方案说从main调用method1,从main调用method2,使用method3和4调用method2.
因此,让main方法显式调用method1和method2不是很糟糕的设计吗?如果在main方法中调用私有方法,即使它们仅依赖于整个类中的单个方法,那么在类中使用私有方法有什么意义呢?
从方法3中调用method1和method4中的method2不是更清晰,因为在这两种情况下后一种方法只能由前者调用吗?
我认为这是辅助方法的重点,因此我们能够抽象出不必要的实现细节.
我再次为这个问题的简单性道歉,我对java很新.
Class A{
public static void main(String[] args){
int x = method1()
if ( x = 0){
//user wants to create a new account
method2()
}
}
private static int method1(){
//some code to check user login credentials in list of users
//if login credentials fail,user is asked if they want to create a new account, if yes,
//method 2 is invoked
//return value is whether the user wants to create a new …Run Code Online (Sandbox Code Playgroud) 我最近升级到pandas版本0.13并且遇到了这个问题,无论我的数据帧有多大(最大的有25列和158430行),pandas打印出整个数据帧(不是整个数据帧,只有几行)每一列,但它仍然是凌乱的!)而不是打印出这样的大数据帧更清洁的汇总表.我只是想知道是否有其他人遇到这个问题或者过去曾遇到过这个问题而且知道如何修复它.
提前致谢!
这是非常基本的我确定,但我没有使用PHP,因此发现它很难,我正在使用的代码给我一个错误,我不知道我能做些什么来解决它
<?php
$query = 'dogs';
$searches = 100; // number of results
$start = 0;
$pos = 1;
while($start < $searches)
{
$data = getPage('http://www.google.com/search?start=' . $start . '&q=' . urlencode($query));
preg_match_all("/\<li class\=g\>\<h3 class\=\"r\"\>\<a href\=\"([^\<\>]*)\" class\=l\>/",$data,$matches);
for($x = 0; $x < count($matches[1]); $x++)
{
echo '<p>' . $pos . ' ' . ($matches[1][$x]) . '</p>';
$pos++;
}
$start += 10;
}
?>
Run Code Online (Sandbox Code Playgroud)
错误:在第11行调用未定义函数getPage()
有帮助吗?
我有一个文本文档,其中我有一堆形式的/courses/......./.../..
网址,从这些网址中,我只想提取那些形式的网址/courses/.../lecture-notes.意思是以开头/courses和结尾的网址/lecture-notes.有没有人知道用正则表达式或字符串匹配这样做的好方法?
public class Knowing {
static final long tooth = 343L;
static long doIT(long tooth) {
System.out.print(++tooth + " ");
return ++tooth;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.print(tooth + " ");
final long tooth = 340L;
new Knowing().doIT(tooth);
System.out.println(tooth);
}
}
Run Code Online (Sandbox Code Playgroud)
好的,这是我的问题:
如果我们声明了一个全局变量static final long tooth = 343L;我们怎么能在声明的main方法中有另一个变量final long tooth = 340L;我只想知道为什么这是允许的,因为我运行它并且没有错误?
并且也不应该通过使用className.variableName来访问全局静态变量齿,而不是通过创建一个新的instance.variable名称,只有一个警告才允许这样做?
可能的重复: 在java中打印正则表达式匹配
我在java中使用Matcher类来将字符串与特定的正则表达式相匹配,我使用Pattern类将其转换为Pattern。我知道我的正则表达式有效,因为当我执行 Matcher.find() 时,我得到了我应该得到的真实值。但我想打印出产生这些真实值的字符串(意味着打印出与我的正则表达式匹配的字符串),并且我在匹配器类中没有看到实现该目的的方法。如果有人以前遇到过这样的问题,请告诉我。我很抱歉,因为这个问题相当初级,但我对正则表达式相当陌生,因此仍在正则表达式世界中寻找方法。
java ×4
regex ×2
web-crawler ×2
dataframe ×1
html ×1
html5 ×1
html5-video ×1
math ×1
matrix ×1
pandas ×1
php ×1
python ×1
string ×1
text-parsing ×1
vector ×1